From 6fa83dd19392460a892a7cc27d58a6f6699d8b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A0=82=E5=90=89=E8=AF=83=E5=BE=B7=E6=8B=89=E6=9B=BC?= =?UTF-8?q?=E6=9F=A5=E7=9A=84=E8=8B=B1=E8=B1=AA?= Date: Thu, 6 Aug 2026 09:37:22 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"DataService=E5=A5=91=E7=BA=A6?= =?UTF-8?q?=E6=8C=89=E5=AE=9E=E9=99=85=E6=8F=90=E4=BE=9B=E6=96=B9=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=EF=BC=8C=E6=8B=86=E5=88=86Course/Exam=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=A5=91=E7=BA=A6=E5=B9=B6=E8=A1=A5=E6=B6=88=E8=B4=B9?= =?UTF-8?q?=E8=80=85=E9=85=8D=E7=BD=AE"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 64a5645e6075ebd3c263d366a1d6a7b10dfb47fe. --- consumers/course_service.php | 44 ------------------- consumers/exam_service.php | 40 ----------------- .../Course}/CourseServiceInterface.php | 2 +- src/DataService/DataService.php | 7 ++- .../Exam}/ExamServiceInterface.php | 5 ++- .../Exam}/GufenPaperInterface.php | 2 +- 6 files changed, 12 insertions(+), 88 deletions(-) delete mode 100644 consumers/course_service.php delete mode 100644 consumers/exam_service.php rename src/{CourseService => DataService/Course}/CourseServiceInterface.php (87%) rename src/{ExamService => DataService/Exam}/ExamServiceInterface.php (99%) rename src/{ExamService => DataService/Exam}/GufenPaperInterface.php (73%) diff --git a/consumers/course_service.php b/consumers/course_service.php deleted file mode 100644 index 6791a37..0000000 --- a/consumers/course_service.php +++ /dev/null @@ -1,44 +0,0 @@ - 'CourseService', - // 服务接口名 - 'service' => CourseServiceInterface::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, - ], - ], -]; diff --git a/consumers/exam_service.php b/consumers/exam_service.php deleted file mode 100644 index 4ef2b8c..0000000 --- a/consumers/exam_service.php +++ /dev/null @@ -1,40 +0,0 @@ - 'ExamService', - // 服务接口名 - 'service' => ExamServiceInterface::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, - ], - ], -]; diff --git a/src/CourseService/CourseServiceInterface.php b/src/DataService/Course/CourseServiceInterface.php similarity index 87% rename from src/CourseService/CourseServiceInterface.php rename to src/DataService/Course/CourseServiceInterface.php index 0ffc725..8a34700 100644 --- a/src/CourseService/CourseServiceInterface.php +++ b/src/DataService/Course/CourseServiceInterface.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Dhd\Micro\Interface\CourseService; +namespace Dhd\Micro\Interface\DataService\Course; /** * 课程服务接口 diff --git a/src/DataService/DataService.php b/src/DataService/DataService.php index 34238d4..6e0e219 100644 --- a/src/DataService/DataService.php +++ b/src/DataService/DataService.php @@ -6,6 +6,9 @@ namespace Dhd\Micro\Interface\DataService; +use Dhd\Micro\Interface\DataService\Course\CourseServiceInterface; +use Dhd\Micro\Interface\DataService\Exam\ExamServiceInterface; + interface DataService extends DataServiceInterface, AgreementInterface, @@ -21,4 +24,6 @@ interface DataService extends ExcelHeaderFieldsInterface, DictionaryInterface, MajorsInterface, - GuideNavInterface {} + GuideNavInterface, + CourseServiceInterface, + ExamServiceInterface {} diff --git a/src/ExamService/ExamServiceInterface.php b/src/DataService/Exam/ExamServiceInterface.php similarity index 99% rename from src/ExamService/ExamServiceInterface.php rename to src/DataService/Exam/ExamServiceInterface.php index 19c8a83..bb374ac 100644 --- a/src/ExamService/ExamServiceInterface.php +++ b/src/DataService/Exam/ExamServiceInterface.php @@ -1,6 +1,6 @@