From 4bf1c1fe5625884c93914cbd0587fc5dab1ce45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A0=82=E5=90=89=E8=AF=83=E5=BE=B7=E6=8B=89=E6=9B=BC?= =?UTF-8?q?=E6=9F=A5=E7=9A=84=E8=8B=B1=E8=B1=AA?= Date: Tue, 25 Aug 2026 15:01:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E9=A2=98=E8=AE=B0=E5=BD=95=20?= =?UTF-8?q?=E5=92=8C=20=E6=AF=8F=E6=97=A5=E5=88=B7=E9=A2=98=20=E5=A5=91?= =?UTF-8?q?=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DataService/ConfigInterface.php | 6 ++++ .../DailyPracticeInterface.php | 33 +++++++++++-------- .../JsonRpcInterface/ExamServiceInterface.php | 16 ++++++++- 3 files changed, 41 insertions(+), 14 deletions(-) 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; - /** * 提交题目答案,根据试卷类型自动选择智能组卷或普通试卷逻辑. */