supeng пре 6 дана
родитељ
комит
9830d77bbd

+ 3 - 3
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/config/ThreadPoolConfig.java

@@ -60,13 +60,13 @@ public class ThreadPoolConfig {
      * 3. 第三方调用/通知专用线程池 (可选)
      * 如:发送邮件、短信、Webhook
      */
-    @Bean("subTaskExecutor")
-    public Executor subTaskExecutor() {
+    @Bean("executionTaskExecutor")
+    public Executor executionTaskExecutor() {
         ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
         executor.setCorePoolSize(4);
         executor.setMaxPoolSize(8);
         executor.setQueueCapacity(500);
-        executor.setThreadNamePrefix("subtask-pool-");
+        executor.setThreadNamePrefix("execution-task-pool-");
         executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
         executor.initialize();
         return executor;

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

@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
 import java.util.concurrent.TimeUnit;
@@ -87,7 +88,6 @@ public class ContentDeconstructionClusterClient {
         if (contentList == null || contentList.isEmpty()) {
             throw new BizException(ExceptionEnum.DATA_NOT_EXIST, "任务内容不存在");
         }
-//        String contentId = sdExecutionTask.getContentId();
         String contentId = contentList.get(0).getContentId();
         content.setChannel_content_id(contentId);
         if (Objects.equals(sdExecutionTask.getContentType(), ContentTypeEnum.VIDEO.getValue())) {
@@ -214,7 +214,6 @@ public class ContentDeconstructionClusterClient {
         ClusterTaskSubmitParam param = new ClusterTaskSubmitParam();
         param.setScene(SenceTypeEnum.TOPIC_SELECTION.getValue());
         param.setContent_type(sdExecutionTask.getContentType());
-        DeconstructionTaskSubmitParam.Content content = new DeconstructionTaskSubmitParam.Content();
         Long executionTaskId = sdExecutionTask.getId();
         LambdaQueryWrapper<SdExecutionTaskContent> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(SdExecutionTaskContent::getExecutionTaskId, executionTaskId)
@@ -223,28 +222,33 @@ public class ContentDeconstructionClusterClient {
         if (contentList == null || contentList.isEmpty()) {
             throw new BizException(ExceptionEnum.DATA_NOT_EXIST, "任务内容不存在");
         }
-//        String contentId = sdExecutionTask.getContentId();
-        String contentId = contentList.get(0).getContentId();
-        content.setChannel_content_id(contentId);
+        //支持视频
+        List<ClusterTaskSubmitParam.Content> contents = new ArrayList<>();
         if (Objects.equals(sdExecutionTask.getContentType(), ContentTypeEnum.VIDEO.getValue())) {
-            Long videoId = Long.parseLong(contentId);
-            //获取视频信息
-            WxVideoV2VO wxVideoV2VO = getVideoInfo(videoId);
-            if (Objects.isNull(wxVideoV2VO)) {
-                throw new BizException(ExceptionEnum.DATA_NOT_EXIST, "videoInfo get error videoId:" + videoId);
-            }
-            String videoPath = wxVideoV2VO.getVideoPath();
-            if (Objects.isNull(videoPath) || videoPath.endsWith(".m3u8")) {
-                throw new BizException(ExceptionEnum.DATA_ERROR, "视频格式不支持解构 videoId:" + videoId + ",videoPath:" + videoPath);
-            }
-            content.setTitle(wxVideoV2VO.getTitle());
-            content.setVideo_url(videoPath);
-            content.setChannel_account_id(wxVideoV2VO.getUid().toString());
-            if (Objects.nonNull(wxVideoV2VO.getUser())) {
-                content.setChannel_account_name(wxVideoV2VO.getUser().getNickName());
+            for (SdExecutionTaskContent sdExecutionTaskContent : contentList) {
+                ClusterTaskSubmitParam.Content content = new ClusterTaskSubmitParam.Content();
+                String contentId = sdExecutionTaskContent.getContentId();
+                content.setChannel_content_id(contentId);
+                Long videoId = Long.parseLong(contentId);
+                //获取视频信息
+                WxVideoV2VO wxVideoV2VO = getVideoInfo(videoId);
+                if (Objects.isNull(wxVideoV2VO)) {
+                    throw new BizException(ExceptionEnum.DATA_NOT_EXIST, "videoInfo get error videoId:" + videoId);
+                }
+                String videoPath = wxVideoV2VO.getVideoPath();
+                if (Objects.isNull(videoPath) || videoPath.endsWith(".m3u8")) {
+                    throw new BizException(ExceptionEnum.DATA_ERROR, "视频格式不支持解构 videoId:" + videoId + ",videoPath:" + videoPath);
+                }
+                content.setTitle(wxVideoV2VO.getTitle());
+                content.setVideo_url(videoPath);
+                content.setChannel_account_id(wxVideoV2VO.getUid().toString());
+                if (Objects.nonNull(wxVideoV2VO.getUser())) {
+                    content.setChannel_account_name(wxVideoV2VO.getUser().getNickName());
+                }
+                contents.add(content);
             }
         }
-//        param.setContents(content);
+        param.setContents(contents);
         //提交任务
         return submitClusterTask(param);
     }
@@ -253,18 +257,18 @@ public class ContentDeconstructionClusterClient {
     private String submitClusterTask(ClusterTaskSubmitParam param) {
         RequestBody body = RequestBody.create(MEDIA_TYPE, JSON.toJSONString(param));
         Request request = new Request.Builder()
-                .url(deconstructionTaskSubmitUrl)
+                .url(clusterTaskSubmitUrl)
                 .post(body)
                 .addHeader("Content-Type", "application/json")
                 .addHeader("Accept", "application/json")
                 .build();
-        log.info("submitDeconstructionTask deconstructionTaskSubmitUrl= {} param = {}", deconstructionTaskSubmitUrl, JSON.toJSONString(param));
+        log.info("submitClusterTask clusterTaskSubmitUrl= {} param = {}", clusterTaskSubmitUrl, JSON.toJSONString(param));
         try (Response response = client.newCall(request).execute()) {
             if (!response.isSuccessful()) {
                 throw new HttpServiceException(ExceptionEnum.HTTP_REQUEST_ERROR.getCode(), "code: " + response.code() + ", msg: " + response.message());
             }
             String respBody = response.body().string();
-            log.info("submitDeconstructionTask respBody = {}", respBody);
+            log.info("submitClusterTask respBody = {}", respBody);
             // 5. 反序列化返回值
             ApiResponse<SubmitResponseDataDTO> apiResponse = JSON.parseObject(respBody, new TypeReference<ApiResponse<SubmitResponseDataDTO>>() {
             });

+ 17 - 0
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/model/dto/cluster/ClusterExecutionConfigDTO.java

@@ -0,0 +1,17 @@
+package com.tzld.piaoquan.sde.model.dto.cluster;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author supeng
+ */
+@Data
+public class ClusterExecutionConfigDTO {
+    private String contentScope;
+    private List<String> categories;
+    private Integer minThreshold = 5;
+    private Integer maxLimit = 100;
+    private List<String> contentIds;
+}

+ 2 - 2
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/model/vo/SdWorkflowTaskVO.java

@@ -55,11 +55,11 @@ public class SdWorkflowTaskVO {
     /**
      * 子任务总数
      */
-    private Integer subTaskCount;
+    private Integer executionTaskCount;
     /**
      * 已结束的子任务数
      */
-    private Integer finishedSubTaskCount;
+    private Integer finishedExecutionTaskCount;
     /**
      * 任务实际结束时间,仅在状态转为SUCCESS/FAILED/TIMEOUT时填入
      */

+ 1 - 1
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/service/ExecutionTaskCreateService.java

@@ -10,5 +10,5 @@ import java.util.List;
  */
 public interface ExecutionTaskCreateService {
 
-    boolean create(SdExecutionTask sdSubTask, List<SdExecutionTaskContent> contentList);
+    boolean create(SdExecutionTask sdExecutionTask, List<SdExecutionTaskContent> contentList);
 }

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

@@ -15,9 +15,9 @@ import java.util.List;
  */
 public interface ExecutionTaskService {
 
-    boolean create(SdExecutionTask sdSubTask);
+    boolean create(SdExecutionTask sdExecutionTask);
 
-    void create(List<SdExecutionTask> sdSubTasks);
+    void create(List<SdExecutionTask> sdExecutionTasks);
 
     /**
      * 任务列表
@@ -51,5 +51,5 @@ public interface ExecutionTaskService {
     /**
      * 聚类
      */
-    void clusterExecutionTaskCreateHandler();
+    void manualClusterExecutionTaskCreateHandler(String params);
 }

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

@@ -12,6 +12,7 @@ import com.tzld.piaoquan.sde.common.exception.HttpServiceException;
 import com.tzld.piaoquan.sde.integration.ContentDeconstructionClusterClient;
 import com.tzld.piaoquan.sde.mapper.*;
 import com.tzld.piaoquan.sde.model.dto.SdExecutionTaskPropertiesDTO;
+import com.tzld.piaoquan.sde.model.dto.cluster.ClusterExecutionConfigDTO;
 import com.tzld.piaoquan.sde.model.dto.deconstruction.QueryResponseDataDTO;
 import com.tzld.piaoquan.sde.model.entity.SdExecutionTask;
 import com.tzld.piaoquan.sde.model.entity.SdExecutionTaskContent;
@@ -35,7 +36,6 @@ import java.time.LocalDateTime;
 import java.time.ZoneId;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
 
 /**
  * @author supeng
@@ -58,12 +58,13 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
     private SdExecutionTaskContentMapper sdExecutionTaskContentMapper;
 
     private static final String YESTERDAY_RETURN_TOP10_VIDEO_SCOPE = "yesterday_return_top10_video_scope";
+    private static final String MANUAL_SELECT_VIDEO_SCOPE = "manual_select_video_scope";
 
     @Value("${yesterday.return.video.table:loghubods.lastday_return}")
     private String yesterdayReturnVideoTable;
 
-    @Value("${yesterday.return.video.table:loghubods.lastday_return}")
-    private String clusterVideoTable;
+//    @Value("${video.tag.table:loghubods.video_merge_tag}")
+//    private String videoTagTable;
 
     private static final Integer TOP_N = 10;
 
@@ -138,7 +139,7 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
     public void executionTaskSubmitHandler() {
         long start = System.nanoTime();
         log.info("executionTaskSubmitHandler start");
-        // 6 小时前
+        // N 小时前
         Date hourAgo = Date.from(
                 LocalDateTime.now()
                         .minusHours(6)
@@ -166,7 +167,7 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
                         jobId = contentDeconstructionClusterClient.submitDeconstructionTask(sdExecutionTask);
                         break;
                     case CLUSTER:
-//                        jobId = contentDeconstructionClusterClient.submitClusterTask(sdExecutionTask);
+                        jobId = contentDeconstructionClusterClient.submitClusterTask(sdExecutionTask);
                         break;
                     default:
                         log.error("executionTaskTypeEnum is illegal.");
@@ -177,7 +178,7 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
                     update.setErrorMsg("任务提交失败:未获取到jobId");
                     update.setTaskStatus(ExecutionTaskStatusEnum.FAILED.getValue());
                     int rows = sdExecutionTaskMapper.updateById(update);
-                    log.info("subTask submit failure, id:{} rows = {}", sdExecutionTask.getId(), rows);
+                    log.info("executionTask submit failure, id:{} rows = {}", sdExecutionTask.getId(), rows);
                     continue;
                 }
                 SdExecutionTask update = new SdExecutionTask();
@@ -185,9 +186,9 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
                 update.setExternalJobId(jobId);
                 update.setTaskStatus(ExecutionTaskStatusEnum.SUBMITTED.getValue());
                 int rows = sdExecutionTaskMapper.updateById(update);
-                log.info("subTask submit success, id:{} rows = {}", sdExecutionTask.getId(), rows);
+                log.info("executionTask submit success, id:{} rows = {}", sdExecutionTask.getId(), rows);
             } catch (Exception e) {
-                log.error("subTask submit error {}", sdExecutionTask, e);
+                log.error("executionTask submit error {}", sdExecutionTask, e);
                 if (e instanceof HttpServiceException) {
                     //http请求异常 不直接失败;下次重试
                     continue;
@@ -197,21 +198,21 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
                 update.setErrorMsg("任务提交失败:" + e.getMessage());
                 update.setTaskStatus(ExecutionTaskStatusEnum.FAILED.getValue());
                 int rows = sdExecutionTaskMapper.updateById(update);
-                log.info("subTask submit failure, id:{} rows = {}", sdExecutionTask.getId(), rows);
+                log.info("executionTask submit failure, id:{} rows = {}", sdExecutionTask.getId(), rows);
             }
         }
         long costMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);
-        log.info("subTaskExecutionmitHandler finish cost={}ms", costMs);
+        log.info("executionTaskSubmitHandler finish cost={}ms", costMs);
     }
 
     @Override
     public void executionTaskSyncHandler() {
         long start = System.nanoTime();
         log.info("executionTaskSyncHandler start");
-        // 6 小时前
+        // N 小时前
         Date hourAgo = Date.from(
                 LocalDateTime.now()
-                        .minusHours(6)
+                        .minusHours(24)
                         .atZone(ZoneId.systemDefault())
                         .toInstant());
         List<Integer> taskStatusList = Arrays.asList(ExecutionTaskStatusEnum.SUBMITTED.getValue(), ExecutionTaskStatusEnum.RUNNING.getValue());
@@ -334,9 +335,11 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
                 sdExecutionTask.setTaskType(TaskTypeEnum.DECONSTRUCT.getValue());
                 sdExecutionTask.setTaskStatus(ExecutionTaskStatusEnum.INIT.getValue());
                 sdExecutionTask.setContentType(ContentTypeEnum.VIDEO.getValue());
+                //属性设置
                 SdExecutionTaskPropertiesDTO propertiesDTO = new SdExecutionTaskPropertiesDTO();
                 propertiesDTO.setContentScope(YESTERDAY_RETURN_TOP10_VIDEO_SCOPE);
                 sdExecutionTask.setProperties(JSONObject.toJSONString(propertiesDTO));
+                //关联内容
                 SdExecutionTaskContent sdExecutionTaskContent = new SdExecutionTaskContent();
                 sdExecutionTaskContent.setContentType(ContentTypeEnum.VIDEO.getValue());
                 sdExecutionTaskContent.setContentId(videoId);
@@ -355,48 +358,106 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
     }
 
     @Override
-    public void clusterExecutionTaskCreateHandler() {
+    public void manualClusterExecutionTaskCreateHandler(String params) {
         long start = System.nanoTime();
-        log.info("clusterExecutionTaskCreateHandler start");
-        //获取昨日Top10视频
-        LocalDateTime yesterday = LocalDateTime.now().minusDays(1);
-        String dt = DateUtil.formatLocalDateTime(yesterday, "yyyyMMdd");
-        String sql = "select * from " + clusterVideoTable + " where dt='" + dt + "' ORDER BY 回流人数 DESC LIMIT " + TOP_N + ";";
+        log.info("manualClusterExecutionTaskCreateHandler start");
+        log.info("manualClusterExecutionTaskCreateHandler params={}", params);
+        if (Objects.isNull(params) || params.isEmpty()) {
+            XxlJobLogger.log("manualClusterExecutionTaskCreateHandler params is empty");
+            return;
+        }
+        ClusterExecutionConfigDTO clusterExecutionConfigDTO = JSONObject.parseObject(params, ClusterExecutionConfigDTO.class);
+        if (Objects.isNull(clusterExecutionConfigDTO) || Objects.isNull(clusterExecutionConfigDTO.getCategories())
+                || clusterExecutionConfigDTO.getCategories().isEmpty()) {
+            XxlJobLogger.log("manualClusterExecutionTaskCreateHandler categories is empty");
+            return;
+        }
+        List<String> categories = clusterExecutionConfigDTO.getCategories();
+        String contentScope = clusterExecutionConfigDTO.getContentScope();
+        if (Objects.isNull(contentScope) || contentScope.isEmpty()) {
+            //默认值
+            contentScope = MANUAL_SELECT_VIDEO_SCOPE;
+        }
+        Integer minThreshold = clusterExecutionConfigDTO.getMinThreshold();
+        Integer maxLimit = clusterExecutionConfigDTO.getMaxLimit();
+        //统计二级标签类别
+        String sql = "SELECT\n" +
+                "    t1.videoid,\n" +
+                "    t1.merge_leve2\n" +
+                "FROM loghubods.video_merge_tag t1\n" +
+                "INNER JOIN (\n" +
+                "    SELECT\n" +
+                "        t2.content_id AS videoid,\n" +
+                "        MAX(t3.id)    AS max_task_id\n" +
+                "    FROM videoods.sd_execution_task_content t2\n" +
+                "    INNER JOIN videoods.sd_execution_task t3\n" +
+                "        ON t2.execution_task_id = t3.id\n" +
+                "    WHERE\n" +
+                "        t2.content_type = 3\n" +
+                "        AND t2.is_deleted = 0\n" +
+                "        AND t3.task_status = 3\n" +
+                "        AND t3.is_deleted = 0\n" +
+                "    GROUP BY t2.content_id\n" +
+                ") latest\n" +
+                "    ON t1.videoid = latest.videoid\n" +
+                "ORDER BY latest.max_task_id DESC;";
         List<Record> records = odpsManager.query(sql);
         if (Objects.isNull(records) || records.isEmpty()) {
-            log.info("clusterExecutionTaskCreateHandler records is empty");
+            XxlJobLogger.log("records is empty");
             return;
         }
+        XxlJobLogger.log("records size={}", records.size());
         long topCostMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);
-        log.info("clusterExecutionTaskCreateHandler get top video cost={}ms", topCostMs);
-        //数据处理
+        log.info("manualClusterExecutionTaskCreateHandler get top video cost={}ms", topCostMs);
         Map<String, List<String>> categoryVideoMap = new HashMap<>();
+        //数据处理
         for (Record record : records) {
             try {
                 String videoId = record.getString("videoid");
-                String category = record.getString("category");
-                List<String> categoryVideoIds = categoryVideoMap.get(category);
-                if (categoryVideoIds == null) {
-                    categoryVideoIds = new ArrayList<>();
+                String category = record.getString("merge_leve2");
+                if (categories.contains(category) && videoId != null) {
+                    List<String> videoIds = categoryVideoMap.get(videoId);
+                    if (videoIds == null) {
+                        videoIds = new ArrayList<>();
+                    }
+                    videoIds.add(videoId);
+                    categoryVideoMap.put(category, videoIds);
                 }
-                categoryVideoIds.add(videoId);
-                categoryVideoMap.put(videoId, categoryVideoIds);
             } catch (Exception e) {
-                log.error("clusterExecutionTaskCreateHandler categoryVideoMap error {}", record, e);
+                log.error("manualClusterExecutionTaskCreateHandler categoryVideoMap error {}", record, e);
             }
         }
+        if (categoryVideoMap.isEmpty()) {
+            XxlJobLogger.log("categoryVideoMap is empty");
+            return;
+        }
+        XxlJobLogger.log("categoryVideoMap size={}", categoryVideoMap.size());
         //创建解构任务
         int count = 0;
         for (Map.Entry<String, List<String>> entry : categoryVideoMap.entrySet()) {
             try {
                 String category = entry.getKey();
                 List<String> categoryVideoIds = entry.getValue();
+                //需要达到阈值
+                if (Objects.isNull(categoryVideoIds) || categoryVideoIds.isEmpty()
+                        || categoryVideoIds.size() < minThreshold) {
+                    XxlJobLogger.log("categoryVideoIds is empty, category = {}", category);
+                    continue;
+                }
+                //最大数量限制
+                if (categoryVideoIds.size() > maxLimit) {
+                    categoryVideoIds = categoryVideoIds.subList(0, maxLimit);
+                }
                 SdExecutionTask sdExecutionTask = new SdExecutionTask();
                 sdExecutionTask.setTaskNo(IdGeneratorUtil.generateExecutionTaskNo());
                 sdExecutionTask.setTaskType(TaskTypeEnum.CLUSTER.getValue());
                 sdExecutionTask.setTaskStatus(ExecutionTaskStatusEnum.INIT.getValue());
                 sdExecutionTask.setContentType(ContentTypeEnum.VIDEO.getValue());
-//                sdExecutionTask.setContentId(videoId);
+                //属性设置
+                SdExecutionTaskPropertiesDTO propertiesDTO = new SdExecutionTaskPropertiesDTO();
+                propertiesDTO.setContentScope(YESTERDAY_RETURN_TOP10_VIDEO_SCOPE);
+                sdExecutionTask.setProperties(JSONObject.toJSONString(propertiesDTO));
+                //关联内容:多条
                 List<SdExecutionTaskContent> contentList = new ArrayList<>();
                 for (String videoId : categoryVideoIds) {
                     SdExecutionTaskContent sdExecutionTaskContent = new SdExecutionTaskContent();
@@ -406,14 +467,14 @@ public class ExecutionTaskServiceImpl implements ExecutionTaskService {
                     contentList.add(sdExecutionTaskContent);
                 }
                 boolean createResult = executionTaskCreateService.create(sdExecutionTask, contentList);
-                log.info("clusterExecutionTaskCreateHandler sdExecutionTask create result={}", createResult);
+                log.info("manualClusterExecutionTaskCreateHandler sdExecutionTask create result={}", createResult);
                 count++;
             } catch (Exception e) {
-
+                log.error("manualClusterExecutionTaskCreateHandler error {}", entry, e);
             }
         }
         long costMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);
-        log.info("clusterExecutionTaskCreateHandler recordSize = {}  count = {} finish cost = {}ms", records.size(), count, costMs);
+        log.info("manualClusterExecutionTaskCreateHandler recordSize = {}  count = {} finish cost = {}ms", records.size(), count, costMs);
     }
 
 }

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

@@ -89,10 +89,10 @@ public class DeconstructStrategy implements DemandExtractionStrategy {
                 .select(SdExecutionTaskResultItem::getItemContent);
         List<SdExecutionTaskResultItem> resultItems = sdExecutionTaskResultItemMapper.selectList(resultItemWrapper);
         if (Objects.isNull(resultItems) || resultItems.isEmpty()) {
-            log.warn("No subtask result items found: taskId={}", task.getId());
+            log.warn("No executionTask result items found: taskId={}", task.getId());
             return StrategyResultDTO.builder()
                     .success(false)
-                    .msg("No subtask result items found")
+                    .msg("No executionTask result items found")
                     .build();
         }
 

+ 0 - 5
supply-demand-engine-core/src/main/resources/mybatis-generator-config.xml

@@ -46,11 +46,6 @@
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>
 
-        <table tableName="sd_task" domainObjectName="SdTask" alias=""/>
-        <table tableName="sd_task_result" domainObjectName="SdTaskResult" alias=""/>
-        <table tableName="sd_sub_task" domainObjectName="SdSubTask" alias=""/>
-        <table tableName="sd_sub_task_raw_result" domainObjectName="SdSubTaskRawResult" alias=""/>
-        <table tableName="sd_sub_task_result_item" domainObjectName="SdSubTaskResultItem" alias=""/>
         <table tableName="sd_strategy" domainObjectName="SdStrategy" alias=""/>
         <table tableName="sd_prompt_template" domainObjectName="SdPromptTemplate" alias=""/>
 

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

@@ -45,7 +45,7 @@ public class ExecutionTaskJob {
      * @return
      */
     @XxlJob("executionTaskSyncHandler")
-    public ReturnT<String> subTaskSyncHandler(String params) {
+    public ReturnT<String> executionTaskSyncHandler(String params) {
         XxlJobLogger.log("executionTaskSyncHandler start");
         try {
             executionTaskService.executionTaskSyncHandler();
@@ -79,17 +79,22 @@ public class ExecutionTaskJob {
         return ReturnT.SUCCESS;
     }
 
-
-    @XxlJob("clusterExecutionTaskCreateHandler")
-    public ReturnT<String> clusterExecutionTaskCreateHandler(String params) {
-        XxlJobLogger.log("clusterExecutionTaskCreateHandler start");
+    /**
+     * 手动创建聚类任务
+     *
+     * @param params
+     * @return
+     */
+    @XxlJob("manualClusterExecutionTaskCreateHandler")
+    public ReturnT<String> manualClusterExecutionTaskCreateHandler(String params) {
+        XxlJobLogger.log("manualClusterExecutionTaskCreateHandler start");
         try {
-            executionTaskService.clusterExecutionTaskCreateHandler();
+            executionTaskService.manualClusterExecutionTaskCreateHandler(params);
         } catch (Exception e) {
-            XxlJobLogger.log("clusterExecutionTaskCreateHandler error", e);
+            XxlJobLogger.log("manualClusterExecutionTaskCreateHandler error", e);
             return ReturnT.FAIL;
         } finally {
-            XxlJobLogger.log("clusterExecutionTaskCreateHandler end");
+            XxlJobLogger.log("manualClusterExecutionTaskCreateHandler end");
         }
         return ReturnT.SUCCESS;
     }

+ 0 - 1
supply-demand-engine-service/src/main/java/com/tzld/piaoquan/sde/controller/ExecutionTaskController.java

@@ -30,7 +30,6 @@ public class ExecutionTaskController {
     @Operation(summary = "创建子任务")
     @PostMapping("/create")
     public CommonResponse<Void> create(@RequestBody CommonRequest<Void> request) {
-//        subTaskService.create(request);
         return CommonResponse.create();
     }