yumeng 1 éve
szülő
commit
67dd4040e3

+ 50 - 3
job-adq/src/main/java/cn/com/ctop/job/adq/handler/AdqAccountReportJob.java

@@ -28,8 +28,8 @@ public class AdqAccountReportJob {
     private static ExecutorService hourExecutorService = Executors.newFixedThreadPool(3);
     private static ExecutorService dailyExecutorService = Executors.newFixedThreadPool(3);
 
-    @XxlJob("nowDateAccounteHour")
-    public void creativeHour() throws Exception {
+    @XxlJob("nowDateAccountHour")
+    public void nowDateAccountHour() throws Exception {
         String param = XxlJobHelper.getJobParam(); // 执行参数
         if (Check.isNull(param)) {
             log.error("入参为空");
@@ -43,9 +43,56 @@ public class AdqAccountReportJob {
         hourExecutorService.submit(new Runnable() {
             @Override
             public void run() {
-                accountReportService.getAdqAccountHour(advertiserId, accessToken, nowDate, nowDate, 1, 2);
+                accountReportService.getAdqAccountHour(advertiserId, accessToken, nowDate, nowDate, 1, 1);
             }
         });
     }
 
+    @XxlJob("yesDateAccountHour")
+    public void yesDateAccountHour() throws Exception {
+        String param = XxlJobHelper.getJobParam(); // 执行参数
+        if (Check.isNull(param)) {
+            log.error("入参为空");
+            return;
+        }
+
+        String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
+        String yesDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
+
+        String[] s = param.split("_");
+        Long advertiserId = Long.valueOf(s[0]);
+        String accessToken = s[1];
+        hourExecutorService.submit(new Runnable() {
+            @Override
+            public void run() {
+                accountReportService.getAdqAccountHour(advertiserId, accessToken, yesDate, yesDate, 1, 1);
+            }
+        });
+    }
+
+
+
+    @XxlJob("yesDateAccountDaily")
+    public void yesDateAccountDaily() throws Exception {
+        String param = XxlJobHelper.getJobParam(); // 执行参数
+        if (Check.isNull(param)) {
+            log.error("入参为空");
+            return;
+        }
+
+        String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
+        String yesDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
+
+        String[] s = param.split("_");
+        Long advertiserId = Long.valueOf(s[0]);
+        String accessToken = s[1];
+        hourExecutorService.submit(new Runnable() {
+            @Override
+            public void run() {
+                accountReportService.getAdqAccountDaily(advertiserId, accessToken, yesDate, yesDate, 1, 1);
+            }
+        });
+    }
+
+
 }