Compare commits
23 Commits
zd-feature
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88c1279f12 | ||
|
|
9eebc9d71d | ||
|
|
e05a640675 | ||
|
|
d28c3da6f8 | ||
| 7d13b700f1 | |||
| cba3c123c9 | |||
| c088a12166 | |||
| 4c0429489d | |||
|
|
3ef41a50ec | ||
|
|
7f0df32c25 | ||
|
|
70bb3f5468 | ||
|
|
2b19cbb512 | ||
| 66e467b452 | |||
| 121e1f72dc | |||
|
|
b86dc5715e | ||
|
|
75bb17b51a | ||
|
|
88ffa75eb5 | ||
|
|
2b2dcc0584 | ||
|
|
e4c509ebef | ||
|
|
9ae3b1f4b6 | ||
|
|
a8d5109a0a | ||
|
|
2f530d6595 | ||
|
|
328a5f1a66 |
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)生成并全局复用,同一题目并发只合成一次
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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).
|
||||
*
|
||||
|
||||
@@ -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 试卷类型
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
/**
|
||||
* 刷题,批量提交用户答案
|
||||
*/
|
||||
|
||||
@@ -22,4 +22,9 @@ interface QuestionParseInterface
|
||||
* 读取解析暂存数据,不确认导入且不移动图片。
|
||||
*/
|
||||
public function getQuestionParseByCode(string $code): array;
|
||||
|
||||
/**
|
||||
* 修改解析暂存数据,仅允许未确认导入的批次按主键更新白名单字段。
|
||||
*/
|
||||
public function updateQuestionParseByCode(string $code, array $questionList, array $materialList): array;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user