diff --git a/src/ExamService/ExamService.php b/src/ExamService/ExamService.php index a198b8e..aa173ce 100644 --- a/src/ExamService/ExamService.php +++ b/src/ExamService/ExamService.php @@ -4,10 +4,24 @@ declare(strict_types=1); namespace Dhd\Micro\Interface\ExamService; -/** - * 试题中心聚合契约 - */ +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\ExamServiceInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\UserPaperInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\AiInterviewQuestionInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\CustomQuestionInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\PaperInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\GufenPaperInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\QuestionInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\QuestionTypeInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\QuestionCategoryInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\SmartPaperInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\CampusRelationInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\PaperImportInterface; +use Dhd\Micro\Interface\ExamService\JsonRpcInterface\QuestionNoteInterface; + interface ExamService extends + ExamServiceInterface, + UserPaperInterface, + AiInterviewQuestionInterface, CustomQuestionInterface, PaperInterface, GufenPaperInterface, @@ -15,99 +29,6 @@ interface ExamService extends QuestionTypeInterface, QuestionCategoryInterface, SmartPaperInterface, - UserPaperInterface, CampusRelationInterface, PaperImportInterface, - QuestionNoteInterface, - AiInterviewQuestionInterface -{ - /** - * 获取练习列表. - */ - public function getPracticeList(int $userId): array; - - /** - * 获取练习详情. - */ - public function getPracticeDetail(int $userId, int $id): array; - - /** - * 提交练习答案. - */ - public function submitPractice(int $userId, int $paperId, array $answers): array; - - /** - * 开始考试. - */ - public function startExam(array $params): array; - - /** - * 提交考试. - */ - public function submitExam(array $params): array; - - /** - * 获取用户考试记录列表. - */ - public function getUserExamRecords(array $params): array; - - /** - * 获取考试记录详情. - */ - public function getExamRecordDetail(int $recordId, int $userId): array; - - /** - * 获取考试记录题目列表. - */ - public function getByRecordId(int $userId, int $recordId): array; - - /** - * 保存用户答题记录. - */ - public function saveAnswer(array $params): bool; - - /** - * 获取用户错题列表. - */ - public function getUserWrongQuestions(array $params): array; - - /** - * 标记错题为已掌握. - */ - public function markAsMastered(int $userId, int $wrongId): bool; - - /** - * 添加错题笔记(避免与题目笔记 addNote 重名). - */ - public function addWrongQuestionNote(array $params): bool; - - /** - * 获取题目错误统计. - */ - public function getErrorStats(int $userId, int $questionId): array; - - /** - * 批量更新题目得分. - */ - public function batchUpdateScores(array $params): bool; - - /** - * 获取考试类型列表(V1 兼容接口). - */ - public function getExamTypeList(array $params): array; - - /** - * 获取考试类型详情(V1 兼容接口). - */ - public function getExamTypeDetail(int $id): array; - - /** - * 获取科目列表(V1 兼容接口). - */ - public function getSubjectList(array $params): array; - - /** - * 获取题库列表(V1 兼容接口). - */ - public function getQuestionStoreList(array $params): array; -} + QuestionNoteInterface {} diff --git a/src/ExamService/AiInterviewQuestionInterface.php b/src/ExamService/JsonRpcInterface/AiInterviewQuestionInterface.php similarity index 94% rename from src/ExamService/AiInterviewQuestionInterface.php rename to src/ExamService/JsonRpcInterface/AiInterviewQuestionInterface.php index 7a95759..77161df 100644 --- a/src/ExamService/AiInterviewQuestionInterface.php +++ b/src/ExamService/JsonRpcInterface/AiInterviewQuestionInterface.php @@ -1,8 +1,6 @@