23 Commits

Author SHA1 Message Date
与非
88c1279f12 按分类批量设置卷内分值 设置卷内单题分值 2026-10-14 14:52:04 +08:00
与非
9eebc9d71d 用户建立 v2 版本 2026-10-09 09:32:48 +08:00
与非
e05a640675 Merge remote-tracking branch 'origin/main' 2026-09-23 14:23:42 +08:00
与非
d28c3da6f8 官网获取文章列表 接口契约 2026-09-23 14:23:26 +08:00
zj
7d13b700f1 update 2026-09-21 09:02:15 +08:00
zj
cba3c123c9 新增获取最新一条AI批改接口 2026-09-21 08:43:12 +08:00
zj
c088a12166 update 2026-09-20 10:51:57 +08:00
zj
4c0429489d 调整AI面试相关接口 2026-09-20 10:24:39 +08:00
与非
3ef41a50ec 课程服务新增官网获取课程列表方法 2026-09-18 10:10:09 +08:00
与非
7f0df32c25 Revert "课程服务新增官网获取热门课程方法"
This reverts commit 70bb3f5468.
2026-09-17 15:41:28 +08:00
与非
70bb3f5468 课程服务新增官网获取热门课程方法 2026-09-17 15:30:38 +08:00
与非
2b19cbb512 题目导入预览修正:新增解析暂存校验与更新契约 2026-09-17 11:08:31 +08:00
zj
66e467b452 将AI申论批改调整为单题模式 2026-09-15 16:09:45 +08:00
zj
121e1f72dc 增加AI申论题相关管理接口 2026-09-15 13:43:24 +08:00
堂吉诃德拉曼查的英豪
b86dc5715e ArticleService契约getContentColumnsByChannel增加platform参数 2026-09-11 14:13:41 +08:00
堂吉诃德拉曼查的英豪
75bb17b51a 获取用户错题v2契约 2026-09-10 11:25:47 +08:00
堂吉诃德拉曼查的英豪
88ffa75eb5 题目管理新增创建与材料内容保存契约 2026-09-08 14:57:01 +08:00
堂吉诃德拉曼查的英豪
2b2dcc0584 题目管理新增管理端分页列表与字段级保存契约 2026-09-08 11:36:45 +08:00
堂吉诃德拉曼查的英豪
e4c509ebef 题型分类接口 subjectId 支持缺省,不传时返回不限科目的分类树 2026-09-08 09:51:15 +08:00
堂吉诃德拉曼查的英豪
9ae3b1f4b6 科目加年份筛选试卷总数 2026-09-04 11:25:31 +08:00
堂吉诃德拉曼查的英豪
a8d5109a0a CampusRelation契约新增首页科目套卷统计方法 2026-09-03 14:34:21 +08:00
堂吉诃德拉曼查的英豪
2f530d6595 ExamService契约新增错题练习抽题方法 2026-09-02 10:26:42 +08:00
堂吉诃德拉曼查的英豪
328a5f1a66 面试题音频:新增批量查询音频状态与列表附加音频状态契约 2026-09-01 14:29:38 +08:00
15 changed files with 244 additions and 13 deletions

View File

@@ -25,15 +25,16 @@ interface AiEssayCheckInterface
*/
public function getEssayCheckDetail(int $id): ?array;
/**
* 获取未提交的试卷ID列表
* @param int $userId 用户ID
* @return array
*/
public function getEassayPaperNoSubmitList(int $userId): array;
/**
* 用户提交申论批改
*/
public function submitEssayPaper(array $params): int;
public function submitAiEssay(array $params): int;
/**
* 获取用户最近一次申论批改记录
* @param int $userId 用户ID
* @param int $questionId 面试题ID
* @return array|null
*/
public function getEssayQuestionUserLastRecord(int $userId, int $questionId): ?array;
}

View File

