Forráskód Böngészése

定时任务修改

yumeng 4 éve
szülő
commit
24c1191ed5

+ 6 - 2
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouDailyCampaignReportLoadJob.java

@@ -30,7 +30,7 @@ public class KuaishouDailyCampaignReportLoadJob {
     @XxlJob("kuaishouDailyCampaignReport")
     public void execute() throws Exception {
         Date getDate = DateUtils.addDay(new Date(), -1);
-        Date getDate2 = DateUtils.addDay(new Date(), -2);
+        Date endDate = DateUtils.addDay(new Date(), -2);
         //1:查询当日数据
         List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
         if (null == tokens || tokens.isEmpty()) {
@@ -39,6 +39,10 @@ public class KuaishouDailyCampaignReportLoadJob {
             return;
         }
 
-        tokens.forEach(token -> executorService.submit(() -> kuaishouInterfaceService.getAdvertiserCampaignReportDaily(token, getDate, getDate2)));
+        tokens.forEach(token -> executorService.submit(() -> kuaishouInterfaceService.getAdvertiserCampaignReportDaily(token, getDate, endDate)));
     }
+
+
+
+
 }

+ 3 - 3
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouGroupDailyReportJob.java

@@ -31,14 +31,14 @@ public class KuaishouGroupDailyReportJob {
     @XxlJob("kuaishouGroupDailyReportJob")
     public void execute() throws ParseException {
         String date = DateUtils.getDate("yyyy-MM-dd");
-        String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", date, -1);
+    //    String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", date, -1);
         String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", date, -2);
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
         Date parse = simpleDateFormat.parse(startDate);
-        Date parse2 = simpleDateFormat.parse(endDate);
+     //   Date parse2 = simpleDateFormat.parse(endDate);
         List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
         tokens.forEach(token -> executorService.submit(() ->
-                reportDailyGroupService.getAdvertiserGroupReportDaily(token, parse, parse2))
+                reportDailyGroupService.getAdvertiserGroupReportDaily(token, parse, parse))
         );
         XxlJobHelper.log("快手物料数据同步完成");
     }