Compare commits
58 Commits
| 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 | ||
|
|
7f258560a4 | ||
|
|
9e3b6a400d | ||
|
|
bfe41c4b99 | ||
|
|
7e13db52bf | ||
|
|
885316c990 | ||
|
|
a2b3310860 | ||
| a0194a8d38 | |||
| 25bfb2aeea | |||
|
|
e1a0a2b638 | ||
|
|
4bf1c1fe56 | ||
| b2109af8a6 | |||
| 033ffc1acf | |||
| 058cf9b355 | |||
|
|
783888f12f | ||
|
|
ffcabc9369 | ||
| 6666307ce1 | |||
| 3a6983f9ac | |||
| 3fe6ef47b1 | |||
| 3ad0eb4824 | |||
| e768dfcbc3 | |||
| 716032432b | |||
| 2c1e4b2327 | |||
|
|
9d191c2875 | ||
|
|
89143b1cdd | ||
|
|
a038c07fbd | ||
|
|
94352fef12 | ||
| b9f70e9f1b | |||
| a118057cac | |||
| 443a4a4c29 | |||
|
|
397641cf52 | ||
| 5c229c226f | |||
| 4a257dfddb | |||
| d78e41e73e | |||
|
|
68e7f20c9c | ||
| 59dfc89c4c |
66
consumers/pg_service.php
Normal file
66
consumers/pg_service.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* This file is part of Hyperf.
|
||||
*
|
||||
* @link https://www.hyperf.io
|
||||
* @document https://hyperf.wiki
|
||||
* @contact group@hyperf.io
|
||||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||
*/
|
||||
use Dhd\Micro\Interface\PgService\PgService;
|
||||
|
||||
return [
|
||||
// 对应消费者类的 $serviceName
|
||||
'name' => 'PgService',
|
||||
// 服务接口名,可选,默认值等于 name 配置的值,如果 name 直接定义为接口类则可忽略此行配置,如 name 为字符串则需要配置 service 对应到接口类
|
||||
'service' => PgService::class,
|
||||
// 对应容器对象 ID,可选,默认值等于 service 配置的值,用来定义依赖注入的 key
|
||||
// 'id' => \App\JsonRpc\File\FileServiceInterface::class,
|
||||
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http
|
||||
// 可选 jsonrpc-http jsonrpc jsonrpc-tcp-length-check
|
||||
'protocol' => 'jsonrpc-http',
|
||||
// 负载均衡算法,可选,默认值为 random
|
||||
'load_balancer' => 'random',
|
||||
// 这个消费者要从哪个服务中心获取节点信息,如不配置则不会从服务中心获取节点信息
|
||||
'registry' => [
|
||||
'protocol' => env('CONSUMERS_PROTOCOL', 'nacos'),
|
||||
'address' => env('CONSUMERS_ADDRESS', 'http://192.168.28.199:8848'),
|
||||
],
|
||||
// 'nodes' => [
|
||||
// [
|
||||
// 'host' => env('NOTICE_SERVICE_HOST', '127.0.0.1'),
|
||||
// 'port' => env('NOTICE_SERVICE_PORT', 9610),
|
||||
// ],
|
||||
// ],
|
||||
// 配置项,会影响到 Packer 和 Transporter
|
||||
'options' => [
|
||||
'connect_timeout' => 5.0,
|
||||
'recv_timeout' => 5.0,
|
||||
'settings' => [
|
||||
// 根据协议不同,区分配置
|
||||
'open_eof_split' => true,
|
||||
'package_eof' => "\r\n",
|
||||
// 'open_length_check' => true,
|
||||
// 'package_length_type' => 'N',
|
||||
// 'package_length_offset' => 0,
|
||||
// 'package_body_offset' => 4,
|
||||
],
|
||||
// 重试次数,默认值为 2,收包超时不进行重试。暂只支持 JsonRpcPoolTransporter
|
||||
'retry_count' => 2,
|
||||
// 重试间隔,毫秒
|
||||
'retry_interval' => 100,
|
||||
// 使用多路复用 RPC 时的心跳间隔,null 为不触发心跳
|
||||
'heartbeat' => 30,
|
||||
// 当使用 JsonRpcPoolTransporter 时会用到以下配置
|
||||
'pool' => [
|
||||
'min_connections' => 1,
|
||||
'max_connections' => 32,
|
||||
'connect_timeout' => 10.0,
|
||||
'wait_timeout' => 3.0,
|
||||
'heartbeat' => -1,
|
||||
'max_idle_time' => 60.0,
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -10,4 +10,5 @@ namespace Dhd\Micro\Interface\AIService;
|
||||
|
||||
interface AIService extends
|
||||
AiEssayCheckInterface,
|
||||
AiInterviewCheckInterface {}
|
||||
AiInterviewCheckInterface,
|
||||
AiInterviewTtsInterface {}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -33,4 +33,18 @@ interface AiInterviewCheckInterface
|
||||
* @return int 记录ID
|
||||
*/
|
||||
public function submitAiInterviewCheck(int $userId, array $params): int;
|
||||
|
||||
/**
|
||||
* 获取面试题所有考试类型列表
|
||||
* @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;
|
||||
}
|
||||
|
||||
56
src/AIService/AiInterviewTtsInterface.php
Normal file
56
src/AIService/AiInterviewTtsInterface.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AI面试朗读(TTS)相关接口
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\AIService;
|
||||
|
||||
interface AiInterviewTtsInterface
|
||||
{
|
||||
/**
|
||||
* 朗读面试题(文字转语音):懒生成并缓存,已存在则直接返回已有音频
|
||||
* 音频按题目(question_id)生成并全局复用
|
||||
* @param array $params 参数,['question_id'=>面试题ID]
|
||||
*/
|
||||
public function interviewTtsAudio(array $params): array;
|
||||
|
||||
/**
|
||||
* 查询面试题是否已生成音频,仅查缓存不触发合成(供取题接口附带音频使用)
|
||||
* @param int $questionId 面试题ID
|
||||
*/
|
||||
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)生成并全局复用,同一题目并发只合成一次
|
||||
* @param array $params 参数,['question_id'=>面试题ID]
|
||||
*/
|
||||
public function submitInterviewTts(array $params): array;
|
||||
|
||||
/**
|
||||
* 同步面试题音频(后台创建/编辑题目后调用):按题干内容哈希判断是否已生成,
|
||||
* 内容未变跳过,内容变化或首次生成则投递队列后台合成
|
||||
* @param array $params 参数,['question_id'=>面试题ID, 'content'=>题干内容]
|
||||
* 返回 ['question_id'=>int, 'status'=>success|queued]
|
||||
*/
|
||||
public function syncInterviewQuestionTts(array $params): array;
|
||||
|
||||
/**
|
||||
* 查询朗读任务状态(供前端轮询使用)
|
||||
* @param int $questionId 面试题ID
|
||||
* 返回 ['question_id'=>int, 'status'=>queued|processing|success|failed|unknown, 'url'=>?string]
|
||||
*/
|
||||
public function getInterviewTtsStatus(int $questionId): array;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
// 类型
|
||||
@@ -36,6 +37,12 @@ interface ArticleService
|
||||
public function unbindCategoryTypes(int $categoryId, array $typeIds): bool;
|
||||
public function getCategoryBoundTypes(int $categoryId): array;
|
||||
|
||||
// 标签相关
|
||||
public function createTag(array $data): int;
|
||||
public function updateTag(int $id, array $data): bool;
|
||||
public function deleteTag(int $id): bool;
|
||||
public function getTagList(array $params = []): array;
|
||||
|
||||
// 附件
|
||||
public function createAttachment(array $data): int;
|
||||
public function updateAttachment(int $id, array $data): bool;
|
||||
@@ -65,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
|
||||
|
||||
@@ -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<int>, route_path?:string, config_name?:string}
|
||||
*/
|
||||
public function appGetConfigList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取配置列表
|
||||
* @param string $platform 配置所属平台
|
||||
|
||||
@@ -10,6 +10,7 @@ interface DataService extends
|
||||
DataServiceInterface,
|
||||
AgreementInterface,
|
||||
ConfigInterface,
|
||||
HotSearchInterface,
|
||||
AppVersionInterface,
|
||||
RecruitUnitInterface,
|
||||
CampusRelationInterface,
|
||||
|
||||
19
src/DataService/HotSearchInterface.php
Normal file
19
src/DataService/HotSearchInterface.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Dhd\Micro\Interface\DataService;
|
||||
|
||||
interface HotSearchInterface
|
||||
{
|
||||
/**
|
||||
* 记录搜索行为(热搜统计数据源,仅记录不返回榜单)
|
||||
* @param array $params 包含:platform 平台、keyword 关键词、user_id 用户ID(未登录0)、result_count 聚合搜索结果数
|
||||
*/
|
||||
public function recordSearchKeyword(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取热搜词列表:运营置顶词优先,其后为近7天真实搜索热度词
|
||||
* @param string $platform 平台
|
||||
* @param int $limit 获取数量
|
||||
*/
|
||||
public function getHotSearchList(string $platform = 'app', int $limit = 10): array;
|
||||
}
|
||||
@@ -4,10 +4,28 @@ declare(strict_types=1);
|
||||
|
||||
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;
|
||||
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\GufenPaperInterface;
|
||||
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\QuestionInterface;
|
||||
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\QuestionTypeInterface;
|
||||
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\QuestionCategoryInterface;
|
||||
use Dhd\Micro\Interface\ExamService\JsonRpcInterface\SmartPaperInterface;
|
||||
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,
|
||||
GufenPaperInterface,
|
||||
@@ -18,110 +36,5 @@ interface ExamService extends
|
||||
CampusRelationInterface,
|
||||
PaperImportInterface,
|
||||
QuestionNoteInterface,
|
||||
AiInterviewQuestionInterface
|
||||
{
|
||||
/**
|
||||
* 开始做卷.
|
||||
*/
|
||||
public function startDoPaper(int $userId, int $paperId): array;
|
||||
|
||||
/**
|
||||
* 获取用户试卷详情.
|
||||
*/
|
||||
public function getUserPaperDetail(int $paperRecordId, bool $getCorrect): array;
|
||||
|
||||
/**
|
||||
* 获取用户试卷记录列表.
|
||||
*/
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface AiInterviewQuestionInterface
|
||||
{
|
||||
@@ -13,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
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface CampusRelationInterface
|
||||
{
|
||||
@@ -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;
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface CustomQuestionInterface
|
||||
{
|
||||
28
src/ExamService/JsonRpcInterface/DailyPracticeInterface.php
Normal file
28
src/ExamService/JsonRpcInterface/DailyPracticeInterface.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface DailyPracticeInterface
|
||||
{
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
146
src/ExamService/JsonRpcInterface/ExamServiceInterface.php
Normal file
146
src/ExamService/JsonRpcInterface/ExamServiceInterface.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
/**
|
||||
* 试题中心聚合契约
|
||||
*/
|
||||
interface ExamServiceInterface
|
||||
{
|
||||
/**
|
||||
* 获取练习列表.
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
* 获取错题记录首页统计(总错题数、顽固错题数、模块错题数与正确率、薄弱项).
|
||||
*/
|
||||
public function appGetWrongRecordStats(int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取错题记录模块明细(模块错题数与正确率、二级知识点错题数).
|
||||
*/
|
||||
public function appGetWrongRecordModuleDetail(int $userId, int $categoryId): array;
|
||||
|
||||
/**
|
||||
* 获取错题记录首页明细(融合首页统计与各模块知识点明细,一次返回).
|
||||
*/
|
||||
public function appGetWrongRecordDetail(int $userId): array;
|
||||
|
||||
/**
|
||||
* 提交错题记录发起的专项练习(写做题记录并更新错题,返回判分结果与正确率对比).
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* 用于首页弹窗「薄弱项:{模块名}正确率低 → 攻克它 → 专项刷题」,
|
||||
* 以及错题记录页面薄弱项展示;与错题记录首页统计字段 weak_category 同口径.
|
||||
*/
|
||||
public function appGetWeakPoint(int $userId): ?array;
|
||||
|
||||
/**
|
||||
* 获取考试类型列表(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;
|
||||
|
||||
/**
|
||||
* 提交题目答案,根据试卷类型自动选择智能组卷或普通试卷逻辑.
|
||||
*/
|
||||
public function submitAnswer(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 提交用户试卷,根据试卷类型自动选择智能组卷或普通试卷逻辑.
|
||||
*/
|
||||
public function submitUserPaper(array $params): array;
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface GufenPaperInterface
|
||||
{
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface PaperImportInterface
|
||||
{
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface PaperInterface
|
||||
{
|
||||
@@ -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 试卷类型
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface QuestionCategoryInterface
|
||||
{
|
||||
138
src/ExamService/JsonRpcInterface/QuestionInterface.php
Normal file
138
src/ExamService/JsonRpcInterface/QuestionInterface.php
Normal file
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface QuestionInterface
|
||||
{
|
||||
//搜索题库
|
||||
public function searchQuestion(array $params): array;
|
||||
|
||||
/**
|
||||
* 根据code确认导入题目,保存到题库.
|
||||
*/
|
||||
public function submitImportQuestion(array $params): array;
|
||||
|
||||
/**
|
||||
* 只读校验解析暂存内容,返回逐题校验结果,不写库、不移动图片.
|
||||
*/
|
||||
public function previewImportQuestion(array $params): array;
|
||||
|
||||
/**
|
||||
* 保存对解析暂存内容的修改,并返回最新暂存内容和逐题校验结果.
|
||||
*/
|
||||
public function updateImportQuestion(array $params): array;
|
||||
|
||||
/**
|
||||
* 随机获取用户错题
|
||||
* @param $userId 用户id
|
||||
* @param $num 获取数量
|
||||
* @return array
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
* APP移动端获取题目详情
|
||||
*/
|
||||
public function appGetQuestionDetail(int $id): array;
|
||||
|
||||
public function editQuestion(array $data): array;
|
||||
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* 刷题,批量提交用户答案
|
||||
*/
|
||||
public function submitUserAnswer(array $answerList, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取刷题,排除估分考卷题目、做对的题
|
||||
*/
|
||||
public function getExerciseQuestionList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取用户刷题记录
|
||||
*/
|
||||
public function getUserQuestionRecordList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取用户刷题记录详情
|
||||
*/
|
||||
public function getUserQuestionRecordDetailList(string $dateTime, int $userId): array;
|
||||
|
||||
//材料写作型题目编辑
|
||||
public function editSubjectiveQuestion(array $data): array;
|
||||
|
||||
//材料写作型材料编辑
|
||||
public function editSubjectiveMaterial(array $data): array;
|
||||
|
||||
//删除材料,仅限试卷里删除
|
||||
public function deleteMaterial(int $id): array;
|
||||
|
||||
/**
|
||||
* 刷题,批量提交用户答案
|
||||
* V2版本
|
||||
* @param int $userId 用户ID
|
||||
* @param array $params 参数
|
||||
* @return array
|
||||
*/
|
||||
public function submitUserAnswerV2(int $userId, array $params): array;
|
||||
|
||||
/**
|
||||
* 获取用户刷题记录
|
||||
* V2版本
|
||||
* @param array $params 参数
|
||||
* @param int $userId 用户ID
|
||||
* @return array
|
||||
*/
|
||||
public function getUserQuestionRecordListV2(int $userId, array $params): array;
|
||||
|
||||
/**
|
||||
* 获取用户刷题记录详情,V2版本
|
||||
* @param string $testCode 刷题代码
|
||||
* @param int $userId 用户ID
|
||||
* @return array
|
||||
*/
|
||||
public function getUserQuestionRecordDetailListV2(string $testCode, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取刷题题目,V2版本(原抽题方式,无 success 包装)
|
||||
* @param array $params 参数(num/category_id/parent_category_id/campus_id/exam_type_id/subject_id/test_type/is_fast/get_correct)
|
||||
* @param int $userId 用户ID
|
||||
* @return array 题目列表
|
||||
*/
|
||||
public function getExerciseQuestionListV2(array $params, int $userId): array;
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface QuestionNoteInterface
|
||||
{
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface QuestionTypeInterface
|
||||
{
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface SmartPaperInterface
|
||||
{
|
||||
@@ -22,21 +22,6 @@ interface SmartPaperInterface
|
||||
*/
|
||||
public function getUserSmartPaperDetail(int $paperRecordId, bool $getCorrect): array;
|
||||
|
||||
/**
|
||||
* 提交题目答案
|
||||
* @param array $params 参数:paper_record_id, question_id, user_answer, used_time
|
||||
* @param int $userId 用户ID
|
||||
* @return array
|
||||
*/
|
||||
public function submitAnswer(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 提交用户试卷
|
||||
* @param array $params 参数:paper_record_id, used_time
|
||||
* @return array
|
||||
*/
|
||||
public function submitUserPaper(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取用户试卷历史列表
|
||||
* @param array $params 参数:campus_id, exam_type_id, page, limit
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface UserPaperInterface
|
||||
{
|
||||
@@ -11,16 +11,6 @@ interface UserPaperInterface
|
||||
*/
|
||||
public function startDoPaper(int $userId, int $paperId): array;
|
||||
|
||||
/**
|
||||
* 提交题目答案
|
||||
*/
|
||||
public function submitAnswer(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 提交用户试卷
|
||||
*/
|
||||
public function submitUserPaper(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取用户试卷详情
|
||||
*/
|
||||
@@ -30,4 +20,12 @@ interface UserPaperInterface
|
||||
* 获取用户试卷记录列表
|
||||
*/
|
||||
public function getUserPaperList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取用户试卷记录列表,V2
|
||||
* @param int $userId 用户ID
|
||||
* @param array $params 参数
|
||||
* @return array
|
||||
*/
|
||||
public function getUserPaperListV2(int $userId, array $params): array;
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
|
||||
interface QuestionInterface
|
||||
{
|
||||
//搜索题库
|
||||
public function searchQuestion(array $params): array;
|
||||
|
||||
/**
|
||||
* 根据code确认导入题目,保存到题库.
|
||||
*/
|
||||
public function submitImportQuestion(array $params): array;
|
||||
|
||||
/**
|
||||
* 随机获取用户错题
|
||||
* @param $userId 用户id
|
||||
* @param $num 获取数量
|
||||
* @return array
|
||||
*/
|
||||
public function getWrongQuestions(int $userId, int $num): array;
|
||||
|
||||
public function getQuestionList(array $filters = []): array;
|
||||
|
||||
public function getQuestionDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* APP移动端获取题目详情
|
||||
*/
|
||||
public function appGetQuestionDetail(int $id): array;
|
||||
|
||||
public function editQuestion(array $data): array;
|
||||
|
||||
public function deleteQuestion(int $id): array;
|
||||
|
||||
/**
|
||||
* 刷题,批量提交用户答案
|
||||
*/
|
||||
public function submitUserAnswer(array $answerList, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取刷题,排除估分考卷题目、做对的题
|
||||
*/
|
||||
public function getExerciseQuestionList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取用户刷题记录
|
||||
*/
|
||||
public function getUserQuestionRecordList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取用户刷题记录详情
|
||||
*/
|
||||
public function getUserQuestionRecordDetailList(string $dateTime, int $userId): array;
|
||||
|
||||
//材料写作型题目编辑
|
||||
public function editSubjectiveQuestion(array $data): array;
|
||||
|
||||
//材料写作型材料编辑
|
||||
public function editSubjectiveMaterial(array $data): array;
|
||||
|
||||
//删除材料,仅限试卷里删除
|
||||
public function deleteMaterial(int $id): array;
|
||||
}
|
||||
@@ -27,4 +27,10 @@ interface FileServiceInterface
|
||||
* 获取文件列表
|
||||
*/
|
||||
public function getFileList(array $params): array;
|
||||
|
||||
/**
|
||||
* 保存二进制(base64)文件,用于服务端生成的文件
|
||||
* @param array $params 参数,如 ['base64'=>.., 'file_name'=>.., 'file_type'=>.., 'group_id'=>.., 'channel'=>.., 'uploader_id'=>..]
|
||||
*/
|
||||
public function saveBase64File(array $params): array;
|
||||
}
|
||||
|
||||
@@ -22,4 +22,9 @@ interface QuestionParseInterface
|
||||
* 读取解析暂存数据,不确认导入且不移动图片。
|
||||
*/
|
||||
public function getQuestionParseByCode(string $code): array;
|
||||
|
||||
/**
|
||||
* 修改解析暂存数据,仅允许未确认导入的批次按主键更新白名单字段。
|
||||
*/
|
||||
public function updateQuestionParseByCode(string $code, array $questionList, array $materialList): array;
|
||||
}
|
||||
|
||||
61
src/PgService/JsonRpcInterface/BaseData/StudentInterface.php
Normal file
61
src/PgService/JsonRpcInterface/BaseData/StudentInterface.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\PgService\JsonRpcInterface\BaseData;
|
||||
|
||||
interface StudentInterface
|
||||
{
|
||||
/**
|
||||
* 获取学生分页列表
|
||||
* @param array $params 请求参数
|
||||
* @return array
|
||||
*/
|
||||
public function getStudentPageList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取学生信息详情
|
||||
* @param int $studentId 学生ID
|
||||
* @return array
|
||||
*/
|
||||
public function getStudentDetail(int $studentId): ?array;
|
||||
|
||||
/**
|
||||
* APP获取学生信息
|
||||
* @param int $userId 用户ID
|
||||
* @return array
|
||||
*/
|
||||
public function appGetCrmStudentDetail(int $userId): array;
|
||||
|
||||
/**
|
||||
* 更新学生座位号
|
||||
* @param int $studentId 学生ID
|
||||
* @param int $seatNo 座位号
|
||||
* @return void
|
||||
*/
|
||||
public function updateStudentSeatNo(int $studentId, int $seatNo): void;
|
||||
|
||||
|
||||
/**
|
||||
* 更新学生分校
|
||||
* @param int $studentId 学生ID
|
||||
* @param int $schoolId 学校ID
|
||||
* @return void
|
||||
*/
|
||||
public function updateStudentSchool(int $studentId, int $schoolId): void;
|
||||
|
||||
/**
|
||||
* 获取学员分校下拉列表
|
||||
* @param string $mobile 手机号
|
||||
* @return array
|
||||
*/
|
||||
public function getStudentSchoolSelectList(string $mobile): array;
|
||||
|
||||
/**
|
||||
* 更新学生姓名
|
||||
* @param int $studentId 学生ID
|
||||
* @param string $name 姓名
|
||||
* @return void
|
||||
*/
|
||||
public function updateStudentName(int $studentId, string $name): void;
|
||||
}
|
||||
14
src/PgService/JsonRpcInterface/Crm/SchoolInterface.php
Normal file
14
src/PgService/JsonRpcInterface/Crm/SchoolInterface.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\PgService\JsonRpcInterface\Crm;
|
||||
|
||||
interface SchoolInterface
|
||||
{
|
||||
/**
|
||||
* 获取学校下拉列表
|
||||
* @return array
|
||||
*/
|
||||
public function getSchoolSelectList(): array;
|
||||
}
|
||||
59
src/PgService/JsonRpcInterface/PgPaperInterface.php
Normal file
59
src/PgService/JsonRpcInterface/PgPaperInterface.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\PgService\JsonRpcInterface;
|
||||
|
||||
interface PgPaperInterface
|
||||
{
|
||||
/**
|
||||
* 获取试卷分页列表
|
||||
* @param array $params 请求参数
|
||||
* @return array
|
||||
*/
|
||||
public function getPgPaperPageList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取试卷详情
|
||||
* @param int $id 试卷id
|
||||
* @return array
|
||||
*/
|
||||
public function getPgPaperDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 创建试卷及答案配置
|
||||
* @param array $params 请求参数
|
||||
* @return void
|
||||
*/
|
||||
public function createPgPaper(array $params): void;
|
||||
|
||||
/**
|
||||
* 更新试卷及答案配置
|
||||
* @param int $paperId 试卷ID
|
||||
* @param array $params 请求参数
|
||||
* @return void
|
||||
*/
|
||||
public function updatePgPaper(int $paperId, array $params): void;
|
||||
|
||||
/**
|
||||
* 删除试卷
|
||||
* @param int $id 试卷id
|
||||
* @return void
|
||||
*/
|
||||
public function deletePgPaper(int $id): void;
|
||||
|
||||
/**
|
||||
* 删除章节或答案配置
|
||||
* @param int $id 章节或答案配置id
|
||||
* @return void
|
||||
*/
|
||||
public function deletePgPaperAnswer(int $id): void;
|
||||
|
||||
/**
|
||||
* app获取试卷分页列表
|
||||
* @param int $userId 用户id
|
||||
* @param array $params 请求参数
|
||||
* @return array
|
||||
*/
|
||||
public function appGetPaperPageList(int $userId, array $params): array;
|
||||
}
|
||||
43
src/PgService/JsonRpcInterface/PgPhaseInterface.php
Normal file
43
src/PgService/JsonRpcInterface/PgPhaseInterface.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\PgService\JsonRpcInterface;
|
||||
|
||||
interface PgPhaseInterface
|
||||
{
|
||||
/**
|
||||
* 获取阶段分页列表
|
||||
* @param array $params 请求参数
|
||||
* @return array
|
||||
*/
|
||||
public function getPgPhasePageList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取阶段下拉列表
|
||||
* @return array
|
||||
*/
|
||||
public function getPgPhaseSelectList(): array;
|
||||
|
||||
/**
|
||||
* 创建阶段
|
||||
* @param array $params 请求参数
|
||||
* @return void
|
||||
*/
|
||||
public function createPgPhase(array $params): void;
|
||||
|
||||
/**
|
||||
* 更新阶段
|
||||
* @param int $id 阶段ID
|
||||
* @param array $params 请求参数
|
||||
* @return void
|
||||
*/
|
||||
public function updatePgPhase(int $id, array $params): void;
|
||||
|
||||
/**
|
||||
* 删除阶段
|
||||
* @param int $id 阶段ID
|
||||
* @return void
|
||||
*/
|
||||
public function deletePgPhase(int $id): void;
|
||||
}
|
||||
43
src/PgService/JsonRpcInterface/PgSubjectInterface.php
Normal file
43
src/PgService/JsonRpcInterface/PgSubjectInterface.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\PgService\JsonRpcInterface;
|
||||
|
||||
interface PgSubjectInterface
|
||||
{
|
||||
/**
|
||||
* 获取学科分页列表
|
||||
* @param array $params 请求参数
|
||||
* @return array
|
||||
*/
|
||||
public function getPgSubjectPageList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取学科下拉列表
|
||||
* @return array
|
||||
*/
|
||||
public function getPgSubjectSelectList(): array;
|
||||
|
||||
/**
|
||||
* 创建学科
|
||||
* @param array $params 请求参数
|
||||
* @return void
|
||||
*/
|
||||
public function createPgSubject(array $params): void;
|
||||
|
||||
/**
|
||||
* 更新学科
|
||||
* @param int $id 学科ID
|
||||
* @param array $params 请求参数
|
||||
* @return void
|
||||
*/
|
||||
public function updatePgSubject(int $id, array $params): void;
|
||||
|
||||
/**
|
||||
* 删除学科
|
||||
* @param int $id 学科ID
|
||||
* @return void
|
||||
*/
|
||||
public function deletePgSubject(int $id): void;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\PgService\JsonRpcInterface;
|
||||
|
||||
interface PgUserPaperRecordInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* App获取试卷章节列表
|
||||
* @param int $userId 用户id
|
||||
* @param int $paperId 试卷id
|
||||
* @return array
|
||||
*/
|
||||
public function appGetPgPaperSectionList(int $userId, int $paperId): array;
|
||||
|
||||
/**
|
||||
* App获取试卷章节详情
|
||||
* @param int $userId 用户id
|
||||
* @param int $sectionId 章节id
|
||||
* @return array
|
||||
*/
|
||||
public function appGetPgPaperSectionDetail(int $userId, int $sectionId): array;
|
||||
|
||||
/**
|
||||
* 获取用户答题卡记录分页列表
|
||||
* @param int $userId 用户id
|
||||
* @param array $params 查询参数
|
||||
* @return array
|
||||
*/
|
||||
public function appGetPgPaperHistory(int $userId, array $params): array;
|
||||
|
||||
/**
|
||||
* 获取用户学习统计数据
|
||||
* @param int $userId 用户id
|
||||
* @return array
|
||||
*/
|
||||
public function getPgUserTotal(int $userId): array;
|
||||
|
||||
/**
|
||||
* 用户提交答题卡
|
||||
* @param int $userId 用户id
|
||||
* @param array $params 答题卡数据
|
||||
* @return void
|
||||
*/
|
||||
public function submitPgUserPaper(int $userId, array $params): void;
|
||||
|
||||
/**
|
||||
* APP获取试卷详情
|
||||
* @param int $userId 用户id
|
||||
* @param int $paperId 试卷id
|
||||
* @return array
|
||||
*/
|
||||
public function appGetPgPaperDetail(int $userId, int $paperId): array;
|
||||
|
||||
/**
|
||||
* 删除用户答题记录
|
||||
* @param int $userId 用户id
|
||||
* @param int $paperId 试卷id
|
||||
* @param int $sectionId 章节id
|
||||
* @return void
|
||||
*/
|
||||
public function deleteUserPaperRecord(int $userId, int $paperId, int $sectionId = 0): void;
|
||||
}
|
||||
20
src/PgService/PgService.php
Normal file
20
src/PgService/PgService.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\PgService;
|
||||
|
||||
use Dhd\Micro\Interface\PgService\JsonRpcInterface\Crm\SchoolInterface;
|
||||
use Dhd\Micro\Interface\PgService\JsonRpcInterface\PgPaperInterface;
|
||||
use Dhd\Micro\Interface\PgService\JsonRpcInterface\PgSubjectInterface;
|
||||
use Dhd\Micro\Interface\PgService\JsonRpcInterface\PgPhaseInterface;
|
||||
use Dhd\Micro\Interface\PgService\JsonRpcInterface\PgUserPaperRecordInterface;
|
||||
use Dhd\Micro\Interface\PgService\JsonRpcInterface\BaseData\StudentInterface;
|
||||
|
||||
interface PgService extends
|
||||
SchoolInterface,
|
||||
PgPaperInterface,
|
||||
PgSubjectInterface,
|
||||
PgPhaseInterface,
|
||||
PgUserPaperRecordInterface,
|
||||
StudentInterface {}
|
||||
@@ -41,7 +41,7 @@ interface FeedbackInterface
|
||||
* @param int $id 反馈ID
|
||||
* @param int $handlerId 处理人ID(管理员ID)
|
||||
* @param array $params ['status' => int, 'handle_note' => string]
|
||||
* @return bool
|
||||
* @return array
|
||||
*/
|
||||
public function adminHandleFeedback(int $id, int $handlerId, array $params): bool;
|
||||
public function adminHandleFeedback(int $id, int $handlerId, array $params): array;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,29 @@ interface LoginServiceInterface
|
||||
*/
|
||||
public function wxBindUser(string $bindId, string $phone, string $smsCode, string $ip): array;
|
||||
|
||||
/**
|
||||
* 微信解绑
|
||||
* @param int $uid 用户ID
|
||||
* @return array
|
||||
*/
|
||||
public function wxUnbind(int $uid): array;
|
||||
|
||||
/**
|
||||
* 微信换绑
|
||||
* @param int $uid 用户ID
|
||||
* @param string $code 微信授权code
|
||||
* @param string $ip ip地址
|
||||
* @return array
|
||||
*/
|
||||
public function wxRebind(int $uid, string $code, string $ip): array;
|
||||
|
||||
/**
|
||||
* 获取用户绑定的微信信息
|
||||
* @param int $uid 用户ID
|
||||
* @return array
|
||||
*/
|
||||
public function wxGetBindInfo(int $uid): array;
|
||||
|
||||
/**
|
||||
* 获取官网登录二维码
|
||||
* @return array
|
||||
|
||||
@@ -24,4 +24,24 @@ interface UserCurriculumVitaeInterface
|
||||
* @return void
|
||||
*/
|
||||
public function deleteUserEducation(int $userId, int $educationId): array;
|
||||
/**
|
||||
* 删除用户工作经历
|
||||
* @param int $userId 用户id
|
||||
* @param int $index 工作经历下标(0-based)
|
||||
* @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