Compare commits
73 Commits
64a5645e60
...
zd-feature
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | |||
| 0f3ede5741 | |||
|
|
ef8909f94b | ||
|
|
5b6a21e148 | ||
| 923d2987e3 | |||
| 2b8b21f497 | |||
| 4e5ca7c017 | |||
| eb7d3bae5e | |||
| cca345b188 | |||
| 594fa66a4e | |||
|
|
d56b6cd206 | ||
|
|
0159960728 | ||
| a5366fda86 | |||
|
|
84a118b5ea | ||
|
|
a9a26fe20f | ||
|
|
57912c1198 | ||
|
|
30e2f6c771 | ||
|
|
ae0b543bf1 | ||
|
|
5d86bde7a6 | ||
|
|
4d44d7b40e | ||
|
|
161d92b37b | ||
|
|
f39cdca8ff | ||
| 93a165aed2 | |||
| 6b23e9d45d | |||
|
|
40bfa96b90 | ||
|
|
7e5f8afcb2 | ||
| 1b3dc61f50 | |||
| b8da879cae | |||
|
|
6a65ebc093 | ||
|
|
2e51c21753 | ||
|
|
12e272d217 | ||
|
|
75befa5901 | ||
|
|
b77a4a53e5 | ||
| 32b627c300 | |||
|
|
4c94869004 | ||
| 96cc30763d | |||
|
|
44fae8b976 | ||
|
|
6fa83dd193 | ||
| 1bdbaec19a |
54
consumers/admin_user_service.php
Normal file
54
consumers/admin_user_service.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 管理员用户服务
|
||||
*/
|
||||
|
||||
return [
|
||||
// 对应消费者类的 $serviceName
|
||||
'name' => 'AdminUserService',
|
||||
// 服务接口名,可选,默认值等于 name 配置的值,如果 name 直接定义为接口类则可忽略此行配置,如 name 为字符串则需要配置 service 对应到接口类
|
||||
'service' => \Dhd\Micro\Interface\UserService\AdminUserService::class,
|
||||
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http
|
||||
// 可选 jsonrpc-http jsonrpc jsonrpc-tcp-length-check
|
||||
'protocol' => 'jsonrpc-http',
|
||||
// 负载均衡算法,可选,默认值为 random
|
||||
'load_balancer' => 'random',
|
||||
// 这个消费者要从哪个服务中心获取节点信息,如不配置则不会从服务中心获取节点信息
|
||||
'registry' => [
|
||||
'protocol' => env("CONSUMERS_PROTOCOL", "consul"),
|
||||
'address' => env("CONSUMERS_ADDRESS", "http://127.0.0.1:8500"),
|
||||
],
|
||||
// 'nodes' => [
|
||||
// ['host' => '172.18.0.4', 'port' => 9502],
|
||||
// ],
|
||||
// 配置项,会影响到 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,
|
||||
],
|
||||
],
|
||||
];
|
||||
39
consumers/article_service.php
Normal file
39
consumers/article_service.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Dhd\Micro\Interface\ArticleService\ArticleService;
|
||||
|
||||
return [
|
||||
// 对应消费者类的 $serviceName
|
||||
'name' => 'ArticleService',
|
||||
// 服务接口名
|
||||
'service' => ArticleService::class,
|
||||
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http
|
||||
'protocol' => 'jsonrpc-http',
|
||||
// 负载均衡算法,可选,默认值为 random
|
||||
'load_balancer' => 'random',
|
||||
// 这个消费者要从哪个服务中心获取节点信息,如不配置则不会从服务中心获取节点信息
|
||||
'registry' => [
|
||||
'protocol' => env('CONSUMERS_PROTOCOL', 'consul'),
|
||||
'address' => env('CONSUMERS_ADDRESS', 'http://127.0.0.1:8500'),
|
||||
],
|
||||
// 配置项,会影响到 Packer 和 Transporter
|
||||
'options' => [
|
||||
'connect_timeout' => 5.0,
|
||||
'recv_timeout' => 5.0,
|
||||
'settings' => [
|
||||
'open_eof_split' => true,
|
||||
'package_eof' => "\r\n",
|
||||
],
|
||||
'retry_count' => 2,
|
||||
'retry_interval' => 100,
|
||||
'heartbeat' => 30,
|
||||
'pool' => [
|
||||
'min_connections' => 1,
|
||||
'max_connections' => 32,
|
||||
'connect_timeout' => 10.0,
|
||||
'wait_timeout' => 3.0,
|
||||
'heartbeat' => -1,
|
||||
'max_idle_time' => 60.0,
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -1,37 +1,49 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 课程服务
|
||||
* 文件服务
|
||||
*/
|
||||
|
||||
use Dhd\Micro\Interface\CourseService\CourseServiceInterface;
|
||||
use function Hyperf\Support\env;
|
||||
|
||||
return [
|
||||
// 对应消费者类的 $serviceName
|
||||
'name' => 'CourseService',
|
||||
// 服务接口名
|
||||
'service' => CourseServiceInterface::class,
|
||||
// 服务接口名,可选,默认值等于 name 配置的值,如果 name 直接定义为接口类则可忽略此行配置,如 name 为字符串则需要配置 service 对应到接口类
|
||||
'service' => \Dhd\Micro\Interface\CourseService\CourseService::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', 'consul'),
|
||||
'address' => env('CONSUMERS_ADDRESS', 'http://127.0.0.1:8500'),
|
||||
'protocol' => env("CONSUMERS_PROTOCOL", "consul"),
|
||||
'address' => env("CONSUMERS_ADDRESS", "http://127.0.0.1:8500"),
|
||||
],
|
||||
// 'nodes' => [
|
||||
// ['host' => '172.18.0.2', 'port' => 9501],
|
||||
// ],
|
||||
// 配置项,会影响到 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,
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Dhd\Micro\Interface\ExamService\ExamServiceInterface;
|
||||
use function Hyperf\Support\env;
|
||||
use Dhd\Micro\Interface\ExamService\ExamService;
|
||||
|
||||
return [
|
||||
return [
|
||||
// 对应消费者类的 $serviceName
|
||||
'name' => 'ExamService',
|
||||
// 服务接口名
|
||||
'service' => ExamServiceInterface::class,
|
||||
'service' => ExamService::class,
|
||||
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http
|
||||
'protocol' => 'jsonrpc-http',
|
||||
// 负载均衡算法,可选,默认值为 random
|
||||
|
||||
@@ -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
|
||||
|
||||
39
consumers/notice_service.php
Normal file
39
consumers/notice_service.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Dhd\Micro\Interface\NoticeService\NoticeService;
|
||||
|
||||
return [
|
||||
// 对应消费者类的 $serviceName
|
||||
'name' => 'NoticeService',
|
||||
// 服务接口名
|
||||
'service' => NoticeService::class,
|
||||
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http
|
||||
'protocol' => 'jsonrpc-http',
|
||||
// 负载均衡算法,可选,默认值为 random
|
||||
'load_balancer' => 'random',
|
||||
// 这个消费者要从哪个服务中心获取节点信息,如不配置则不会从服务中心获取节点信息
|
||||
'registry' => [
|
||||
'protocol' => env('CONSUMERS_PROTOCOL', 'consul'),
|
||||
'address' => env('CONSUMERS_ADDRESS', 'http://127.0.0.1:8500'),
|
||||
],
|
||||
// 配置项,会影响到 Packer 和 Transporter
|
||||
'options' => [
|
||||
'connect_timeout' => 5.0,
|
||||
'recv_timeout' => 5.0,
|
||||
'settings' => [
|
||||
'open_eof_split' => true,
|
||||
'package_eof' => "\r\n",
|
||||
],
|
||||
'retry_count' => 2,
|
||||
'retry_interval' => 100,
|
||||
'heartbeat' => 30,
|
||||
'pool' => [
|
||||
'min_connections' => 1,
|
||||
'max_connections' => 32,
|
||||
'connect_timeout' => 10.0,
|
||||
'wait_timeout' => 3.0,
|
||||
'heartbeat' => -1,
|
||||
'max_idle_time' => 60.0,
|
||||
],
|
||||
],
|
||||
];
|
||||
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,
|
||||
],
|
||||
],
|
||||
];
|
||||
54
consumers/user_service.php
Executable file
54
consumers/user_service.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 用户服务
|
||||
*/
|
||||
|
||||
return [
|
||||
// 对应消费者类的 $serviceName
|
||||
'name' => 'UserService',
|
||||
// 服务接口名,可选,默认值等于 name 配置的值,如果 name 直接定义为接口类则可忽略此行配置,如 name 为字符串则需要配置 service 对应到接口类
|
||||
'service' => \Dhd\Micro\Interface\UserService\UserService::class,
|
||||
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http
|
||||
// 可选 jsonrpc-http jsonrpc jsonrpc-tcp-length-check
|
||||
'protocol' => 'jsonrpc-http',
|
||||
// 负载均衡算法,可选,默认值为 random
|
||||
'load_balancer' => 'random',
|
||||
// 这个消费者要从哪个服务中心获取节点信息,如不配置则不会从服务中心获取节点信息
|
||||
'registry' => [
|
||||
'protocol' => env("CONSUMERS_PROTOCOL", "consul"),
|
||||
'address' => env("CONSUMERS_ADDRESS", "http://127.0.0.1:8500"),
|
||||
],
|
||||
// 'nodes' => [
|
||||
// ['host' => '172.18.0.4', 'port' => 9502],
|
||||
// ],
|
||||
// 配置项,会影响到 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,
|
||||
],
|
||||
],
|
||||
];
|
||||
54
consumers/wecheat_service.php
Executable file
54
consumers/wecheat_service.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 微信小程序服务 公共
|
||||
*/
|
||||
|
||||
return [
|
||||
// 对应消费者类的 $serviceName
|
||||
'name' => 'WecheatMiniService',
|
||||
// 服务接口名,可选,默认值等于 name 配置的值,如果 name 直接定义为接口类则可忽略此行配置,如 name 为字符串则需要配置 service 对应到接口类
|
||||
'service' => \Dhd\Micro\Interface\UserService\WecheatMiniService::class,
|
||||
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http
|
||||
// 可选 jsonrpc-http jsonrpc jsonrpc-tcp-length-check
|
||||
'protocol' => 'jsonrpc-http',
|
||||
// 负载均衡算法,可选,默认值为 random
|
||||
'load_balancer' => 'random',
|
||||
// 这个消费者要从哪个服务中心获取节点信息,如不配置则不会从服务中心获取节点信息
|
||||
'registry' => [
|
||||
'protocol' => env("CONSUMERS_PROTOCOL", "consul"),
|
||||
'address' => env("CONSUMERS_ADDRESS", "http://127.0.0.1:8500"),
|
||||
],
|
||||
// 'nodes' => [
|
||||
// ['host' => '172.18.0.4', 'port' => 9502],
|
||||
// ],
|
||||
// 配置项,会影响到 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,
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -9,4 +9,6 @@ declare(strict_types=1);
|
||||
namespace Dhd\Micro\Interface\AIService;
|
||||
|
||||
interface AIService extends
|
||||
AiEssayCheckInterface {}
|
||||
AiEssayCheckInterface,
|
||||
AiInterviewCheckInterface,
|
||||
AiInterviewTtsInterface {}
|
||||
|
||||
42
src/AIService/AiInterviewCheckInterface.php
Normal file
42
src/AIService/AiInterviewCheckInterface.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* 获取面试题所有考试类型列表
|
||||
* @return array
|
||||
*/
|
||||
public function getInterviewQuestionExamTypeList(): array;
|
||||
}
|
||||
47
src/AIService/AiInterviewTtsInterface.php
Normal file
47
src/AIService/AiInterviewTtsInterface.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* 提交朗读任务(异步):已生成直接返回成功,未生成投递队列后台合成并返回排队状态
|
||||
* 音频按题目(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;
|
||||
}
|
||||
82
src/ArticleService/ArticleService.php
Normal file
82
src/ArticleService/ArticleService.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ArticleService;
|
||||
|
||||
/**
|
||||
* 文章中心 RPC 聚合契约
|
||||
*/
|
||||
interface ArticleService
|
||||
{
|
||||
// 文章
|
||||
public function createArticle(array $data): int;
|
||||
public function updateArticle(int $id, array $data): bool;
|
||||
public function deleteArticle(int $id): bool;
|
||||
public function getArticleDetail(int $id): array;
|
||||
public function getArticleDetailWithUser(int $id, int $userId): array;
|
||||
public function getArticleList(array $params = []): array;
|
||||
public function appGetArticleList(array $params = []): array;
|
||||
public function searchArticles(string $keyword, array $params = []): array;
|
||||
|
||||
// 类型
|
||||
public function createType(array $data): int;
|
||||
public function updateType(int $id, array $data): bool;
|
||||
public function deleteType(int $id): bool;
|
||||
public function getTypeList(array $params = []): array;
|
||||
|
||||
// 分类
|
||||
public function createCategory(array $data): int;
|
||||
public function updateCategory(int $id, array $data): bool;
|
||||
public function deleteCategory(int $id): bool;
|
||||
public function getCategoryList(array $params = []): array;
|
||||
public function appGetCategoryList(array $params = []): array;
|
||||
public function getCategoryTree(array $params = []): array;
|
||||
public function bindCategoryTypes(int $categoryId, array $typeIds): bool;
|
||||
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;
|
||||
public function deleteAttachment(int $id): bool;
|
||||
public function getAttachmentsByArticleId(int $articleId): array;
|
||||
|
||||
// 交互
|
||||
public function likeArticle(int $articleId, int $userId): bool;
|
||||
public function cancelLikeArticle(int $articleId, int $userId): bool;
|
||||
public function collectArticle(int $articleId, int $userId, ?string $remark = null): bool;
|
||||
public function cancelCollectArticle(int $articleId, int $userId): bool;
|
||||
public function recordShareArticle(int $articleId, int $userId): bool;
|
||||
public function recordReadArticle(int $articleId, int $userId, ?string $ip = null): bool;
|
||||
|
||||
// 内容页
|
||||
public function createContentPage(array $data): int;
|
||||
public function updateContentPage(int $id, array $data): bool;
|
||||
public function deleteContentPage(int $id): bool;
|
||||
public function getContentPageList(array $params = []): array;
|
||||
public function getContentPageDetail(int $id): array;
|
||||
public function getContentPageListByGroupCode(string $groupCode, array $params = []): array;
|
||||
public function getContentPageByGroupCode(string $groupCode): array;
|
||||
|
||||
// 内容栏目
|
||||
public function createContentColumn(array $data): int;
|
||||
public function updateContentColumn(int $id, array $data): bool;
|
||||
public function deleteContentColumn(int $id): bool;
|
||||
public function getContentColumnList(array $params = []): array;
|
||||
public function getContentColumnDetail(int $id): array;
|
||||
public function getContentColumnsByChannel(string $channel): array;
|
||||
|
||||
// FAQ
|
||||
public function createFaq(array $data): int;
|
||||
public function updateFaq(int $id, array $data): bool;
|
||||
public function deleteFaq(int $id): bool;
|
||||
public function getFaqList(array $params = []): array;
|
||||
public function getFaqDetail(int $id): array;
|
||||
}
|
||||
13
src/CourseService/CourseService.php
Executable file
13
src/CourseService/CourseService.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 课程服务
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\CourseService;
|
||||
|
||||
interface CourseService extends
|
||||
\Dhd\Micro\Interface\CourseService\JsonRpcInterface\CourseServiceInterface,
|
||||
\Dhd\Micro\Interface\CourseService\JsonRpcInterface\CourseFileInterface,
|
||||
\Dhd\Micro\Interface\CourseService\JsonRpcInterface\CourseUnitInterface,
|
||||
\Dhd\Micro\Interface\CourseService\JsonRpcInterface\CourseVideoInterface {}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\CourseService;
|
||||
|
||||
/**
|
||||
* 课程服务接口
|
||||
*/
|
||||
interface CourseServiceInterface
|
||||
{
|
||||
/**
|
||||
* 根据教师ID获取课程列表
|
||||
* @param int $teacherId 教师ID
|
||||
* @param string $platform 平台 admin-后台 app-APP
|
||||
*/
|
||||
public function getCoursesByTeacherId(int $teacherId, string $platform = 'app'): array;
|
||||
}
|
||||
42
src/CourseService/JsonRpcInterface/CourseFileInterface.php
Normal file
42
src/CourseService/JsonRpcInterface/CourseFileInterface.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 课程讲义服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\CourseService\JsonRpcInterface;
|
||||
|
||||
interface CourseFileInterface
|
||||
{
|
||||
/**
|
||||
* 获取课程讲义列表
|
||||
* @param int $courseId 课程ID
|
||||
* @param bool $onlyShow 是否只显示显示状态的讲义
|
||||
*/
|
||||
public function getCourseFileList(int $courseId, bool $onlyShow = false): array;
|
||||
|
||||
/**
|
||||
* 新增、编辑课程讲义
|
||||
*/
|
||||
public function editCourseFile(array $data);
|
||||
|
||||
/**
|
||||
* 删除课程讲义
|
||||
* @param int $id 课程讲义ID
|
||||
*/
|
||||
public function deleteCourseFile(int $id);
|
||||
|
||||
/**
|
||||
* 修改课程讲义显示状态
|
||||
* @param int $id 课程讲义ID
|
||||
* @param int $isShow 显示状态 0-不显示 1-显示
|
||||
*/
|
||||
public function editCourseFileShow(int $id, int $isShow);
|
||||
|
||||
/**
|
||||
* 修改课程讲义排序
|
||||
* @param int $id 课程讲义ID
|
||||
* @param int $sort 排序
|
||||
*/
|
||||
public function editCourseFileSort(int $id, int $sort);
|
||||
}
|
||||
102
src/CourseService/JsonRpcInterface/CourseServiceInterface.php
Executable file
102
src/CourseService/JsonRpcInterface/CourseServiceInterface.php
Executable file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 课程服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\CourseService\JsonRpcInterface;
|
||||
|
||||
interface CourseServiceInterface
|
||||
{
|
||||
/**
|
||||
* 获取课程分类列表
|
||||
*/
|
||||
public function getCourseCategoryList(): array;
|
||||
|
||||
/**
|
||||
* 编辑/创建课程分类
|
||||
*/
|
||||
public function editCourseCategory(array $data);
|
||||
|
||||
/**
|
||||
* 删除课程分类
|
||||
* @param int $id 课程分类ID
|
||||
*/
|
||||
public function deleteCourseCategory(int $id);
|
||||
|
||||
/**
|
||||
* 后台管理获取课程列表
|
||||
* @param array $params 查询参数
|
||||
*/
|
||||
public function adminGetCourseList(array $params): array;
|
||||
|
||||
/**
|
||||
* APP获取课程列表
|
||||
* @param array $params 获取参数
|
||||
*/
|
||||
public function appGetCourseList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取课程详情
|
||||
* @param int $id 课程ID
|
||||
* @param string $platform 平台 admin-后台 app-APP
|
||||
* @param int $userId 用户ID
|
||||
*/
|
||||
public function getCourseDetail(int $id, string $platform = 'admin', int $userId = 0): array;
|
||||
|
||||
/**
|
||||
* 新增、编辑课程
|
||||
*/
|
||||
public function editCourse(array $data);
|
||||
|
||||
/**
|
||||
* 修改课程显示状态
|
||||
* @param int $id 课程ID
|
||||
* @param int $isShow 显示状态 0-不显示 1-显示
|
||||
*/
|
||||
public function editCourseShow(int $id, int $isShow);
|
||||
|
||||
/**
|
||||
* 修改课程排序
|
||||
* @param int $id 课程ID
|
||||
* @param int $sort 排序
|
||||
*/
|
||||
public function editCourseSort(int $id, int $sort);
|
||||
|
||||
/**
|
||||
* 删除课程
|
||||
* @param int $id 课程ID
|
||||
*/
|
||||
public function deleteCourse(int $id);
|
||||
|
||||
/**
|
||||
* 用户添加课程学习
|
||||
* @param int $courseId 课程ID
|
||||
* @param int $userId 用户ID
|
||||
*/
|
||||
public function addLearnCourse(int $courseId, int $userId);
|
||||
|
||||
/**
|
||||
* 验证领取码
|
||||
* @param int $courseId 课程ID
|
||||
* @param int $userId 用户ID
|
||||
* @param string $inviteCode 领取码
|
||||
* @return void
|
||||
*/
|
||||
public function virfyInviteCode(int $courseId, int $userId, string $inviteCode): array;
|
||||
|
||||
/**
|
||||
* 搜索课程
|
||||
* @param string $keyword 搜索关键词
|
||||
* @param array $params 搜索参数
|
||||
* @return array
|
||||
*/
|
||||
public function searchCourses(string $keyword, array $params = []): array;
|
||||
|
||||
/**
|
||||
* 根据教师ID获取课程列表
|
||||
* @param int $teacherId 教师ID
|
||||
* @param string $platform 平台 admin-后台 app-APP
|
||||
*/
|
||||
public function getCoursesByTeacherId(int $teacherId, string $platform = 'app'): array;
|
||||
}
|
||||
34
src/CourseService/JsonRpcInterface/CourseUnitInterface.php
Normal file
34
src/CourseService/JsonRpcInterface/CourseUnitInterface.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 课程单元、章节接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\CourseService\JsonRpcInterface;
|
||||
|
||||
interface CourseUnitInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* 获取课程单、章节元列表
|
||||
* @param int $courseId 课程ID
|
||||
*/
|
||||
public function getCourseUnitList(int $courseId): array;
|
||||
|
||||
/**
|
||||
* 获取课程单、章节元详情
|
||||
* @param int $id 课程单、章节元ID
|
||||
*/
|
||||
public function getCourseUnitDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 新增、编辑课程单、章节元
|
||||
*/
|
||||
public function editCourseUnit(array $data);
|
||||
|
||||
/**
|
||||
* 删除课程单、章节元
|
||||
* @param int $id 课程单、章节元ID
|
||||
*/
|
||||
public function deleteCourseUnit(int $id);
|
||||
}
|
||||
76
src/CourseService/JsonRpcInterface/CourseVideoInterface.php
Normal file
76
src/CourseService/JsonRpcInterface/CourseVideoInterface.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 课程视频接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\CourseService\JsonRpcInterface;
|
||||
|
||||
interface CourseVideoInterface
|
||||
{
|
||||
/**
|
||||
* 获取课程视频列表
|
||||
* @param int $courseId 课程ID
|
||||
* @param string $platform 平台 admin-后台 app-APP
|
||||
*/
|
||||
public function getVideoLists(int $courseId, string $platform = 'admin'): array;
|
||||
|
||||
/**
|
||||
* 获取课程视频详情
|
||||
* @param int $id 课程视频ID
|
||||
* @param string $platform 平台 admin-后台 app-APP
|
||||
*/
|
||||
public function getVideoDetail(int $id, string $platform = 'admin'): array;
|
||||
|
||||
/**
|
||||
* 新增、编辑课程视频
|
||||
* 'id',
|
||||
* 'course_id',
|
||||
* 'unit_id',
|
||||
* 'cover_image',
|
||||
* 'sort',
|
||||
* 'title',
|
||||
* 'video_url',
|
||||
* 'video_size',
|
||||
* 'video_time',
|
||||
* 'format',
|
||||
* 'is_show',
|
||||
* 'main_teacher',
|
||||
*/
|
||||
public function editVideo(array $data);
|
||||
|
||||
/**
|
||||
* 删除课程视频
|
||||
* @param int $id 课程视频ID
|
||||
*/
|
||||
public function deleteVideo(int $id);
|
||||
|
||||
/**
|
||||
* 修改课程视频排序
|
||||
* @param int $id 课程视频ID
|
||||
* @param int $sort 排序
|
||||
*/
|
||||
public function editVideoSort(int $id, int $sort);
|
||||
|
||||
/**
|
||||
* 课程视频显示状态
|
||||
* @param int $id 课程视频ID
|
||||
* @param int $isShow 显示状态 0-不显示 1-显示
|
||||
*/
|
||||
public function editVideoShow(int $id, int $isShow);
|
||||
|
||||
/**
|
||||
* 课程视频浏览量+1
|
||||
* @param int $id 课程视频ID
|
||||
* @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;
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -38,28 +38,27 @@ interface DataServiceInterface
|
||||
// 招考类型相关
|
||||
public function getExamTypes(array $data): array;
|
||||
public function getExamTypeBy(int $id): array;
|
||||
public function getExamTypesByCampusId(int $campusId): array;
|
||||
public function getExamTypeByIds(array $ids): array;
|
||||
public function createExamType(array $data): int;
|
||||
public function updateExamType(int $id, array $data): bool;
|
||||
public function deleteExamType(int $id): bool;
|
||||
public function getExamTypesByCampusId(int $campusId): array;
|
||||
public function getExamTypeByIds(array $ids): array;
|
||||
|
||||
// 科目相关
|
||||
public function getSubjects(array $data): array;
|
||||
public function getSubjectBy(int $id): array;
|
||||
public function getSubjectsByExamTypeId(int $examTypeId): array;
|
||||
public function createSubject(array $data): int;
|
||||
public function updateSubject(int $id, array $data): bool;
|
||||
public function deleteSubject(int $id): bool;
|
||||
public function getSubjectsByExamTypeId(int $examTypeId): array;
|
||||
|
||||
|
||||
// 关联关系相关
|
||||
public function getRelations(array $params): array;
|
||||
public function createRelation(array $data): int;
|
||||
public function updateRelation(int $id, array $data): bool;
|
||||
public function deleteRelation(int $id): bool;
|
||||
public function getCategoryIdsByRelation(int $campusId, int $examTypeId, int $subjectId): array;
|
||||
|
||||
// 批量更新校区排序
|
||||
public function batchUpdateCampusSort(array $sorts): bool;
|
||||
|
||||
/**
|
||||
* 获取招考类型(公告类型统一由数据中心提供).
|
||||
* @param int $regionId 招考地区ID,0=全部
|
||||
* @return array 招考类型列表
|
||||
*/
|
||||
public function appGetExamTypes(int $regionId = 0): array;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
36
src/ExamService/ExamService.php
Normal file
36
src/ExamService/ExamService.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
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\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;
|
||||
|
||||
interface ExamService extends
|
||||
ExamServiceInterface,
|
||||
UserPaperInterface,
|
||||
AiInterviewQuestionInterface,
|
||||
CustomQuestionInterface,
|
||||
PaperInterface,
|
||||
GufenPaperInterface,
|
||||
QuestionInterface,
|
||||
QuestionTypeInterface,
|
||||
QuestionCategoryInterface,
|
||||
SmartPaperInterface,
|
||||
CampusRelationInterface,
|
||||
PaperImportInterface,
|
||||
QuestionNoteInterface,
|
||||
DailyPracticeInterface {}
|
||||
@@ -1,543 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
|
||||
interface ExamServiceInterface extends GufenPaperInterface
|
||||
{
|
||||
// 练习相关
|
||||
/**
|
||||
* 获取练习列表.
|
||||
* @param int $userId 用户ID
|
||||
* @return array 练习列表
|
||||
*/
|
||||
public function getPracticeList(int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取练习详情.
|
||||
* @param int $userId 用户ID
|
||||
* @param int $id 练习ID
|
||||
* @return array 练习详情
|
||||
*/
|
||||
public function getPracticeDetail(int $userId, int $id): array;
|
||||
|
||||
// 考试类型相关
|
||||
|
||||
/**
|
||||
* 获取考试类型列表.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function getExamTypeList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取考试类型详情.
|
||||
* @param int $id 考试类型ID
|
||||
* @return array 考试类型详情
|
||||
*/
|
||||
public function getExamTypeDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 创建考试类型.
|
||||
* @param array $params
|
||||
* @return bool 创建结果
|
||||
*/
|
||||
public function createExamType(array $params): bool;
|
||||
|
||||
/**
|
||||
* 更新考试类型.
|
||||
* @param int $id 考试类型ID
|
||||
* @param array $params
|
||||
* @return bool 更新结果
|
||||
*/
|
||||
public function updateExamType(int $id, array $params): bool;
|
||||
|
||||
/**
|
||||
* 删除考试类型.
|
||||
* @param int $id 考试类型ID
|
||||
* @return bool 删除结果
|
||||
*/
|
||||
public function deleteExamType(int $id): bool;
|
||||
|
||||
// 题目素材相关
|
||||
|
||||
/**
|
||||
* 获取素材列表.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function getQuestionMaterialList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取素材详情.
|
||||
* @param int $id
|
||||
* @return array
|
||||
*/
|
||||
public function getQuestionMaterialDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 创建素材.
|
||||
* @param array $params
|
||||
* @return bool 创建结果
|
||||
*/
|
||||
public function createQuestionMaterial(array $params): bool;
|
||||
|
||||
/**
|
||||
* 更新素材.
|
||||
* @param int $id 素材ID
|
||||
* @param array $params
|
||||
* @return bool 更新结果
|
||||
*/
|
||||
public function updateQuestionMaterial(int $id, array $params): bool;
|
||||
|
||||
/**
|
||||
* 删除素材.
|
||||
* @param int $id 素材ID
|
||||
* @return bool 删除结果
|
||||
*/
|
||||
public function deleteQuestionMaterial(int $id): bool;
|
||||
|
||||
// 题目相关
|
||||
|
||||
/**
|
||||
* 获取题目列表.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function getQuestionList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取题目详情.
|
||||
* @param int $id
|
||||
* @return array
|
||||
*/
|
||||
public function getQuestionDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 创建题目.
|
||||
* @param array $params
|
||||
* @return bool 创建结果
|
||||
*/
|
||||
public function createQuestion(array $params): bool;
|
||||
|
||||
/**
|
||||
* 更新题目.
|
||||
* @param int $id 题目ID
|
||||
* @param array $params
|
||||
* @return bool 更新结果
|
||||
*/
|
||||
public function updateQuestion(int $id, array $params): bool;
|
||||
|
||||
/**
|
||||
* 删除题目.
|
||||
* @param int $id 素材ID
|
||||
* @return bool 删除结果
|
||||
*/
|
||||
public function deleteQuestion(int $id): bool;
|
||||
|
||||
/**
|
||||
* 搜索题目.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function searchQuestion(array $params): array;
|
||||
|
||||
// 题目选项相关
|
||||
|
||||
/**
|
||||
* 批量创建题目选项.
|
||||
* @param int $questionId
|
||||
* @param array $options
|
||||
* @return bool
|
||||
*/
|
||||
public function batchCreateQuestionOptions(int $questionId, array $options): bool;
|
||||
|
||||
/**
|
||||
* 调整题目选项排序.
|
||||
* @param int $questionId
|
||||
* @param array $sortData
|
||||
* @return bool
|
||||
*/
|
||||
public function adjustQuestionOptionSort(int $questionId, array $sortData): bool;
|
||||
|
||||
/**
|
||||
* 删除题目选项.
|
||||
* @param int $questionId
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteQuestionOptionsByQuestionId(int $questionId): bool;
|
||||
|
||||
// 题库相关
|
||||
|
||||
/**
|
||||
* 获取题库列表.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function getQuestionStoreList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取题库详情.
|
||||
* @param int $id
|
||||
* @return array
|
||||
*/
|
||||
public function getQuestionStoreDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 创建题库.
|
||||
* @param array $params
|
||||
* @return bool 创建结果
|
||||
*/
|
||||
public function createQuestionStore(array $params): bool;
|
||||
|
||||
/**
|
||||
* 更新题库.
|
||||
* @param int $id 题库ID
|
||||
* @param array $params
|
||||
* @return bool 更新结果
|
||||
*/
|
||||
public function updateQuestionStore(int $id, array $params): bool;
|
||||
|
||||
/**
|
||||
* 删除题库.
|
||||
* @param int $id 题库ID
|
||||
* @return bool 删除结果
|
||||
*/
|
||||
public function deleteQuestionStore(int $id): bool;
|
||||
|
||||
// 题型相关
|
||||
|
||||
/**
|
||||
* 获取题型列表.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function getQuestionTypeList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取题型详情.
|
||||
* @param int $id
|
||||
* @return array
|
||||
*/
|
||||
public function getQuestionTypeDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 创建题型.
|
||||
* @param array $params
|
||||
* @return bool 创建结果
|
||||
*/
|
||||
public function createQuestionType(array $params): bool;
|
||||
|
||||
/**
|
||||
* 删除题型.
|
||||
* @param int $id 题型ID
|
||||
* @return bool 删除结果
|
||||
*/
|
||||
public function updateQuestionType(int $id, array $params): bool;
|
||||
|
||||
/**
|
||||
* 删除题型.
|
||||
* @param int $id 题型ID
|
||||
* @return bool 删除结果
|
||||
*/
|
||||
public function deleteQuestionType(int $id): bool;
|
||||
|
||||
// 科目相关
|
||||
|
||||
/**
|
||||
* 获取科目列表.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function getSubjectList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取科目详情.
|
||||
* @param int $id
|
||||
* @return array
|
||||
*/
|
||||
public function getSubjectDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 创建科目.
|
||||
* @param array $params
|
||||
* @return bool 创建结果
|
||||
*/
|
||||
public function createSubject(array $params): bool;
|
||||
|
||||
/**
|
||||
* 更新科目.
|
||||
* @param int $id 科目ID
|
||||
* @return bool 更新结果
|
||||
*/
|
||||
public function updateSubject(int $id, array $params): bool;
|
||||
|
||||
/**
|
||||
* 删除科目.
|
||||
* @param int $id 科目ID
|
||||
* @return bool 删除结果
|
||||
*/
|
||||
public function deleteSubject(int $id): bool;
|
||||
|
||||
// 用户试卷记录相关
|
||||
|
||||
/**
|
||||
* 开始考试(创建试卷记录).
|
||||
* @param array $params
|
||||
* - user_id: 用户ID
|
||||
* - paper_id: 试卷ID
|
||||
* @return array 试卷记录信息
|
||||
*/
|
||||
public function startExam(array $params): array;
|
||||
|
||||
/**
|
||||
* 提交试卷.
|
||||
* @param array $params
|
||||
* - record_id: 试卷记录ID
|
||||
* - user_id: 用户ID(验证权限)
|
||||
* @return array 考试结果
|
||||
*/
|
||||
public function submitExam(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取用户试卷记录列表.
|
||||
* @param array $params
|
||||
* - user_id: 用户ID
|
||||
* - page: 页码
|
||||
* - size: 每页条数
|
||||
* - status: 状态筛选
|
||||
* @return array 分页记录
|
||||
*/
|
||||
public function getUserRecords(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取试卷记录详情.
|
||||
* @param int $recordId 记录ID
|
||||
* @param int $userId 用户ID(验证权限)
|
||||
* @return array 详情信息
|
||||
*/
|
||||
public function getRecordDetail(int $recordId, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取用户考试记录列表.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function getUserExamRecords(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取考试记录详情.
|
||||
* @param int $recordId 考试记录ID
|
||||
* @param int $userId 用户ID(验证权限)
|
||||
* @return array 详情信息
|
||||
*/
|
||||
public function getExamRecordDetail(int $recordId, int $userId): array;
|
||||
|
||||
// 试卷相关
|
||||
|
||||
/**
|
||||
* 创建试卷.
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
public function createPaper(array $params): bool;
|
||||
|
||||
/**
|
||||
* 更新试卷.
|
||||
* @param int $id 试卷ID
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
public function updatePaper(int $id, array $params): bool;
|
||||
|
||||
/**
|
||||
* 添加题目到试卷.
|
||||
* @param int $paperId
|
||||
* @param array $questionData
|
||||
* @return bool
|
||||
*/
|
||||
public function addQuestionsToPaper(int $paperId, array $questionData): bool;
|
||||
|
||||
/**
|
||||
* 从试卷中移除题目.
|
||||
* @param int $paperId
|
||||
* @param array $questionIds
|
||||
* @return bool
|
||||
*/
|
||||
public function removeQuestionsFromPaper(int $paperId, array $questionIds): bool;
|
||||
|
||||
/**
|
||||
* 获取试卷详情.
|
||||
* @param int $id
|
||||
* @return array
|
||||
*/
|
||||
public function getPaperDetail(int $id): array;
|
||||
|
||||
// 试卷生成相关
|
||||
|
||||
/**
|
||||
* 根据策略生成试卷.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function generateByStrategy(array $params): array;
|
||||
|
||||
/**
|
||||
* 手动生成试卷.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function generateManual(array $params): array;
|
||||
|
||||
// 素材相关
|
||||
|
||||
/**
|
||||
* 获取素材列表.
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function getMaterialList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取素材详情.
|
||||
* @param int $id
|
||||
* @return array
|
||||
*/
|
||||
public function getMaterialDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 创建素材.
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
public function createMaterial(array $params): bool;
|
||||
|
||||
/**
|
||||
* 更新素材.
|
||||
* @param int $id 素材ID
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
public function updateMaterial(int $id, array $params): bool;
|
||||
|
||||
/**
|
||||
* 删除素材.
|
||||
* @param int $id 素材ID
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteMaterial(int $id): bool;
|
||||
|
||||
// 题目标签关联相关
|
||||
|
||||
/**
|
||||
* 添加题目标签.
|
||||
* @param int $questionId
|
||||
* @param array $tagIds
|
||||
* @return bool
|
||||
*/
|
||||
public function attachQuestionTags(int $questionId, array $tagIds): bool;
|
||||
|
||||
/**
|
||||
* 删除题目标签.
|
||||
* @param int $questionId
|
||||
* @param array $tagIds
|
||||
* @return bool
|
||||
*/
|
||||
public function detachQuestionTags(int $questionId, array $tagIds = []): bool;
|
||||
|
||||
/**
|
||||
* 获取题目标签.
|
||||
* @param int $questionId
|
||||
* @return array
|
||||
*/
|
||||
public function getQuestionTags(int $questionId): array;
|
||||
|
||||
/**
|
||||
* 获取用户错题列表.
|
||||
* @param array $params
|
||||
* - user_id: 用户ID
|
||||
* - page: 页码
|
||||
* - size: 每页条数
|
||||
* - subject_id: 科目筛选
|
||||
* @return array 分页错题列表
|
||||
*/
|
||||
public function getUserWrongQuestions(array $params): array;
|
||||
|
||||
/**
|
||||
* 标记错题为已掌握
|
||||
* @param int $userId 用户ID
|
||||
* @param int $wrongId 错题ID
|
||||
* @return bool 操作结果
|
||||
*/
|
||||
public function markAsMastered(int $userId, int $wrongId): bool;
|
||||
|
||||
/**
|
||||
* 添加错题笔记.
|
||||
* @param array $params
|
||||
* - wrong_id: 错题ID
|
||||
* - user_id: 用户ID
|
||||
* - note: 笔记内容
|
||||
* @return bool 操作结果
|
||||
*/
|
||||
public function addNote(array $params): bool;
|
||||
|
||||
/**
|
||||
* 获取题目错误统计
|
||||
* @param int $userId 用户ID
|
||||
* @param int $questionId 题目ID
|
||||
* @return array 统计信息
|
||||
*/
|
||||
public function getErrorStats(int $userId, int $questionId): array;
|
||||
|
||||
/**
|
||||
* 保存用户答题记录.
|
||||
* @param array $params
|
||||
* - user_id: 用户ID
|
||||
* - record_id: 试卷记录ID
|
||||
* - question_id: 题目ID
|
||||
* - user_answer: 用户答案
|
||||
* @return bool 操作结果
|
||||
*/
|
||||
public function saveAnswer(array $params): bool;
|
||||
|
||||
/**
|
||||
* 获取试卷内用户答题记录.
|
||||
* @param int $userId 用户ID
|
||||
* @param int $recordId 试卷记录ID
|
||||
* @return array 答题记录列表
|
||||
*/
|
||||
public function getByRecordId(int $userId, int $recordId): array;
|
||||
|
||||
/**
|
||||
* 批量更新题目得分.
|
||||
* @param array $params
|
||||
* - record_id: 试卷记录ID
|
||||
* - scores: 得分数据 [{question_id: 1, score: 5, is_correct: true}, ...]
|
||||
* @return bool 操作结果
|
||||
*/
|
||||
public function batchUpdateScores(array $params): bool;
|
||||
|
||||
public function getCategoryList(array $params): array;
|
||||
|
||||
public function getSubQuestionCategoryList(array $data): array;
|
||||
|
||||
public function getCategoryDetail(int $id): array;
|
||||
|
||||
public function getCategoriesByIds(array $ids): array;
|
||||
|
||||
public function createCategory(array $params): array;
|
||||
|
||||
public function updateCategory(int $id, array $params): array;
|
||||
|
||||
public function deleteCategory(int $id): array;
|
||||
|
||||
public function getCategoryTree(array $ids = []): array;
|
||||
|
||||
public function getCategoryOptions(): array;
|
||||
|
||||
/**
|
||||
* 查询指定分类下的题库数量
|
||||
* @param int $categoryId 分类ID
|
||||
* @return int 题库数量
|
||||
*/
|
||||
public function getQuestionCountByCategory(int $categoryId): int;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService;
|
||||
|
||||
interface GufenPaperInterface
|
||||
{
|
||||
//更新估分职位信息
|
||||
public function editGufenPosition(array $params): array;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
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;
|
||||
}
|
||||
37
src/ExamService/JsonRpcInterface/CampusRelationInterface.php
Normal file
37
src/ExamService/JsonRpcInterface/CampusRelationInterface.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
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;
|
||||
}
|
||||
67
src/ExamService/JsonRpcInterface/CustomQuestionInterface.php
Normal file
67
src/ExamService/JsonRpcInterface/CustomQuestionInterface.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface CustomQuestionInterface
|
||||
{
|
||||
/**
|
||||
* 获取自定义PDF题库分类
|
||||
* @param array $params 查询参数,分页参数
|
||||
*/
|
||||
public function getCustomQuestionCategoryList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取自定义PDF题库分类下拉列表
|
||||
*/
|
||||
public function getCustomQuestionCategorySelectList(): array;
|
||||
|
||||
/**
|
||||
* 新增、编辑自定义PDF题库分类
|
||||
*/
|
||||
public function editCustomQuestionCategory(array $params);
|
||||
|
||||
/**
|
||||
* 删除自定义PDF题库分类
|
||||
* @param int $id 分类ID
|
||||
*/
|
||||
public function deleteCustomQuestionCategory(int $id);
|
||||
|
||||
/**
|
||||
* 获取自定义PDF题库列表
|
||||
* @param array $params 筛选参数,分页参数
|
||||
*/
|
||||
public function getCustomQuestionList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取自定义PDF题库详情
|
||||
* @param int $id 题库ID
|
||||
*/
|
||||
public function getCustomQuestionDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 新增、编辑自定义PDF题库
|
||||
*/
|
||||
public function editCustomQuestion(array $params);
|
||||
|
||||
/**
|
||||
* 编辑自定义PDF题库状态
|
||||
* @param int $id 题库ID
|
||||
* @param int $status 状态
|
||||
*/
|
||||
public function editCustomQuestionStatus(int $id, int $status);
|
||||
|
||||
/**
|
||||
* 编辑自定义PDF题库排序
|
||||
* @param int $id 题库ID
|
||||
* @param int $sort 排序
|
||||
*/
|
||||
public function editCustomQuestionSort(int $id, int $sort);
|
||||
|
||||
/**
|
||||
* 删除自定义PDF题库
|
||||
* @param int $id 题库ID
|
||||
*/
|
||||
public function deleteCustomQuestion(int $id);
|
||||
}
|
||||
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;
|
||||
}
|
||||
139
src/ExamService/JsonRpcInterface/ExamServiceInterface.php
Normal file
139
src/ExamService/JsonRpcInterface/ExamServiceInterface.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* 获取用户薄弱项(有错题且正确率低于阈值且正确率最低的模块;无则 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;
|
||||
}
|
||||
71
src/ExamService/JsonRpcInterface/GufenPaperInterface.php
Normal file
71
src/ExamService/JsonRpcInterface/GufenPaperInterface.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface GufenPaperInterface
|
||||
{
|
||||
/**
|
||||
* 后台获取估分考卷列表.
|
||||
*/
|
||||
public function adminGetGufenPaperList(array $params = []): array;
|
||||
|
||||
/**
|
||||
* 获取估分考卷详情.
|
||||
*/
|
||||
public function getGufenPaperDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 新增、编辑估分考卷.
|
||||
*/
|
||||
public function editGufenPaper(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取估分考卷信息
|
||||
*/
|
||||
public function getGufenPaperConfig(int $campusId): array;
|
||||
|
||||
/**
|
||||
* app获取估分卷列表
|
||||
*/
|
||||
public function appGetGufenPaperList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取估分试卷历史列表
|
||||
*/
|
||||
public function getHistoryList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 开始估分考卷
|
||||
*/
|
||||
public function startGufen(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取用户估分排名
|
||||
*/
|
||||
public function getUserPaperRank(int $paperRecordId, int $userId): array;
|
||||
|
||||
//为估分卷添加估分职位
|
||||
public function addGufenPaperPosition(array $params): array;
|
||||
|
||||
//更新估分职位信息
|
||||
public function editGufenPosition(array $params): array;
|
||||
|
||||
//管理后台获取估分职位列表
|
||||
public function adminGetGufenPositionList(array $params): array;
|
||||
|
||||
//获取估分城市列表
|
||||
public function getGufenCityList(array $params): array;
|
||||
|
||||
//获取估分单位列表
|
||||
public function getGufenUnitList(array $params): array;
|
||||
|
||||
//获取估分职位列表
|
||||
public function getGufenPositionList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取估分筛选下拉树
|
||||
*/
|
||||
public function getGufenSelectTree(): array;
|
||||
}
|
||||
41
src/ExamService/JsonRpcInterface/PaperImportInterface.php
Normal file
41
src/ExamService/JsonRpcInterface/PaperImportInterface.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface PaperImportInterface
|
||||
{
|
||||
public function createPaperImportBatch(array $params, int $operatorId, string $traceId): array;
|
||||
|
||||
public function commitPaperImportBatch(string $batchNo, array $params, int $operatorId, string $traceId): array;
|
||||
|
||||
public function getPaperImportBatch(string $batchNo): array;
|
||||
|
||||
public function getPaperImportBatchList(array $params): array;
|
||||
|
||||
/**
|
||||
* 解析上传的试卷word文档(通用试卷导入)
|
||||
*/
|
||||
public function parsePaperImportFile(int $fileId): array;
|
||||
|
||||
/**
|
||||
* 预校验:对解析结果做完整性校验,不写业务库
|
||||
*/
|
||||
public function previewPaperImport(array $params, int $operatorId): array;
|
||||
|
||||
/**
|
||||
* 提交导入:全部合法才写库,否则返回与预校验一致的报告
|
||||
*/
|
||||
public function commitPaperImport(array $params, int $operatorId): array;
|
||||
|
||||
/**
|
||||
* 导入日志列表
|
||||
*/
|
||||
public function getPaperImportLogList(array $params): array;
|
||||
|
||||
/**
|
||||
* 导入日志详情
|
||||
*/
|
||||
public function getPaperImportLogDetail(array $params): array;
|
||||
}
|
||||
69
src/ExamService/JsonRpcInterface/PaperInterface.php
Normal file
69
src/ExamService/JsonRpcInterface/PaperInterface.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface PaperInterface
|
||||
{
|
||||
/**
|
||||
* 解析上传的题目word文档
|
||||
*/
|
||||
public function paraseQuestionFile(int $fileId): array;
|
||||
|
||||
/**
|
||||
* 后台获取考卷列表
|
||||
*/
|
||||
public function adminGetPaperList(array $params): array;
|
||||
|
||||
/**
|
||||
* app获取考卷列表
|
||||
*/
|
||||
public function appGetPaperList(array $params): array;
|
||||
|
||||
/**
|
||||
* 官网历年考卷:按地区+年份+科目聚合,返回 [{year, subject_id, paper_count}]
|
||||
*/
|
||||
public function appGetPaperGroupedByYear(array $params): array;
|
||||
|
||||
/**
|
||||
* 创建、编辑试卷
|
||||
*/
|
||||
public function editPaper(array $params): array;
|
||||
|
||||
/**
|
||||
* 编辑试卷状态.
|
||||
*/
|
||||
public function editPaperStatus(int $id, int $status): array;
|
||||
|
||||
/**
|
||||
* 删除试卷.
|
||||
*/
|
||||
public function deletePaper(int $id): array;
|
||||
|
||||
/**
|
||||
* 获取试卷详情
|
||||
* @param int $id 试卷ID
|
||||
* @return array 试卷详情
|
||||
*/
|
||||
public function getPaperDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* APP获取试卷详情.
|
||||
*/
|
||||
public function appGetPaperDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 获取试卷的题目列表
|
||||
*/
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface QuestionCategoryInterface
|
||||
{
|
||||
public function getCategoryList(array $params): array;
|
||||
|
||||
public function getSubQuestionCategoryList(array $data): array;
|
||||
|
||||
public function getCategoryDetail(int $id): array;
|
||||
|
||||
public function getCategoriesByIds(array $ids): array;
|
||||
|
||||
public function createCategory(array $params): array;
|
||||
|
||||
public function updateCategory(int $id, array $params): array;
|
||||
|
||||
public function deleteCategory(int $id): array;
|
||||
|
||||
public function getCategoryTree(array $ids = []): array;
|
||||
|
||||
public function getCategoryOptions(): array;
|
||||
|
||||
/**
|
||||
* 查询指定分类下的题库数量(按理应该属于Question,为了不冲突暂时放在这里).
|
||||
* @param int $categoryId 分类ID
|
||||
* @return array 题库数量
|
||||
*/
|
||||
public function getQuestionCountByCategory(int $categoryId): array;
|
||||
}
|
||||
100
src/ExamService/JsonRpcInterface/QuestionInterface.php
Normal file
100
src/ExamService/JsonRpcInterface/QuestionInterface.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* 随机获取用户错题
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* 刷题,批量提交用户答案
|
||||
* 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;
|
||||
}
|
||||
48
src/ExamService/JsonRpcInterface/QuestionNoteInterface.php
Normal file
48
src/ExamService/JsonRpcInterface/QuestionNoteInterface.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface QuestionNoteInterface
|
||||
{
|
||||
/**
|
||||
* 新增笔记
|
||||
*/
|
||||
public function addNote(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 编辑笔记
|
||||
*/
|
||||
public function editNote(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 删除笔记
|
||||
*/
|
||||
public function deleteNote(int $noteId, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取笔记详情
|
||||
*/
|
||||
public function getNoteDetail(int $noteId, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取用户笔记列表
|
||||
*/
|
||||
public function getNoteList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 根据题目ID获取用户笔记
|
||||
*/
|
||||
public function getNoteByQuestionId(int $questionId, int $userId): array;
|
||||
|
||||
/**
|
||||
* 批量获取题目笔记
|
||||
*/
|
||||
public function getBatchNotesByQuestionIds(array $questionIds, int $userId): array;
|
||||
|
||||
/**
|
||||
* 批量获取题目笔记状态
|
||||
*/
|
||||
public function getBatchNotesStatusByQuestionIds(array $questionIds, int $userId): array;
|
||||
}
|
||||
18
src/ExamService/JsonRpcInterface/QuestionTypeInterface.php
Normal file
18
src/ExamService/JsonRpcInterface/QuestionTypeInterface.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface QuestionTypeInterface
|
||||
{
|
||||
public function getQuestionTypeList(array $filters = []): array;
|
||||
|
||||
public function getQuestionTypeDetail(int $id): array;
|
||||
|
||||
public function createQuestionType(array $data): array;
|
||||
|
||||
public function updateQuestionType(int $id, array $data): array;
|
||||
|
||||
public function deleteQuestionType(int $id): array;
|
||||
}
|
||||
67
src/ExamService/JsonRpcInterface/SmartPaperInterface.php
Normal file
67
src/ExamService/JsonRpcInterface/SmartPaperInterface.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface SmartPaperInterface
|
||||
{
|
||||
/**
|
||||
* 开始智能组卷
|
||||
* @param int $userId 用户ID
|
||||
* @param array $params 参数:campus_id, exam_type_id(subject由关联关系表查询is_smart_paper=1确定)
|
||||
* @return array 返回UserPaperRecord的toArray(),参考startGufen
|
||||
*/
|
||||
public function startSmartPaper(int $userId, array $params): array;
|
||||
|
||||
/**
|
||||
* 获取用户试卷详情
|
||||
* @param int $paperRecordId 用户试卷记录ID
|
||||
* @param bool $getCorrect 是否需要获取正确答案及解析
|
||||
* @return array
|
||||
*/
|
||||
public function getUserSmartPaperDetail(int $paperRecordId, bool $getCorrect): array;
|
||||
|
||||
/**
|
||||
* 获取用户试卷历史列表
|
||||
* @param array $params 参数:campus_id, exam_type_id, page, limit
|
||||
* @param int $userId 用户ID
|
||||
* @return array
|
||||
*/
|
||||
public function getUserSmartPaperList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* 后台获取模板列表
|
||||
* @param array $params 参数
|
||||
* @return array
|
||||
*/
|
||||
public function adminGetTemplateList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取模板详情
|
||||
* @param int $id 模板ID
|
||||
* @return array
|
||||
*/
|
||||
public function getTemplateDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 新增、编辑模板
|
||||
* @param array $params 参数
|
||||
* @return array
|
||||
*/
|
||||
public function editTemplate(array $params): array;
|
||||
|
||||
/**
|
||||
* 删除模板
|
||||
* @param int $id 模板ID
|
||||
* @return array
|
||||
*/
|
||||
public function deleteTemplate(int $id): array;
|
||||
|
||||
/**
|
||||
* 诊断模板题目数量情况
|
||||
* @param int $templateId 模板ID
|
||||
* @return array 各分类题目数量诊断结果
|
||||
*/
|
||||
public function diagnoseTemplateQuestions(int $templateId): array;
|
||||
}
|
||||
31
src/ExamService/JsonRpcInterface/UserPaperInterface.php
Normal file
31
src/ExamService/JsonRpcInterface/UserPaperInterface.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\ExamService\JsonRpcInterface;
|
||||
|
||||
interface UserPaperInterface
|
||||
{
|
||||
/**
|
||||
* 开始做卷
|
||||
*/
|
||||
public function startDoPaper(int $userId, int $paperId): array;
|
||||
|
||||
/**
|
||||
* 获取用户试卷详情
|
||||
*/
|
||||
public function getUserPaperDetail(int $paperRecordId, bool $getCorrect): array;
|
||||
|
||||
/**
|
||||
* 获取用户试卷记录列表
|
||||
*/
|
||||
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;
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
namespace Dhd\Micro\Interface\FileService;
|
||||
|
||||
interface FileService extends
|
||||
FileServiceInterface,
|
||||
QuestionParseInterface,
|
||||
QuestionQrCodeInterface,
|
||||
ExcelParseInterface {}
|
||||
\Dhd\Micro\Interface\FileService\JsonRpcInterface\FileServiceInterface,
|
||||
\Dhd\Micro\Interface\FileService\JsonRpcInterface\QuestionParseInterface,
|
||||
\Dhd\Micro\Interface\FileService\JsonRpcInterface\QuestionQrCodeInterface,
|
||||
\Dhd\Micro\Interface\FileService\JsonRpcInterface\ExcelParseInterface {}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* JsonRpc服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\FileService;
|
||||
namespace Dhd\Micro\Interface\FileService\JsonRpcInterface;
|
||||
|
||||
interface ExcelParseInterface
|
||||
{
|
||||
@@ -4,7 +4,7 @@
|
||||
* JsonRpc服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\FileService;
|
||||
namespace Dhd\Micro\Interface\FileService\JsonRpcInterface;
|
||||
|
||||
interface FileServiceInterface
|
||||
{
|
||||
@@ -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;
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
* JsonRpc服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\FileService;
|
||||
namespace Dhd\Micro\Interface\FileService\JsonRpcInterface;
|
||||
|
||||
interface QuestionParseInterface
|
||||
{
|
||||
@@ -4,7 +4,7 @@
|
||||
* JsonRpc服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\FileService;
|
||||
namespace Dhd\Micro\Interface\FileService\JsonRpcInterface;
|
||||
|
||||
interface QuestionQrCodeInterface
|
||||
{
|
||||
33
src/NoticeService/NoticeAttachmentInterface.php
Normal file
33
src/NoticeService/NoticeAttachmentInterface.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\NoticeService;
|
||||
|
||||
interface NoticeAttachmentInterface
|
||||
{
|
||||
/**
|
||||
* 根据公告ID获取附件列表
|
||||
*/
|
||||
public function getByNoticeId(int $noticeId): array;
|
||||
|
||||
/**
|
||||
* 批量创建附件
|
||||
*/
|
||||
public function batchCreate(int $noticeId, array $attachments): bool;
|
||||
|
||||
/**
|
||||
* 删除公告的所有附件
|
||||
*/
|
||||
public function deleteByNoticeId(int $noticeId): bool;
|
||||
|
||||
/**
|
||||
* 删除单个附件
|
||||
*/
|
||||
public function delete(int $id): bool;
|
||||
|
||||
/**
|
||||
* 增加下载次数
|
||||
*/
|
||||
public function incrementDownloadCount(int $id): bool;
|
||||
}
|
||||
24
src/NoticeService/NoticePositionCollectInterface.php
Normal file
24
src/NoticeService/NoticePositionCollectInterface.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\NoticeService;
|
||||
|
||||
interface NoticePositionCollectInterface
|
||||
{
|
||||
/**
|
||||
* 获取职位收藏列表
|
||||
* @param int $userId 用户ID
|
||||
* @param array $params 参数
|
||||
* @return array
|
||||
*/
|
||||
public function getPositionCollectList(int $userId, array $params): array;
|
||||
|
||||
/**
|
||||
* 职位收藏/取消收藏
|
||||
* @param int $userId 用户ID
|
||||
* @param int $positionId 职位ID
|
||||
* @return string
|
||||
*/
|
||||
public function positionCollect(int $userId, int $positionId): string;
|
||||
}
|
||||
82
src/NoticeService/NoticePositionHistoryInterface.php
Normal file
82
src/NoticeService/NoticePositionHistoryInterface.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\NoticeService;
|
||||
|
||||
interface NoticePositionHistoryInterface
|
||||
{
|
||||
public function getPositionHistoryGroups(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取岗位历史数据列表
|
||||
* @param array $params 查询参数
|
||||
* @return array
|
||||
*/
|
||||
public function getNoticePositionHistoryList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取岗位历史数据详情
|
||||
* @param int $id 岗位历史数据id
|
||||
* @return array
|
||||
*/
|
||||
public function getNoticePositionHistoryDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 获取岗位历史数据年份列表
|
||||
* @param string $originUnitName 岗位名称
|
||||
* @return array
|
||||
*/
|
||||
public function getNoticePositionHistoryYearList(string $originUnitName): array;
|
||||
|
||||
/**
|
||||
* 获取岗位历史数据考区列表
|
||||
* @param string $originUnitName 岗位名称
|
||||
* @return array
|
||||
*/
|
||||
public function getNoticePositionHistoryExamCityList(string $originUnitName): array;
|
||||
|
||||
/**
|
||||
* app端获取岗位历史数据列表
|
||||
* @param array $params
|
||||
* @param int $userId 用户ID
|
||||
* @return array
|
||||
*/
|
||||
public function appGetNoticePositionHistoryList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* app端获取岗位历史数据详情
|
||||
* @param array $ids
|
||||
* @param int $userId
|
||||
* @return array
|
||||
*/
|
||||
public function appGetNoticePositionHistoryDetail(array $ids, int $userId): array;
|
||||
|
||||
/**
|
||||
* 编辑/创建岗位历史数据
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
public function editNoticePositionHistory(array $params): bool;
|
||||
|
||||
/**
|
||||
* 批量导入岗位历史数据
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
public function importNoticePositionHistory(array $params): bool;
|
||||
|
||||
/**
|
||||
* 删除岗位历史数据
|
||||
* @param int $id 岗位历史数据id
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteNoticePositionHistory(int $id): bool;
|
||||
|
||||
/**
|
||||
* 清空岗位
|
||||
* @param array $params 参数
|
||||
* @return bool
|
||||
*/
|
||||
public function cleanNoticePositionHistory(array $params): bool;
|
||||
}
|
||||
80
src/NoticeService/NoticePositionInterface.php
Normal file
80
src/NoticeService/NoticePositionInterface.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\NoticeService;
|
||||
|
||||
interface NoticePositionInterface
|
||||
{
|
||||
/**
|
||||
* 获取岗位列表
|
||||
* @param array $params 查询参数
|
||||
* @return array
|
||||
*/
|
||||
public function getNoticePositionList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取岗位详情
|
||||
* @param int $id 岗位id
|
||||
* @return array
|
||||
*/
|
||||
public function getNoticePositionDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 编辑/创建岗位,若公告ID、单位名称、岗位名称对应的记录存在则进行编辑,否则进行创建
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
public function editNoticePosition(array $params): bool;
|
||||
|
||||
/**
|
||||
* 批量导入岗位
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
public function importNoticePosition(array $params): bool;
|
||||
|
||||
/**
|
||||
* 删除岗位
|
||||
* @param int $id 岗位id
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteNoticePosition(int $id): bool;
|
||||
|
||||
/**
|
||||
* app端获取岗位列表
|
||||
* @param array $params
|
||||
* @param int $userId 用户ID
|
||||
* @return array
|
||||
*/
|
||||
public function appGetNoticePositionList(array $params, int $userId): array;
|
||||
|
||||
/**
|
||||
* app端获取岗位详情
|
||||
* @param array $ids
|
||||
* @param int $userId
|
||||
* @return array
|
||||
*/
|
||||
public function appGetNoticePositionDetail(array $ids, int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取公告岗位城市下拉树
|
||||
* @param int $noticeId 公告ID
|
||||
* @return array
|
||||
*/
|
||||
public function getNoticePositionCityList(int $noticeId): array;
|
||||
|
||||
/**
|
||||
* 清空岗位
|
||||
* @param int $noticeId 公告ID
|
||||
* @return bool
|
||||
*/
|
||||
public function cleanNoticePosition(int $noticeId): bool;
|
||||
|
||||
/**
|
||||
* 更新岗位信息
|
||||
* @param array $params 参数
|
||||
* @return bool
|
||||
*/
|
||||
public function updatePositionInfo(array $params): bool;
|
||||
}
|
||||
24
src/NoticeService/NoticePositionPkInterface.php
Normal file
24
src/NoticeService/NoticePositionPkInterface.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\NoticeService;
|
||||
|
||||
interface NoticePositionPkInterface
|
||||
{
|
||||
/**
|
||||
* 获取职位Pk列表
|
||||
* @param int $userId 用户ID
|
||||
* @param array $params 参数
|
||||
* @return array
|
||||
*/
|
||||
public function getPositionPkList(int $userId, array $params): array;
|
||||
|
||||
/**
|
||||
* 职位Pk/取消Pk
|
||||
* @param int $userId 用户ID
|
||||
* @param int $positionId 职位ID
|
||||
* @return int
|
||||
*/
|
||||
public function positionPk(int $userId, int $positionId): int;
|
||||
}
|
||||
17
src/NoticeService/NoticeService.php
Normal file
17
src/NoticeService/NoticeService.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\NoticeService;
|
||||
|
||||
/**
|
||||
* 公告中心聚合契约(管理后台使用范围)
|
||||
*/
|
||||
interface NoticeService extends
|
||||
NoticeServiceInterface,
|
||||
NoticePositionInterface,
|
||||
NoticePositionHistoryInterface,
|
||||
NoticePositionCollectInterface,
|
||||
NoticePositionPkInterface
|
||||
{
|
||||
}
|
||||
109
src/NoticeService/NoticeServiceInterface.php
Normal file
109
src/NoticeService/NoticeServiceInterface.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\NoticeService;
|
||||
|
||||
interface NoticeServiceInterface
|
||||
{
|
||||
// 公告管理
|
||||
public function getList(array $params): array;
|
||||
|
||||
public function appGetList(array $params): array;
|
||||
|
||||
public function officialGetList(array $params): array;
|
||||
|
||||
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;
|
||||
|
||||
public function create(array $data): int;
|
||||
|
||||
public function update(int $id, array $data): bool;
|
||||
|
||||
public function delete(int $id): bool;
|
||||
|
||||
public function changeStatus(int $id, int $status): bool;
|
||||
|
||||
public function toggleTop(int $id, bool $isTop): bool;
|
||||
|
||||
// 附件管理
|
||||
public function getAttachmentsByNoticeId(int $noticeId): array;
|
||||
|
||||
public function batchCreateAttachments(int $noticeId, array $attachments): bool;
|
||||
|
||||
public function deleteNoticeAttachments(int $noticeId): bool;
|
||||
|
||||
public function deleteAttachment(int $id): bool;
|
||||
|
||||
public function incrementAttachmentDownload(int $id): bool;
|
||||
|
||||
// 点赞收藏
|
||||
public function like(int $noticeId, int $userId): array;
|
||||
public function unLike(int $noticeId, int $userId): array;
|
||||
public function collect(int $noticeId, int $userId): array;
|
||||
public function unCollect(int $noticeId, int $userId): array;
|
||||
|
||||
public function userCollectedNotices(int $userId, array $params): array;
|
||||
|
||||
// 统计日志
|
||||
public function logNoticeView(int $noticeId): void;
|
||||
|
||||
public function logNoticeShare(int $noticeId): void;
|
||||
|
||||
public function logNoticeLike(int $noticeId): void;
|
||||
|
||||
public function logNoticeCancelLike(int $noticeId): void;
|
||||
|
||||
public function logAttachmentDownload(int $noticeId, int $attachmentId): void;
|
||||
|
||||
public function getNoticeStatsLogs(int $noticeId, array $params = []): array;
|
||||
|
||||
public function searchNotices(string $keyword, array $params = []): array;
|
||||
|
||||
public function getChildNotices(int $parentId, array $params = []): array;
|
||||
|
||||
public function attachChildNotices(int $parentId, array $childIds): bool;
|
||||
|
||||
public function detachChildNotices(int $parentId, array $childIds): bool;
|
||||
|
||||
public function getNoticeCalendar(int $year, int $month, int $campusId = 0, int $typeId = 0, int $maxRows = 5): array;
|
||||
|
||||
// 官网备考倒计时
|
||||
public function getExamCountdowns(array $params): array;
|
||||
public function getExamCountdownById(int $id): array;
|
||||
public function createExamCountdown(array $data): int;
|
||||
public function updateExamCountdown(int $id, array $data): bool;
|
||||
public function deleteExamCountdown(int $id): bool;
|
||||
public function changeExamCountdownStatus(int $id, int $status): bool;
|
||||
public function officialGetExamCountdowns(): array;
|
||||
|
||||
// 招考指南
|
||||
public function getStageOptions(): array;
|
||||
|
||||
public function getExamYears(int $typeId = 0, int $campusId = 0): array;
|
||||
|
||||
public function getExamTimeline(int $noticeId = 0, int $typeId = 0, int $examYear = 0, int $campusId = 0): array;
|
||||
|
||||
/**
|
||||
* 按年份分组获取所有主公告及其时间轴
|
||||
*
|
||||
* 返回结构:
|
||||
* [
|
||||
* ['year' => 2025, 'notices' => [
|
||||
* ['notice_id'=>1, 'title'=>'...', 'campus_id'=>5, 'timeline'=>[...]]
|
||||
* ]],
|
||||
* ]
|
||||
*/
|
||||
public function getTimelinesByYear(int $typeId = 0, int $campusId = 0): array;
|
||||
|
||||
public function getTimelineCampuses(int $typeId, int $examYear): array;
|
||||
|
||||
public function getNoticesByYear(array $params): array;
|
||||
|
||||
public function getRelatedNotices(int $noticeId): 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 {}
|
||||
9
src/UserService/AdminUserService.php
Normal file
9
src/UserService/AdminUserService.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService;
|
||||
|
||||
interface AdminUserService extends
|
||||
\Dhd\Micro\Interface\UserService\JsonRpcInterface\admin\AdminUserServiceInterface,
|
||||
\Dhd\Micro\Interface\UserService\JsonRpcInterface\admin\AdminLoginInterface,
|
||||
\Dhd\Micro\Interface\UserService\JsonRpcInterface\admin\AdminMenuInterface,
|
||||
\Dhd\Micro\Interface\UserService\JsonRpcInterface\admin\AdminRoleInterface {}
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface;
|
||||
|
||||
interface UserDownloadRecordInterface
|
||||
{
|
||||
/**
|
||||
* 记录下载
|
||||
*/
|
||||
public function recordDownload(array $params): array;
|
||||
|
||||
/**
|
||||
* 检查是否已下载
|
||||
*/
|
||||
public function checkDownloaded(int $userId, int $resourceType, int $resourceId): array;
|
||||
|
||||
/**
|
||||
* 批量检查是否已下载
|
||||
*/
|
||||
public function batchCheckDownloaded(int $userId, int $resourceType, array $resourceIds): array;
|
||||
|
||||
/**
|
||||
* 获取用户下载记录列表
|
||||
*/
|
||||
public function getUserDownloadList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取资源下载统计
|
||||
*/
|
||||
public function getResourceDownloadStats(int $resourceType, int $resourceId): array;
|
||||
|
||||
/**
|
||||
* 获取用户下载统计
|
||||
*/
|
||||
public function getUserDownloadStats(int $userId): array;
|
||||
|
||||
/**
|
||||
* 删除下载记录
|
||||
*/
|
||||
public function deleteDownloadRecord(int $userId, int $id): array;
|
||||
|
||||
/**
|
||||
* 按来源获取下载历史(课程ID)
|
||||
*/
|
||||
public function getDownloadHistoryBySource(int $userId, int $courseId): array;
|
||||
|
||||
/**
|
||||
* 更新本地存储路径
|
||||
*/
|
||||
public function updateLocalPath(int $userId, int $resourceType, int $resourceId, string $localPath): array;
|
||||
|
||||
/**
|
||||
* 获取下载记录详情
|
||||
*/
|
||||
public function getDownloadRecordDetail(int $userId, int $resourceType, int $resourceId): array;
|
||||
|
||||
/**
|
||||
* 按资源类型获取下载历史
|
||||
*/
|
||||
public function getDownloadHistoryByType(int $userId, int $resourceType): array;
|
||||
|
||||
/**
|
||||
* 获取用户某类型资源的已下载ID列表
|
||||
*/
|
||||
public function getDownloadedResourceIds(int $userId, int $resourceType): array;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 管理员登录接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\admin;
|
||||
|
||||
interface AdminLoginInterface
|
||||
{
|
||||
/**
|
||||
* 登录
|
||||
* @param string $account 账号
|
||||
* @param string $password 密码
|
||||
* @param string $ip IP地址
|
||||
* @return array
|
||||
*/
|
||||
public function login(string $account, string $password, string $ip): array;
|
||||
|
||||
/**
|
||||
* 刷新token
|
||||
* @param string $oldToken 旧token
|
||||
* @return array
|
||||
*/
|
||||
public function refreshToken(string $oldToken): array;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 管理网站菜单管理
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\admin;
|
||||
|
||||
interface AdminMenuInterface
|
||||
{
|
||||
/**
|
||||
* 获取菜单列表
|
||||
* @param array $params 查询参数
|
||||
* @return array
|
||||
*/
|
||||
public function getMenuList(array $params): array;
|
||||
|
||||
/**
|
||||
* 创建、修改菜单
|
||||
* @param array $params 参数
|
||||
* @return array
|
||||
*/
|
||||
public function editMenu(array $params): array;
|
||||
|
||||
/**
|
||||
* 修改菜单状态
|
||||
* @param int $menuId 菜单id
|
||||
* @param int $status 状态
|
||||
* @return array
|
||||
*/
|
||||
public function editMenuStatus(int $menuId, int $status): array;
|
||||
|
||||
/**
|
||||
* 修改菜单排序
|
||||
* @param int $menuId 菜单id
|
||||
* @param int $sort 排序
|
||||
* @return array
|
||||
*/
|
||||
public function editMenuSort(int $menuId, int $sort): array;
|
||||
|
||||
/**
|
||||
* 获取菜单树
|
||||
* @param int $userId 用户id
|
||||
* @return array
|
||||
*/
|
||||
public function getMenuTree(int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取用户菜单列表
|
||||
* @param int $userId 用户id
|
||||
* @return array
|
||||
*/
|
||||
public function getUserMenuList(int $userId): array;
|
||||
|
||||
/**
|
||||
* 获取菜单权限码
|
||||
* @param int $menuId 菜单ID
|
||||
*/
|
||||
public function getButtonCodeList(int $menuId): array;
|
||||
|
||||
/**
|
||||
* 新增、修改权限码
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
public function editButtonCode(array $params): array;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 角色管理
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\admin;
|
||||
|
||||
interface AdminRoleInterface
|
||||
{
|
||||
/**
|
||||
* 获取角色列表
|
||||
* @param array $params 查询参数
|
||||
*/
|
||||
public function getRoleList(array $params): array;
|
||||
|
||||
/**
|
||||
* 新增/修改角色
|
||||
* @param array $params
|
||||
*/
|
||||
public function editRole(array $params): array;
|
||||
|
||||
/**
|
||||
* 修改角色状态
|
||||
* @param int $roleId 角色ID
|
||||
* @param int $status 状态
|
||||
*/
|
||||
public function editRoleStatus(int $roleId, int $status): array;
|
||||
|
||||
/**
|
||||
* 删除角色
|
||||
* @param int $roleId
|
||||
*/
|
||||
public function deleteRole(int $roleId): array;
|
||||
|
||||
/**
|
||||
* 获取所有角色,用于下拉选择
|
||||
*/
|
||||
public function getRoleSelectList(): array;
|
||||
|
||||
/**
|
||||
* 获取管理员户权限码
|
||||
* @param int $userId
|
||||
*/
|
||||
public function getUserCodes(int $userId): array;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 管理员服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\admin;
|
||||
|
||||
interface AdminUserServiceInterface
|
||||
{
|
||||
/**
|
||||
* 获取管理员列表
|
||||
* @param array $params 查询参数
|
||||
* @return array
|
||||
*/
|
||||
public function getList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取所有管理员列表
|
||||
*/
|
||||
public function getAllAdminList(): array;
|
||||
|
||||
/**
|
||||
* 根据id获取管理员信息
|
||||
* @@param int $userId 管理员id
|
||||
* @return array 管理员信息
|
||||
*/
|
||||
public function getUserInfoById(int $userId): array;
|
||||
|
||||
/**
|
||||
* 创建、修改管理员
|
||||
* @param array $params 创建参数
|
||||
* @return array
|
||||
*/
|
||||
public function editUser(array $params): array;
|
||||
|
||||
/**
|
||||
* 修改管理员密码
|
||||
* @param int $userId 管理员id
|
||||
* @param string $password 新密码
|
||||
* @return array
|
||||
*/
|
||||
public function editPassword(int $userId, string $password): array;
|
||||
}
|
||||
47
src/UserService/JsonRpcInterface/user/FeedbackInterface.php
Normal file
47
src/UserService/JsonRpcInterface/user/FeedbackInterface.php
Normal 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 array
|
||||
*/
|
||||
public function adminHandleFeedback(int $id, int $handlerId, array $params): array;
|
||||
}
|
||||
144
src/UserService/JsonRpcInterface/user/LoginServiceInterface.php
Executable file
144
src/UserService/JsonRpcInterface/user/LoginServiceInterface.php
Executable file
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* JsonRpc服务接口
|
||||
* 登录服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\user;
|
||||
|
||||
interface LoginServiceInterface
|
||||
{
|
||||
/**
|
||||
* 用户账号、密码登录
|
||||
* @param array $params [account,password,ip] 均为必填
|
||||
* @return array
|
||||
*/
|
||||
public function login(array $params): null|array;
|
||||
|
||||
/**
|
||||
* 用户账号、密码注册
|
||||
* @param array $params [account,password] 均为必填
|
||||
* @return array
|
||||
*/
|
||||
public function register(array $params): array;
|
||||
|
||||
/**
|
||||
* 刷新token
|
||||
* @param string $oldToken 旧token
|
||||
* @return array 新token
|
||||
*/
|
||||
public function refreshToken(string $oldToken): array;
|
||||
|
||||
/**
|
||||
* 获取短信验证码key,用于发送验证码
|
||||
* @return array
|
||||
*/
|
||||
public function getSmsKey(): array;
|
||||
|
||||
/**
|
||||
* 发送手机号登录/注册,短信验证码
|
||||
* @param string $phone 手机号
|
||||
* @param string $key 验证码key
|
||||
* @return array
|
||||
*/
|
||||
public function sendLoginSmsCode(string $phone, string $key): array;
|
||||
|
||||
/**
|
||||
* 手机号登录/注册
|
||||
* @param string $phone 手机号
|
||||
* @param string $smsCode 验证码
|
||||
* @param string $ip ip地址
|
||||
* @param int $loginType 登录方式
|
||||
* @return array
|
||||
*/
|
||||
public function loginByPhone(string $phone, string $smsCode, string $ip, int $loginType): array;
|
||||
|
||||
/**
|
||||
* 微信登录
|
||||
* @param string $code 微信code
|
||||
* @param string $ip ip地址
|
||||
* @return array
|
||||
*/
|
||||
public function wxLogin(string $code, string $ip): array;
|
||||
|
||||
/**
|
||||
* 微信绑定用户
|
||||
* @param string $bindId 微信绑定id
|
||||
* @param string $phone 手机号
|
||||
* @param string $smsCode 验证码
|
||||
* @param string $ip ip地址
|
||||
* @return array
|
||||
*/
|
||||
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
|
||||
*/
|
||||
public function getOfficialLoginQrCode(): array;
|
||||
|
||||
/**
|
||||
* 轮询官网登录状态
|
||||
* @param string $code 官网登录二维码code
|
||||
* @return array
|
||||
*/
|
||||
public function pollOfficialLoginStatus(string $code): array;
|
||||
|
||||
/**
|
||||
* app扫码登录官网
|
||||
* @param int $uid 用户id
|
||||
* @param string $code 官网登录二维码code
|
||||
* @param string $ip ip地址
|
||||
* @return array
|
||||
*/
|
||||
public function appScanOfficialLogin(int $uid, string $code, string $ip): array;
|
||||
|
||||
/**
|
||||
* 密钥登录
|
||||
* @param int $uid 用户id
|
||||
* @param string $ip ip地址
|
||||
* @param string $key1 密钥1
|
||||
* @param string $key2 密钥2
|
||||
* @param string $key3 密钥3
|
||||
* @return array
|
||||
*/
|
||||
public function loginBySecretKey(int $uid, string $ip, string $key1, string $key2, string $key3): array;
|
||||
|
||||
/**
|
||||
* 极光一键登录
|
||||
* @param string $loginToken 极光返回的loginToken
|
||||
* @param string $ip ip地址
|
||||
* @return array
|
||||
*/
|
||||
public function jiguangLogin(string $loginToken, string $ip): array;
|
||||
|
||||
/**
|
||||
* 获取极光配置信息
|
||||
* @return array
|
||||
*/
|
||||
public function getJiguangConfig(): array;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\user;
|
||||
|
||||
/**
|
||||
* 用户成绩弹幕(晒分)接口
|
||||
*/
|
||||
interface StudentScoreInterface
|
||||
{
|
||||
/**
|
||||
* 获取成绩弹幕列表(后台管理)
|
||||
*/
|
||||
public function getStudentScoreList(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取成绩弹幕列表(前端展示)
|
||||
*/
|
||||
public function getStudentScoreBarrage(array $params): array;
|
||||
|
||||
/**
|
||||
* 获取成绩弹幕详情
|
||||
*/
|
||||
public function getStudentScoreDetail(int $id): array;
|
||||
|
||||
/**
|
||||
* 新增/编辑成绩弹幕
|
||||
*/
|
||||
public function editStudentScore(array $data): int;
|
||||
|
||||
/**
|
||||
* 删除成绩弹幕
|
||||
*/
|
||||
public function deleteStudentScore(int $id): bool;
|
||||
|
||||
/**
|
||||
* 批量删除成绩弹幕
|
||||
*/
|
||||
public function batchDeleteStudentScore(array $ids): bool;
|
||||
|
||||
/**
|
||||
* 修改显示状态
|
||||
*/
|
||||
public function editStudentScoreShow(int $id, int $isShow): bool;
|
||||
|
||||
/**
|
||||
* 修改排序
|
||||
*/
|
||||
public function editStudentScoreSort(int $id, int $sort): bool;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\user;
|
||||
|
||||
interface UserCurriculumVitaeInterface
|
||||
{
|
||||
/**
|
||||
* 获取用户简历
|
||||
* @param int $userId 用户id
|
||||
* @return array
|
||||
*/
|
||||
public function getCurriculumVitae(int $userId): array;
|
||||
/**
|
||||
* 编辑用户简历
|
||||
* @param array $params 简历参数
|
||||
* @param int $userId 用户id
|
||||
* @return void
|
||||
*/
|
||||
public function editCurriculumVitae(array $params, int $userId): array;
|
||||
/**
|
||||
* 删除用户教育经历
|
||||
* @param int $userId 用户id
|
||||
* @param int $educationId 教育经历id
|
||||
* @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;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\user;
|
||||
|
||||
interface UserInfoCheckInterface
|
||||
{
|
||||
/**
|
||||
* 用户提交信息修改
|
||||
* @param int $userId 用户ID
|
||||
* @param int $type 修改信息类型
|
||||
* @param string $data 修改信息
|
||||
* @return void
|
||||
*/
|
||||
public function submitUserInfo(int $userId, int $type, string $data): array;
|
||||
|
||||
/**
|
||||
* 获取用户信息修改审核列表
|
||||
* @param array $params 参数
|
||||
* @return array
|
||||
*/
|
||||
public function getUserInfoCheckList(array $params): array;
|
||||
|
||||
/**
|
||||
* 审核用户信息修改
|
||||
* @param int $adminUserId 管理员用户ID
|
||||
* @param array $params 参数
|
||||
* @return void
|
||||
*/
|
||||
public function checkUserInfo(int $adminUserId, array $params): array;
|
||||
}
|
||||
78
src/UserService/JsonRpcInterface/user/UserServiceInterface.php
Executable file
78
src/UserService/JsonRpcInterface/user/UserServiceInterface.php
Executable file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 用户服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\user;
|
||||
|
||||
interface UserServiceInterface
|
||||
{
|
||||
/**
|
||||
* 根据token获取用户信息
|
||||
* @param string $token 登录token
|
||||
* @return array 用户信息
|
||||
*/
|
||||
public function getUserInfoByToken(string $token): array;
|
||||
|
||||
/**
|
||||
* 根据id获取用户信息
|
||||
* @@param int $uid 用户id
|
||||
* @return array 用户信息
|
||||
*/
|
||||
public function getUserInfoById(int $uid): array;
|
||||
|
||||
/**
|
||||
* 同步用户信息,从原来的app用户表同步过来,后期全面更换为微服务后将删除该接口
|
||||
* @param int $uid 用户原id
|
||||
* @return array
|
||||
*/
|
||||
public function syncUserInfo(int $uid): array;
|
||||
|
||||
|
||||
/**
|
||||
* 修改用户密码
|
||||
* @param int $uid 用户id
|
||||
* @param string $pwd 新密码
|
||||
* @return array
|
||||
*/
|
||||
public function editUserPwd(int $uid, string $pwd): array;
|
||||
|
||||
/**
|
||||
* 修改用户昵称
|
||||
* @param int $uid 用户id
|
||||
* @param string $nickName 新昵称
|
||||
* @return array
|
||||
*/
|
||||
public function editUserNickName(int $uid, string $nickName): array;
|
||||
|
||||
/**
|
||||
* 获取用户新增数据
|
||||
*/
|
||||
public function getUserGrowData(): array;
|
||||
|
||||
/**
|
||||
* 获取用户列表
|
||||
*/
|
||||
public function getUserList(array $params): array;
|
||||
|
||||
/**
|
||||
* 统计用户数据
|
||||
*/
|
||||
public function getUserTotalByDateType(string $dateType): array;
|
||||
|
||||
/**
|
||||
* 用户注销
|
||||
* @param int $uid 用户ID
|
||||
* @return mixed
|
||||
*/
|
||||
public function userCancel(int $uid): array;
|
||||
|
||||
/**
|
||||
* 设置用户学生信息,若手机号已存在则更新
|
||||
* @param string $phone 手机号
|
||||
* @param array $params 参数
|
||||
* @return mixed
|
||||
*/
|
||||
public function setUserStudentInfoByPhone(string $phone, array $params): array;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService\JsonRpcInterface\wechat;
|
||||
|
||||
interface WecheatMiniInterface
|
||||
{
|
||||
/**
|
||||
* 通过微信手机授权code进行登录
|
||||
* @param string $code 微信授权code
|
||||
* @param string $ip ip
|
||||
* @return array
|
||||
*/
|
||||
public function loginWithPhoneCode(string $code, string $ip): array;
|
||||
}
|
||||
16
src/UserService/UserService.php
Executable file
16
src/UserService/UserService.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 用户中心服务
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService;
|
||||
|
||||
interface UserService extends
|
||||
\Dhd\Micro\Interface\UserService\JsonRpcInterface\user\LoginServiceInterface,
|
||||
\Dhd\Micro\Interface\UserService\JsonRpcInterface\user\UserServiceInterface,
|
||||
\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\FeedbackInterface {}
|
||||
11
src/UserService/WecheatMiniService.php
Normal file
11
src/UserService/WecheatMiniService.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 微信小程序服务
|
||||
* 公共
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\UserService;
|
||||
|
||||
interface WecheatMiniService extends
|
||||
\Dhd\Micro\Interface\UserService\JsonRpcInterface\wechat\WecheatMiniInterface {}
|
||||
Reference in New Issue
Block a user