diff --git a/src/ExamService/ExamService.php b/src/ExamService/ExamService.php index 2dca330..543091b 100644 --- a/src/ExamService/ExamService.php +++ b/src/ExamService/ExamService.php @@ -5,7 +5,7 @@ declare(strict_types=1); namespace Dhd\Micro\Interface\ExamService; /** - * 试题中心聚合契约(管理后台使用范围) + * 试题中心聚合契约 */ interface ExamService extends CustomQuestionInterface, @@ -50,27 +50,57 @@ interface ExamService extends public function submitPractice(int $userId, int $paperId, array $answers): array; /** - * 开始考试(V1 兼容接口). + * 开始考试. */ public function startExam(array $params): array; /** - * 提交考试(V1 兼容接口). + * 提交考试. */ public function submitExam(array $params): array; /** - * 获取用户考试记录列表(V1 兼容接口). + * 获取用户考试记录列表. */ public function getUserExamRecords(array $params): array; /** - * 获取考试记录详情(V1 兼容接口). + * 获取考试记录详情. */ public function getExamRecordDetail(int $recordId, int $userId): array; /** - * 获取考试记录题目列表(V1 兼容接口). + * 获取考试记录题目列表. */ 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; }