@@ -39,4 +39,12 @@ interface AiInterviewCheckInterface
* @return array
*/
public function getInterviewQuestionExamTypeList(): array;
/**
* 获取用户最近一次面试批改记录
* @param int $userId 用户ID
* @param int $questionId 面试题ID
* @return array|null
*/
public function getInterviewQuestionUserLastRecord(int $userId, int $questionId): ?array;
}

View File

@@ -23,6 +23,15 @@ interface AiInterviewTtsInterface
*/
public function getInterviewQuestionAudioUrl(int $questionId): ?string;
/**
* 批量查询面试题音频生成状态(管理列表使用):仅查询不触发合成。
* 以文件中心按当前题干哈希精确匹配为准判断是否已生成,
* 未生成时结合 Redis 状态键区分排队/合成中/失败。
* @param array $questions 题目列表,元素结构 ['question_id'=>面试题ID, 'content'=>题干内容]
* @return array [面试题ID => ['status'=>queued|processing|success|failed|unknown, 'audio_url'=>?string]]
*/
public function getInterviewQuestionAudioMap(array $questions): array;
/**
* 提交朗读任务(异步):已生成直接返回成功,未生成投递队列后台合成并返回排队状态
* 音频按题目(question_id)生成并全局复用,同一题目并发只合成一次

View File

@@ -17,6 +17,7 @@ interface ArticleService
public function getArticleDetailWithUser(int $id, int $userId): array;
public function getArticleList(array $params = []): array;
public function appGetArticleList(array $params = []): array;
public function officialGetArticleList(array $params = []): array;
public function searchArticles(string $keyword, array $params = []): array;
// 类型
@@ -71,7 +72,7 @@ interface ArticleService
public function deleteContentColumn(int $id): bool;
public function getContentColumnList(array $params = []): array;
public function getContentColumnDetail(int $id): array;
public function getContentColumnsByChannel(string $channel): array;
public function getContentColumnsByChannel(string $channel, string $platform = 'all'): array;
// FAQ
public function createFaq(array $data): int;

View File

@@ -36,6 +36,12 @@ interface CourseServiceInterface
*/
public function appGetCourseList(array $params): array;
/**
* 官网获取课程列表,按更新时间最新在前
* @param array $params 获取参数
*/
public function officialGetCourseList(array $params): array;
/**
* 获取课程详情
* @param int $id 课程ID

View File

@@ -6,6 +6,7 @@ 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\AiInterviewCategoryInterface;
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\AiInterviewQuestionInterface;
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\CustomQuestionInterface;
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\PaperInterface;
@@ -18,10 +19,12 @@ use Dhd\Micro\Interface\ExamService\JsonRpcInterface\CampusRelationInterface;
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\PaperImportInterface;
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\QuestionNoteInterface;
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\DailyPracticeInterface;
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\AiEssayQuestionInterface;
interface ExamService extends
ExamServiceInterface,
UserPaperInterface,
AiInterviewCategoryInterface,
AiInterviewQuestionInterface,
CustomQuestionInterface,
PaperInterface,
@@ -33,4 +36,5 @@ interface ExamService extends
CampusRelationInterface,
PaperImportInterface,
QuestionNoteInterface,
DailyPracticeInterface {}
DailyPracticeInterface,
AiEssayQuestionInterface {}

View File

@@ -0,0 +1,58 @@
<?php
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
interface AiEssayQuestionInterface
{
/**
* 获取AI申论题列表
* @param array $params 查询参数
* @return array
*/
public function getAiEssayQuestionList(array $params): array;
/**
* app获取AI申论题列表
* @param int $userId 用户ID
* @param array $params 查询参数
* @return array
*/
public function appGetAiEssayQuestionList(int $userId, array $params): array;
/**
* 获取AI申论题详情
* @param int $id AI申论题id
* @return array|null
*/
public function getAiEssayQuestionDetail(int $id): ?array;
/**
* 创建AI申论题
* @param array $params AI申论题参数
* @return void
*/
public function createAiEssayQuestion(array $params): void;
/**
* 更新AI申论题
* @param int $id AI申论题id
* @param array $params AI申论题参数
*/
public function updateAiEssayQuestion(int $id, array $params): void;
/**
* 删除AI申论题
* @param int $id AI申论题id
* @return void
*/
public function deleteAiEssayQuestion(int $id): void;
/**
* 随机获取一个问题
* @param int $examTypeId 考试类型
* @param int $campusId 地区ID
* @param int $subjectId 考试科目
* @return array|null
*/
public function getAiEssayQuestionRandom(int $examTypeId, int $campusId, int $subjectId): ?array;
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
interface AiInterviewCategoryInterface
{
/**
* 获取AI面试类型列表
* @param array $params 查询参数
* @return array
*/
public function getAiInterviewCategoryList(array $params): array;
/**
* 获取AI面试类型下拉列表
* @return array
*/
public function getAiInterviewCategorySelectList(): array;
/**
* 创建AI面试类型
* @param array $params 创建参数
*/
public function createAiInterviewCategory(array $params): void;
/**
* 更新AI面试类型
* @param int $id 类型ID
* @param array $params 更新参数
*/
public function updateAiInterviewCategory(int $id, array $params): void;
/**
* 删除AI面试类型
* @param int $id 类型ID
*/
public function deleteAiInterviewCategory(int $id): void;
}

