|
@@ -51,20 +51,18 @@ public class KuaishouDailyCreativeReportLoadJob implements Job {
|
|
|
log.info("定时获取快手数据异常:未获取到可用的token");
|
|
|
return;
|
|
|
}
|
|
|
- log.info("开始分天创意报表拉去完成");
|
|
|
for (CtopOauthToken token : tokens) {
|
|
|
- executorService.submit(new Runnable() {
|
|
|
- @Override
|
|
|
- public void run() {
|
|
|
-
|
|
|
- try {
|
|
|
- log.info("获取创意分天报表开始,accountId:{}", token.getAccountId());
|
|
|
- kuaishouInterfaceService.getCampaignList(token, null, null);
|
|
|
- sleep(5 * 100);
|
|
|
- List<JSONArray> campaigns = campaignService.getJsonArrByAccount(token.getAccountId(), 50);
|
|
|
- if (!Check.isNull(campaigns) && campaigns.size() > 0) {
|
|
|
- for (int i = 0; i < campaigns.size(); i++) {
|
|
|
- JSONArray campaignIds = (JSONArray) JSONArray.parse(campaigns.get(i).toJSONString());
|
|
|
+ try {
|
|
|
+ log.info("获取创意分天报表开始,accountId:{}", token.getAccountId());
|
|
|
+ kuaishouInterfaceService.getCampaignList(token, null, null);
|
|
|
+ sleep(5 * 100);
|
|
|
+ List<JSONArray> campaigns = campaignService.getJsonArrByAccount(token.getAccountId(), 50);
|
|
|
+ if (!Check.isNull(campaigns) && campaigns.size() > 0) {
|
|
|
+ for (int i = 0; i < campaigns.size(); i++) {
|
|
|
+ JSONArray campaignIds = (JSONArray) JSONArray.parse(campaigns.get(i).toJSONString());
|
|
|
+ executorService.submit(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
try {
|
|
|
kuaishouInterfaceService.getAdvertiserCreativeReportDaily(token, getDate, getDate, campaignIds);
|
|
|
} catch (Exception e) {
|
|
@@ -72,15 +70,14 @@ public class KuaishouDailyCreativeReportLoadJob implements Job {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ });
|
|
|
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
}
|
|
|
- });
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|