فهرست منبع

修改定时任务多线程执行

syh 4 سال پیش
والد
کامیت
f1ea124e38

+ 8 - 8
jeecg-boot-module-system/src/main/resources/application-wps.yml

@@ -100,16 +100,16 @@ spring:
 #          username: data
 #          password: hcst@2021
 #          driver-class-name: com.mysql.jdbc.Driver
-#        master:
-#          url: jdbc:mysql://139.186.165.84:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true
-#          username: hcst
-#          password: hcst@2020
-#          driver-class-name: com.mysql.jdbc.Driver
         master:
-          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-          username: data
-          password: hcst@2021
+          url: jdbc:mysql://139.186.165.84:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true
+          username: hcst
+          password: hcst@2020
           driver-class-name: com.mysql.jdbc.Driver
+#        master:
+#          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+#          username: data
+#          password: hcst@2021
+#          driver-class-name: com.mysql.jdbc.Driver
   #redis 配置
   redis:
     database: 0

+ 18 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouDailyAccountReportLoadEtlJob.java

@@ -1,8 +1,10 @@
 package cn.com.ctop.job.kuaishou.handler;
 
+import cn.com.ctop.kuaishou.modules.report.service.IEtlKuaishouAccountMaterialReportDailyService;
 import cn.com.ctop.kuaishou.modules.report.service.IEtlKuaishouReportAccountDailyService;
 import com.xxl.job.core.context.XxlJobHelper;
 import com.xxl.job.core.handler.annotation.XxlJob;
+import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -16,6 +18,8 @@ public class KuaishouDailyAccountReportLoadEtlJob {
 
     @Autowired
     private IEtlKuaishouReportAccountDailyService iEtlKuaishouReportAccountDailyService;
+    @Autowired
+    private IEtlKuaishouAccountMaterialReportDailyService etlKuaishouAccountMaterialReportDailyService;
 
     @XxlJob("kuaishouDailyAccountReportLoadEtl")
     public void execute() throws Exception {
@@ -26,4 +30,18 @@ public class KuaishouDailyAccountReportLoadEtlJob {
             XxlJobHelper.log(e.getMessage());
         }
     }
+
+    /**
+     * 快手账户素材数据清洗任务
+     * @throws Exception
+     */
+    @XxlJob("etlKuaishouAccountMaterialReportDailyData")
+    public void etlKuaishouAccountMaterialReportDailyData() throws Exception {
+        try {
+            etlKuaishouAccountMaterialReportDailyService.etlKuaishouAccountMaterialReportDailyData(DateUtils.formatDate());
+            XxlJobHelper.log("queryEveryDayDataForAccount success");
+        } catch (Exception e) {
+            XxlJobHelper.log(e.getMessage());
+        }
+    }
 }