View File

@@ -11,6 +11,28 @@ interface AiInterviewQuestionInterface
*/
public function getAiInterviewQuestionList(array $params): array;
/**
* app获取面试题列表
* @param int $userId 用户ID
* @param array $params 查询参数
* @return array
*/
public function appGetAiInterviewQuestionList(int $userId, array $params): array;
/**
* 管理端获取面试题列表(平台方法):在通用列表基础上逐行附加音频生成状态 audio
* @param array $params 查询参数,同 getAiInterviewQuestionList
* @return array 同通用列表结构,行内新增 audio: ['status'=>string, 'audio_url'=>?string]
*/
public function adminGetAiInterviewQuestionList(array $params): array;
/**
* 管理端批量查询面试题音频生成状态(前端轮询使用):仅查询不触发合成
* @param array $questionIds 面试题ID列表
* @return array [面试题ID => ['status'=>queued|processing|success|failed|unknown, 'audio_url'=>?string]]
*/
public function getAiInterviewQuestionTtsStatus(array $questionIds): array;
/**
* 获取面试题详情
* @param int $id 面试题id

View File

@@ -27,11 +27,20 @@ interface CampusRelationInterface
public function getCategoriesByConditions(int $campusId, int $examTypeId, int $subjectId): array;
/**
* App 平台方法:指定地区+招考类型+科目下的题型分类树。
* App 平台方法:指定地区+招考类型下的题型分类树,可选按科目过滤。
* @param int $regionId 招考地区ID,0=全部
* @param int $examTypeId 招考类型ID
* @param int $subjectId 考试科目ID
* @param int $subjectId 考试科目ID,0=不限科目
* @return array
*/
public function appGetCategoriesByRegionExamTypeSubject(int $regionId, int $examTypeId, int $subjectId): array;
public function appGetCategoriesByRegionExamTypeSubject(int $regionId, int $examTypeId, int $subjectId = 0): array;
/**
* App 平台方法:按招考类型获取首页科目列表,并统计模拟/真题套卷总套数。
* @param int $examTypeId 招考类型ID
* @param int $regionId 招考地区ID,0=全部
* @param int $year 试卷年份,0=不限年份
* @return array 科目列表,每项附加 mock_total(模拟套数)、zhenti_total(真题套数)、total(总套数)
*/
public function appGetSubjectsByExamType(int $examTypeId, int $regionId = 0, int $year = 0): array;
}

View File

