Compare commits

..

14 Commits

Author SHA1 Message Date
zj
0f3ede5741 新增按年份统计试卷数量 2026-08-14 15:07:37 +08:00
堂吉诃德拉曼查的英豪
ef8909f94b 用户契约新增反馈接口 2026-08-14 11:13:30 +08:00
堂吉诃德拉曼查的英豪
5b6a21e148 公告契约新增官网首页列表方法 2026-08-14 09:30:46 +08:00
zj
923d2987e3 增加AI面试批改相关接口 2026-08-13 19:49:43 +08:00
zj
2b8b21f497 update 2026-08-13 15:28:13 +08:00
zj
4e5ca7c017 update 2026-08-13 15:14:55 +08:00
zj
eb7d3bae5e update 2026-08-13 14:25:03 +08:00
zj
cca345b188 新增AI面试相关接口 2026-08-13 14:00:56 +08:00
zj
594fa66a4e 增加修改课程视频是否可下载接口 2026-08-13 10:42:00 +08:00
堂吉诃德拉曼查的英豪
d56b6cd206 Data/Exam 契约补充 App 招考地区级联平台方法 2026-08-12 15:00:27 +08:00
堂吉诃德拉曼查的英豪
0159960728 ExamService契约补齐V1考试类型/科目/题库兼容方法 2026-08-10 14:20:05 +08:00
zj
a5366fda86 错误修复 2026-08-10 14:04:28 +08:00
堂吉诃德拉曼查的英豪
84a118b5ea 补全考试答题错题聚合契约 2026-08-07 17:12:00 +08:00
堂吉诃德拉曼查的英豪
a9a26fe20f ExamService聚合补齐V1练习与考试兼容接口 2026-08-07 16:55:21 +08:00
18 changed files with 295 additions and 9 deletions

View File

