diff --git a/src/DataService/ConfigInterface.php b/src/DataService/ConfigInterface.php index fc9aaa7..b157846 100644 --- a/src/DataService/ConfigInterface.php +++ b/src/DataService/ConfigInterface.php @@ -27,6 +27,12 @@ interface ConfigInterface */ public function getPublicConfigs(string $platform = '', array $types = [], array $configNames = []): array; + /** + * App 端配置列表(支持 route_path / config_name 过滤,不含过滤条件时行为与 getPublicConfigs 一致). + * @param array $params {platform:string, types:array, route_path?:string, config_name?:string} + */ + public function appGetConfigList(array $params): array; + /** * 获取配置列表 * @param string $platform 配置所属平台 diff --git a/src/ExamService/JsonRpcInterface/DailyPracticeInterface.php b/src/ExamService/JsonRpcInterface/DailyPracticeInterface.php index 24e535e..971805d 100644 --- a/src/ExamService/JsonRpcInterface/DailyPracticeInterface.php +++ b/src/ExamService/JsonRpcInterface/DailyPracticeInterface.php @@ -6,16 +6,23 @@ namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface; interface DailyPracticeInterface { - /** - * App 每日刷题:今日刷题情况 + 每日题目分类列表. - * - * 分类由编码按日期确定性随机选取; - * 抽题复用 getExerciseQuestionList(test_type=4 每日刷题)。 - * - * @param int $userId 用户ID - * @return array {today_completed:int, today_total:int, list:list<{ - * category_id:int, category_name:string, question_num:int, completed:bool - * }>} - */ - public function appGetDailyPractice(int $userId): array; -} + /** + * App 每日刷题:今日刷题情况 + 每日题目分类列表. + * + * 分类由编码按日期确定性随机选取; + * 抽题复用 getExerciseQuestionList(test_type=4 每日刷题)。 + * completed 表示该分类今日已作答 >= 组题数(默认5),部分作答未完成时下次继续展示。 + * @param int $userId 用户ID + */ + public function appGetDailyPractice(int $userId): array; + + /** + * App 每日刷题:指定分类今日作答进度与已答题目(断点续答:恢复已答题并展示剩余题数). + * + * 返回已答题目详情(题干/选项/用户答案/判分)供二次进入做题页恢复展示; + * + * @param int $userId 用户ID + * @param int $categoryId 分类ID + */ + public function appGetDailyPracticeProgress(int $userId, int $categoryId): array; + } diff --git a/src/ExamService/JsonRpcInterface/ExamServiceInterface.php b/src/ExamService/JsonRpcInterface/ExamServiceInterface.php index b43302e..66f7869 100644 --- a/src/ExamService/JsonRpcInterface/ExamServiceInterface.php +++ b/src/ExamService/JsonRpcInterface/ExamServiceInterface.php @@ -79,6 +79,21 @@ interface ExamServiceInterface */ public function batchUpdateScores(array $params): bool; + /** + * 获取错题记录首页统计(总错题数、顽固错题数、模块错题数与正确率、薄弱项). + */ + public function appGetWrongRecordStats(int $userId): array; + + /** + * 获取错题记录模块明细(模块错题数与正确率、二级知识点错题数). + */ + public function appGetWrongRecordModuleDetail(int $userId, int $categoryId): array; + + /** + * 提交错题记录发起的专项练习(写做题记录并更新错题,返回判分结果与正确率对比). + */ + public function submitWrongPractice(int $userId, array $params): array; + /** * 获取考试类型列表(V1 兼容接口). */ @@ -99,7 +114,6 @@ interface ExamServiceInterface */ public function getQuestionStoreList(array $params): array; - /** * 提交题目答案,根据试卷类型自动选择智能组卷或普通试卷逻辑. */