|
@@ -35,9 +35,6 @@ public class BytedanceCreativeHourlyReportLoadJob implements Job {
|
|
|
Date getDate = new Date();
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
|
|
|
String hour = simpleDateFormat.format(getDate);
|
|
|
- if (null != hour && "00".equals(hour)) {
|
|
|
- getDate = DateUtils.addDay(getDate, -1);
|
|
|
- }
|
|
|
//1:查询当日数据
|
|
|
List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
|
|
|
if (null == tokens || tokens.size() <= 0) {
|
|
@@ -45,13 +42,16 @@ public class BytedanceCreativeHourlyReportLoadJob implements Job {
|
|
|
return;
|
|
|
}
|
|
|
executorService = Executors.newFixedThreadPool(4);
|
|
|
- Date finalGetDate = getDate;
|
|
|
tokens.forEach(token -> {
|
|
|
executorService.submit(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
- //获取广告创意信息数据
|
|
|
- reportService.getAdvertiserCreativeReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
|
|
|
+ if (null != hour && "00".equals(hour)) {
|
|
|
+ Date finalGetDate = DateUtils.addDay(getDate, -1);
|
|
|
+ //获取广告创意信息数据
|
|
|
+ reportService.getAdvertiserCreativeReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
|
|
|
+ }
|
|
|
+ reportService.getAdvertiserCreativeReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
|
|
|
}
|
|
|
|
|
|
});
|