@@ -1,7 +1,6 @@
<?php
use Dhd\Micro\Interface\ArticleService\ArticleService;
use function Hyperf\Support\env;
return [
// 对应消费者类的 $serviceName

View File

@@ -1,7 +1,6 @@
<?php
use Dhd\Micro\Interface\ExamService\ExamService;
use function Hyperf\Support\env;
return [
// 对应消费者类的 $serviceName

View File

@@ -8,7 +8,7 @@ return [
// 对应消费者类的 $serviceName
'name' => 'FileService',
// 服务接口名,可选,默认值等于 name 配置的值,如果 name 直接定义为接口类则可忽略此行配置,如 name 为字符串则需要配置 service 对应到接口类
'service' => \Dhd\Micro\Interface\FileService\FileServiceInterface::class,
'service' => \Dhd\Micro\Interface\FileService\FileService::class,
// 对应容器对象 ID,可选,默认值等于 service 配置的值,用来定义依赖注入的 key
// 'id' => \Dhd\Micro\Interface\FileService\FileServiceInterface::class,
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http

View File

@@ -1,7 +1,6 @@
<?php
use Dhd\Micro\Interface\NoticeService\NoticeService;
use function Hyperf\Support\env;
return [
// 对应消费者类的 $serviceName

View File

@@ -8,7 +8,7 @@ return [
// 对应消费者类的 $serviceName
'name' => 'WecheatMiniService',
// 服务接口名,可选,默认值等于 name 配置的值,如果 name 直接定义为接口类则可忽略此行配置,如 name 为字符串则需要配置 service 对应到接口类
'service' => \App\JsonRpcService\UserService\WecheatMiniService::class,
'service' => \Dhd\Micro\Interface\UserService\WecheatMiniService::class,
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http
// 可选 jsonrpc-http jsonrpc jsonrpc-tcp-length-check
'protocol' => 'jsonrpc-http',

View File

@@ -9,4 +9,5 @@ declare(strict_types=1);
namespace Dhd\Micro\Interface\AIService;
interface AIService extends
AiEssayCheckInterface {}
AiEssayCheckInterface,
AiInterviewCheckInterface {}

View File

@@ -0,0 +1,36 @@
<?php
/**
* AI面试批改相关接口
*/
declare(strict_types=1);
namespace Dhd\Micro\Interface\AIService;
interface AiInterviewCheckInterface
{
/**
* 获取用户批改记录
* @param int $userId 用户ID
* @param array $params 查询参数
* @return array
*/
public function getAiInterviewCheckHistoryList(int $userId, array $params): array;
/**
* 获取面试批改详情
* @param int $id 记录ID
* @return array|null
*/
public function getAiInterviewCheckDetail(int $id): ?array;
/**
* 提交面试批改
* @param int $userId 用户ID
* @param array $params 提交参数
* @return int 记录ID
*/
public function submitAiInterviewCheck(int $userId, array $params): int;
}

View File

@@ -65,4 +65,12 @@ interface CourseVideoInterface
* @param int $userId 用户ID
*/
public function addVideoBrowse(int $id, int $userId);
/**
* 修改课程视频是否可下载
* @param int $id 课程视频ID
* @param int $canDownload 是否可下载 0-不可下载 1-可下载
* @return void
*/
public function updateCanDownload(int $id, int $canDownload): void;
}

View File

@@ -37,6 +37,15 @@ interface ExamTypeSubjectInterface
*/
public function getSubjectsByRegionExamType(int $regionId, int $examTypeId): array;
/**
* App 平台方法:指定地区+招考类型下的科目列表。
* region_id=0 聚合全部地区去重;具体地区同时包含通用关系(region_id=0)。
* @param int $regionId 招考地区ID,0=全部
* @param int $examTypeId 招考类型ID
* @return array
*/
public function appGetSubjectsByRegionExamType(int $regionId, int $examTypeId): array;
/**
* 获取多个适用地区共同可用的科目,避免调用方分别查询后自行求交集。
* @param int[] $regionIds

View File

@@ -34,6 +34,14 @@ interface RegionExamTypeInterface
*/
public function getExamTypesByRegion(int $regionId): array;
/**
* App 平台方法:指定地区可用的招考类型列表。
* 全国类型始终包含;地区专属类型仅返回该地区启用关系,展示名优先使用地区别名。
* @param int $regionId 招考地区ID,0=全部
* @return array
*/
public function appGetExamTypesByRegion(int $regionId): array;
/**
* 覆盖设置招考类型的适用地区(多选地区一次性写入)
* @param int $examTypeId 招考类型ID

View File

@@ -14,6 +14,13 @@ interface RegionInterface
public function appGetRegionCampus(int $id): array;
/**
* App 招考地区菜单(V2):首项固定 id=0/region_id=0 表示全部,不再输出历史全国值 1。
* @param array $params 兼容分页/过滤参数
* @return array
*/
public function appGetRegionsV2(array $params = []): array;
public function getRegionBy(int $id): array;
public function createRegion(array $data): int;

View File

@@ -0,0 +1,51 @@
<?php
declare(strict_types=1);
namespace Dhd\Micro\Interface\ExamService;
interface AiInterviewQuestionInterface
{
/**
* 获取面试题列表
* @param array $params 查询参数
* @return array
*/
public function getAiInterviewQuestionList(array $params): array;
/**
* 获取面试题详情
* @param int $id 面试题id
* @return array|null
*/
public function getAiInterviewQuestionDetail(int $id): ?array;
/**
* 创建面试题
* @param array $params 面试题参数
* @return void
*/
public function createAiInterviewQuestion(array $params): void;
/**
* 更新面试题
* @param int $id 面试题id
* @param array $params 面试题参数
*/
public function updateAiInterviewQuestion(int $id, array $params): void;
/**
* 删除面试题
* @param int $id 面试题id
* @return void
*/
public function deleteAiInterviewQuestion(int $id): void;
/**
* 随机获取一个问题
* @param int $examTypeId 考试类型
* @param int $interviewType 面试类型
* @return array|null
*/
public function getAiInterviewQuestionRandom(int $examTypeId, int $interviewType): ?array;
}

View File

@@ -11,8 +11,27 @@ interface CampusRelationInterface
*/
public function getCampusRelationData(int $campusId = 1, int $examTypeId = 1, int $subjectId = 1, int $userId = 0): array;
/**
* App 平台方法:首页级联数据(地区/招考类型/科目/题型分类)。
* @param int $regionId 招考地区ID,0=全部
* @param int $examTypeId 招考类型ID,0=不限制
* @param int $subjectId 考试科目ID,0=不限制
* @param int $userId 用户ID,0=未登录
* @return array
*/
public function appGetCampusRelationData(int $regionId = 0, int $examTypeId = 0, int $subjectId = 0, int $userId = 0): array;
/**
* 按条件获取题型分类树.
*/
public function getCategoriesByConditions(int $campusId, int $examTypeId, int $subjectId): array;
/**
* App 平台方法:指定地区+招考类型+科目下的题型分类树。
* @param int $regionId 招考地区ID,0=全部
* @param int $examTypeId 招考类型ID
* @param int $subjectId 考试科目ID
* @return array
*/
public function appGetCategoriesByRegionExamTypeSubject(int $regionId, int $examTypeId, int $subjectId): array;
}

View File

@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace Dhd\Micro\Interface\ExamService;
/**
* 试题中心聚合契约(管理后台使用范围)
* 试题中心聚合契约
*/
interface ExamService extends
CustomQuestionInterface,
@@ -17,7 +17,8 @@ interface ExamService extends
SmartPaperInterface,
CampusRelationInterface,
PaperImportInterface,
QuestionNoteInterface
QuestionNoteInterface,
AiInterviewQuestionInterface
{
/**
* 开始做卷.
@@ -33,4 +34,94 @@ interface ExamService extends
* 获取用户试卷记录列表.
*/
public function getUserPaperList(array $params, int $userId): array;
/**
* 获取练习列表.
*/
public function getPracticeList(int $userId): array;
/**
* 获取练习详情.
*/
public function getPracticeDetail(int $userId, int $id): array;
/**
* 提交练习答案.
*/
public function submitPractice(int $userId, int $paperId, array $answers): array;
/**
* 开始考试.
*/
public function startExam(array $params): array;
/**
* 提交考试.
*/
public function submitExam(array $params): array;
/**
* 获取用户考试记录列表.
*/
public function getUserExamRecords(array $params): array;
/**
* 获取考试记录详情.
*/
public function getExamRecordDetail(int $recordId, int $userId): array;
/**
* 获取考试记录题目列表.
*/
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;
/**
* 获取考试类型列表(V1 兼容接口).
*/
public function getExamTypeList(array $params): array;
/**
* 获取考试类型详情(V1 兼容接口).
*/
public function getExamTypeDetail(int $id): array;
/**
* 获取科目列表(V1 兼容接口).
*/
public function getSubjectList(array $params): array;
/**
* 获取题库列表(V1 兼容接口).
*/
public function getQuestionStoreList(array $params): array;
}

View File

@@ -57,4 +57,13 @@ interface PaperInterface
* 获取试卷的题目列表
*/
public function getPaperQuestionList(int $paperId, bool $getCorrect = false, string $platform = 'admin'): array;
/**
* 按年份统计试卷数量
* @param int $paperType 试卷类型
* @param int $campusId 校区ID
* @param int $examTypeId 考试类型ID
* @return array 统计结果
*/
public function getPaperTotalByYear(int $paperType, int $campusId, int $examTypeId): array;
}

View File

@@ -15,6 +15,8 @@ interface NoticeServiceInterface
public function officialGetAllList(array $params): array;
public function officialGetHomeList(array $params): array;
public function adminGetList(array $params): array;
public function detail(int $id, ?int $userId = null): array;

View File

@@ -0,0 +1,47 @@
<?php
/**
* 用户反馈服务接口
*/
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\user;
interface FeedbackInterface
{
/**
* App提交反馈
* @param array $params ['user_id' => int, 'content' => string, 'images' => array, 'contact_phone' => string]
* @return array ['id' => int]
*/
public function submitFeedback(array $params): array;
/**
* App我的反馈列表
* @param array $params ['user_id' => int, 'page' => int, 'size' => int]
* @return array ['list' => array, 'page' => int, 'size' => int, 'total' => int]
*/
public function getFeedbackList(array $params): array;
/**
* 后台反馈列表
* @param array $params ['status' => int, 'keyword' => string, 'contact_phone' => string, 'page' => int, 'size' => int]
* @return array ['list' => array, 'page' => int, 'size' => int, 'total' => int]
*/
public function adminGetFeedbackList(array $params): array;
/**
* 后台反馈详情
* @param int $id 反馈ID
* @return array
*/
public function adminGetFeedbackDetail(int $id): array;
/**
* 后台处理反馈
* @param int $id 反馈ID
* @param int $handlerId 处理人ID(管理员ID)
* @param array $params ['status' => int, 'handle_note' => string]
* @return bool
*/
public function adminHandleFeedback(int $id, int $handlerId, array $params): bool;
}

View File

@@ -12,4 +12,5 @@ interface UserService extends
\Dhd\Micro\Interface\UserService\JsonRpcInterface\user\UserInfoCheckInterface,
\Dhd\Micro\Interface\UserService\JsonRpcInterface\user\UserCurriculumVitaeInterface,
\Dhd\Micro\Interface\UserService\JsonRpcInterface\UserDownloadRecordInterface,
\Dhd\Micro\Interface\UserService\JsonRpcInterface\user\StudentScoreInterface {}
\Dhd\Micro\Interface\UserService\JsonRpcInterface\user\StudentScoreInterface,
\Dhd\Micro\Interface\UserService\JsonRpcInterface\user\FeedbackInterface {}