supeng 1 day ago
parent
commit
bc645e7a5d

+ 7 - 1
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/integration/ContentDeconstructionClusterClient.java

@@ -98,9 +98,15 @@ public class ContentDeconstructionClusterClient {
         if (contentList == null || contentList.isEmpty()) {
             throw new BizException(ExceptionEnum.DATA_NOT_EXIST, "任务内容不存在");
         }
-        String contentId = contentList.get(0).getContentId();
+        SdExecutionTaskContent sdExecutionTaskContent = contentList.get(0);
+        String contentId = sdExecutionTaskContent.getContentId();
         content.setChannel_content_id(contentId);
         if (Objects.equals(sdExecutionTask.getContentType(), ContentTypeEnum.VIDEO.getValue())) {
+            ContentInputParamsDTO contentInputParamsDTO = JSON.parseObject(sdExecutionTaskContent.getInputParams(), ContentInputParamsDTO.class);
+            if (Objects.nonNull(contentInputParamsDTO) && Objects.nonNull(contentInputParamsDTO.getMergeCate2())) {
+                String mergeCate2 = contentInputParamsDTO.getMergeCate2();
+                content.setMerge_leve2(mergeCate2);
+            }
             Long videoId = Long.parseLong(contentId);
             //获取视频信息
             WxVideoV2VO wxVideoV2VO = getVideoInfo(videoId);

+ 4 - 0
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/model/dto/ContentInputParamsDTO.java

@@ -10,4 +10,8 @@ public class ContentInputParamsDTO {
      * 聚类接口参数:weight_score
      */
     private Double weightScore;
+    /**
+     * 二级品类
+     */
+    private String mergeCate2;
 }

+ 2 - 0
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/model/request/DeconstructionTaskSubmitParam.java

@@ -19,5 +19,7 @@ public class DeconstructionTaskSubmitParam {
         private String title;
         private String channel_account_id;
         private String channel_account_name;
+        //二级品类
+        private String merge_leve2;
     }
 }

+ 2 - 0
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/service/ExecutionTaskService.java

@@ -46,8 +46,10 @@ public interface ExecutionTaskService {
     /**
      * 昨日回流Top内容定时解构
      */
+    @Deprecated
     void yesterdayTopReturnVideoExecutionTaskCreateHandler();
 
+    @Deprecated
     void historyTopReturnVideoExecutionTaskCreateHandler(String params);
 
     void videoDeconstructionSelectTopicExecutionTaskCreateHandler(String params);

+ 8 - 0
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/service/impl/ExecutionTaskServiceImpl.java

@@ -384,6 +384,7 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
                 sdExecutionTaskContent.setContentType(ContentTypeEnum.VIDEO.getValue());
                 sdExecutionTaskContent.setContentId(videoId);
                 sdExecutionTaskContent.setContent(null);
+
                 List<SdExecutionTaskContent> contentList = new ArrayList<>();
                 contentList.add(sdExecutionTaskContent);
                 boolean createResult = executionTaskCreateService.create(sdExecutionTask, contentList);
@@ -642,6 +643,8 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
         for (DeconstructionODPSRecordInfo record : needCreateTaskRecords) {
             try {
                 String videoId = record.getChannelContentId();
+                //二级品类
+                String mergeCate2 = record.getMergeCate2();
                 SdExecutionTask sdExecutionTask = new SdExecutionTask();
                 sdExecutionTask.setTaskNo(IdGeneratorUtil.generateExecutionTaskNo());
                 sdExecutionTask.setTaskType(TaskTypeEnum.DECONSTRUCT.getValue());
@@ -657,6 +660,11 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
                 sdExecutionTaskContent.setContentType(ContentTypeEnum.VIDEO.getValue());
                 sdExecutionTaskContent.setContentId(videoId);
                 sdExecutionTaskContent.setContent(null);
+                ContentInputParamsDTO contentInputParamsDTO = new ContentInputParamsDTO();
+                if (Objects.nonNull(mergeCate2)) {
+                    contentInputParamsDTO.setMergeCate2(mergeCate2);
+                }
+                sdExecutionTaskContent.setInputParams(JSONObject.toJSONString(contentInputParamsDTO));
                 List<SdExecutionTaskContent> contentList = new ArrayList<>();
                 contentList.add(sdExecutionTaskContent);
                 boolean createResult = executionTaskCreateService.create(sdExecutionTask, contentList);

+ 2 - 0
supply-demand-engine-job/src/main/java/com/tzld/piaoquan/sde/job/ExecutionTaskJob.java

@@ -64,6 +64,7 @@ public class ExecutionTaskJob {
      * @param params
      * @return
      */
+    @Deprecated
     @XxlJob("yesterdayTopReturnVideoExecutionTaskCreateHandler")
     public ReturnT<String> yesterdayTopReturnVideoExecutionTaskCreateHandler(String params) {
         XxlJobLogger.log("yesterdayTopReturnVideoExecutionTaskCreateHandler start");
@@ -79,6 +80,7 @@ public class ExecutionTaskJob {
         return ReturnT.SUCCESS;
     }
 
+    @Deprecated
     @XxlJob("historyTopReturnVideoExecutionTaskCreateHandler")
     public ReturnT<String> historyTopReturnVideoExecutionTaskCreateHandler(String params) {
         XxlJobLogger.log("historyTopReturnVideoExecutionTaskCreateHandler start");