supeng hace 1 mes
padre
commit
56783a0f94

+ 2 - 2
content-understanding-core/src/main/java/com/tzld/piaoquan/content/understanding/service/ContentService.java

@@ -11,7 +11,7 @@ public interface ContentService {
     /**
      * 内容分析处理
      *
-     * @param request
+     * @param param
      */
-    void analyse(CommonRequest<ContentAnalyseParam> request);
+    void analyse(ContentAnalyseParam param);
 }

+ 3 - 5
content-understanding-core/src/main/java/com/tzld/piaoquan/content/understanding/service/impl/ContentServiceImpl.java

@@ -27,12 +27,10 @@ public class ContentServiceImpl implements ContentService {
     private PipelineService pipelineService;
 
     @Override
-    public void analyse(CommonRequest<ContentAnalyseParam> request) {
-        if (Objects.isNull(request) || Objects.isNull(request.getParams())
-                || Objects.isNull(request.getParams().getPipelineId()) || Objects.isNull(request.getParams().getType())) {
+    public void analyse(ContentAnalyseParam param) {
+        if (Objects.isNull(param) || Objects.isNull(param.getPipelineId()) || Objects.isNull(param.getType())) {
             throw new CommonException(ExceptionEnum.PARAMS_INVALID);
         }
-        ContentAnalyseParam params = request.getParams();
-        pipelineService.execute(params);
+        pipelineService.execute(param);
     }
 }

+ 2 - 2
content-understanding-server/src/main/java/com/tzld/piaoquan/content/understanding/controller/ContentController.java

@@ -24,8 +24,8 @@ public class ContentController {
     private ContentService contentService;
 
     @PostMapping(value = "/analyse")
-    public CommonResponse<String> analyse(@RequestBody CommonRequest<ContentAnalyseParam> commonRequest) {
-        contentService.analyse(commonRequest);
+    public CommonResponse<String> analyse(@RequestBody ContentAnalyseParam param) {
+        contentService.analyse(param);
         return CommonResponse.create();
     }