Explorar el Código

refactor(ThirdParty): 新增获取配置 DTO 方法

- 在 WebhookReceiver 服务中添加了抽象方法 getConfigDto
- 要求子类实现该方法并返回 Config 对象
- 为后续的参数校验和处理逻辑做准备
notfff hace 6 meses
padre
commit
a8a3f2120d
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  1. 9 0
      app/Module/ThirdParty/Services/WebhookReceiver.php

+ 9 - 0
app/Module/ThirdParty/Services/WebhookReceiver.php

@@ -2,6 +2,8 @@
 
 namespace App\Module\ThirdParty\Services;
 
+use App\Module\ThirdParty\Dto\Config;
+use App\Module\ThirdParty\Dto\Credential;
 use App\Module\ThirdParty\Models\ThirdPartyService as ServiceModel;
 use App\Module\ThirdParty\Models\ThirdPartyLog;
 use App\Module\ThirdParty\Enums\LOG_LEVEL;
@@ -111,6 +113,13 @@ abstract class WebhookReceiver
     abstract protected function handler(string $action, Request $request): array;
 
 
+    /**
+     *
+     * @return Config
+     */
+    abstract protected function getConfigDto():Config;
+
+
 
     /**
      * 验证请求格式(由子类重写)