@@ -99,6 +99,13 @@ interface ExamServiceInterface
*/
public function submitWrongPractice(int $userId, array $params): array;
/**
* 错题练习抽题:按分类抽取用户当前错题(仅错题,不足 num 时全量返回),随机排序.
*
* @param array $params category_id 分类ID(模块根或知识点);num 抽题数量;get_correct 是否附带正确答案
*/
public function getWrongPracticeQuestions(array $params, int $userId): array;
/**
* 获取用户薄弱项(有错题且正确率低于阈值且正确率最低的模块;无则 null).
*

View File

@@ -58,6 +58,18 @@ interface PaperInterface
*/
public function getPaperQuestionList(int $paperId, bool $getCorrect = false, string $platform = 'admin'): array;
/**
* 设置卷内单题分值(后台试卷详情即时改分,只改本卷卷内分值)
* @param array $params ['paper_id' => int, 'question_id' => int, 'score' => float]
*/
public function setPaperQuestionScore(array $params): array;
/**
* 按分类批量设置卷内分值(设置分类总分,按该分类在本卷的题目数平均分配,末题吸收差额)
* @param array $params ['paper_id' => int, 'categories' => [['category_id' => int, 'total_score' => float], ...]]
*/
public function batchSetPaperQuestionScores(array $params): array;
/**
* 按年份统计试卷数量
* @param int $paperType 试卷类型

View File

@@ -14,6 +14,16 @@ interface QuestionInterface
*/
public function submitImportQuestion(array $params): array;
/**
* 只读校验解析暂存内容,返回逐题校验结果,不写库、不移动图片.
*/
public function previewImportQuestion(array $params): array;
/**
* 保存对解析暂存内容的修改,并返回最新暂存内容和逐题校验结果.
*/
public function updateImportQuestion(array $params): array;
/**
* 随机获取用户错题
* @param $userId 用户id
@@ -22,6 +32,11 @@ interface QuestionInterface
*/
public function getWrongQuestions(int $userId, int $num): array;
/**
* 获取用户错题,V2版本(基于 v1 getWrongQuestions,支持分类范围、数量、是否正确).
*/
public function getWrongQuestionsV2(array $params, int $userId): array;
public function getQuestionList(array $filters = []): array;
public function getQuestionDetail(int $id): array;
@@ -35,6 +50,29 @@ interface QuestionInterface
public function deleteQuestion(int $id): array;
/**
* 管理端题库新增题目:题库级录入(普通题目,不带材料)。
* @return array 统一外壳,data 为 ['id' => 新题目ID]
*/
public function adminCreateQuestion(array $data): array;
/**
* 管理端题目材料内容保存:仅更新关联材料内容,绑定关系不变。
* @return array 统一外壳,data 为 ['affected' => 受影响题目数]
*/
public function adminUpdateQuestionMaterial(int $id, string $content): array;
/**
* 管理端题目分页列表:支持题型/科目/分类/选项类型/状态/题干关键词/招考地区筛选。
*/
public function adminGetQuestionPage(array $filters): array;
/**
* 管理端题目字段级保存:白名单字段即时更新,含范围级联校验与判重指纹重算。
*/
public function adminUpdateQuestionFields(int $id, array $fields): array;
/**
* 刷题,批量提交用户答案
*/

View File

@@ -22,4 +22,9 @@ interface QuestionParseInterface
* 读取解析暂存数据,不确认导入且不移动图片。
*/
public function getQuestionParseByCode(string $code): array;
/**
* 修改解析暂存数据,仅允许未确认导入的批次按主键更新白名单字段。
*/
public function updateQuestionParseByCode(string $code, array $questionList, array $materialList): array;
}

View File

@@ -31,4 +31,17 @@ interface UserCurriculumVitaeInterface
* @return array
*/
public function deleteUserWorkExperience(int $userId, int $index): array;
/**
* 获取用户简历(V2:工作经历数组,含职称、资格证书、重要荣誉)
* @param int $userId 用户id
* @return array
*/
public function getCurriculumVitaeV2(int $userId): array;
/**
* 编辑用户简历(V2:工作经历数组,含职称、资格证书、重要荣誉)
* @param array $params 简历参数
* @param int $userId 用户id
* @return array
*/
public function editCurriculumVitaeV2(array $params, int $userId): array;
}