|
@@ -25,8 +25,8 @@ public class KuaishouDailyAccountReportLoadJob {
|
|
private ICtopOauthTokenService tokenService;
|
|
private ICtopOauthTokenService tokenService;
|
|
@Autowired
|
|
@Autowired
|
|
private IKuaishouInterfaceService kuaishouInterfaceService;
|
|
private IKuaishouInterfaceService kuaishouInterfaceService;
|
|
- static ExecutorService executorService = Executors.newFixedThreadPool(3);
|
|
|
|
- static ExecutorService currentExecutorService = Executors.newFixedThreadPool(5);
|
|
|
|
|
|
+ static ExecutorService executorService = Executors.newFixedThreadPool(10);
|
|
|
|
+ static ExecutorService adSceneExecutorService = Executors.newFixedThreadPool(10);
|
|
|
|
|
|
@XxlJob("kuaishouDailyAccountReport")
|
|
@XxlJob("kuaishouDailyAccountReport")
|
|
public void execute() throws Exception {
|
|
public void execute() throws Exception {
|
|
@@ -44,21 +44,6 @@ public class KuaishouDailyAccountReportLoadJob {
|
|
}));
|
|
}));
|
|
}
|
|
}
|
|
|
|
|
|
- @XxlJob("kuaishouCurrentDailyAccountReport")
|
|
|
|
- public void kuaishouCurrentDailyAccountReport() throws Exception {
|
|
|
|
- Date getDate = new Date();
|
|
|
|
- //1:查询当日数据
|
|
|
|
- List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
|
|
|
|
- if (null == tokens || tokens.isEmpty()) {
|
|
|
|
- XxlJobHelper.log("定时获取快手数据异常:未获取到可用的token");
|
|
|
|
- XxlJobHelper.handleFail();
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- tokens.forEach(token -> currentExecutorService.submit(() -> {
|
|
|
|
- kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate, getDate, null);
|
|
|
|
- }));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@XxlJob("kuaishouDailyAccountAdSceneReport")
|
|
@XxlJob("kuaishouDailyAccountAdSceneReport")
|
|
public void kuaishouDailyAccountAdSceneReport() throws Exception {
|
|
public void kuaishouDailyAccountAdSceneReport() throws Exception {
|
|
Date getDate = DateUtils.addDay(new Date(), -1);
|
|
Date getDate = DateUtils.addDay(new Date(), -1);
|
|
@@ -70,7 +55,7 @@ public class KuaishouDailyAccountReportLoadJob {
|
|
XxlJobHelper.handleFail();
|
|
XxlJobHelper.handleFail();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- tokens.forEach(token -> executorService.submit(() -> {
|
|
|
|
|
|
+ tokens.forEach(token -> adSceneExecutorService.submit(() -> {
|
|
kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate2, getDate, "adScene");
|
|
kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate2, getDate, "adScene");
|
|
}));
|
|
}));
|
|
}
|
|
}
|