Ver código fonte

广告组列表

huangpingkang 1 ano atrás
pai
commit
73c200bb26

+ 8 - 3
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/controller/KuaiShouController.java

@@ -101,9 +101,14 @@ public class KuaiShouController {
         Integer intEndDate = Integer.valueOf(endDate.replace("-", ""));
         List<JSONObject> jsonObjects = kuaiShouAccountReportMapper.queryCostAccount(intStartDate, intEndDate);
         for (JSONObject jsonObject : jsonObjects) {
-            Long advertiserId = jsonObject.getLong("advertiser_id");
-            String accessToken = jsonObject.getString("access_token");
-            groupReportService.queryGroupList(accessToken, advertiserId, startDate, endDate, 1, 1, null, 2);
+            executorService.submit(new Runnable() {
+                @Override
+                public void run() {
+                    Long advertiserId = jsonObject.getLong("advertiser_id");
+                    String accessToken = jsonObject.getString("access_token");
+                    groupReportService.queryGroupList(accessToken, advertiserId, startDate, endDate, 1, 1, null, 2);
+                }
+            });
         }
     }