|
@@ -71,7 +71,7 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
|
|
|
advertiserReportHour.setHour(hour);
|
|
advertiserReportHour.setHour(hour);
|
|
|
hours.add(advertiserReportHour);
|
|
hours.add(advertiserReportHour);
|
|
|
|
|
|
|
|
- dorisLoadManager.add("media_api","bytedance_advertiser_report_hour", advertiserReportHour);
|
|
|
|
|
|
|
+ dorisLoadManager.add("media_api", "bytedance_advertiser_report_hour", advertiserReportHour);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -145,7 +145,7 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
|
|
|
advertiserReportDaily.setStatTimeDay(statTimeDay);
|
|
advertiserReportDaily.setStatTimeDay(statTimeDay);
|
|
|
dailyList.add(advertiserReportDaily);
|
|
dailyList.add(advertiserReportDaily);
|
|
|
|
|
|
|
|
- dorisLoadManager.add("media_api","bytedance_advertiser_report_daily", advertiserReportDaily);
|
|
|
|
|
|
|
+ dorisLoadManager.add("media_api", "bytedance_advertiser_report_daily", advertiserReportDaily);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -228,7 +228,7 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
|
|
|
advertiserReportHour.setHour(hour);
|
|
advertiserReportHour.setHour(hour);
|
|
|
hours.add(advertiserReportHour);
|
|
hours.add(advertiserReportHour);
|
|
|
|
|
|
|
|
- dorisLoadManager.add("media_api","bytedance_advertiser_report_hour", advertiserReportHour);
|
|
|
|
|
|
|
+ dorisLoadManager.add("media_api", "bytedance_advertiser_report_hour", advertiserReportHour);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
log.info("账户id:{},日期:{}广告时报(账户粒度)请求结果为空", advertiserId, startDate);
|
|
log.info("账户id:{},日期:{}广告时报(账户粒度)请求结果为空", advertiserId, startDate);
|
|
@@ -288,7 +288,7 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
|
|
|
String s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
String s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
|
JSONObject result = JSONObject.parseObject(s);
|
|
JSONObject result = JSONObject.parseObject(s);
|
|
|
if (Check.isNull(result)) {
|
|
if (Check.isNull(result)) {
|
|
|
- log.info("账户id:{},日期:{},广告时报(账户粒度)请求结果返回为空", advertiserId, startDate);
|
|
|
|
|
|
|
+ log.info("账户id:{},日期:{},账户日报(账户粒度)请求结果返回为空", advertiserId, startDate);
|
|
|
if (isLog == 1) {
|
|
if (isLog == 1) {
|
|
|
BytedanceErrorLog errorInfo = new BytedanceErrorLog();
|
|
BytedanceErrorLog errorInfo = new BytedanceErrorLog();
|
|
|
errorInfo.setAdvertiserId(advertiserId);
|
|
errorInfo.setAdvertiserId(advertiserId);
|
|
@@ -317,15 +317,15 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
|
|
|
advertiserReportDaily.setStatTimeDay(statTimeDay);
|
|
advertiserReportDaily.setStatTimeDay(statTimeDay);
|
|
|
dailyList.add(advertiserReportDaily);
|
|
dailyList.add(advertiserReportDaily);
|
|
|
|
|
|
|
|
- dorisLoadManager.add("media_api","bytedance_advertiser_report_daily", advertiserReportDaily);
|
|
|
|
|
|
|
+ dorisLoadManager.add("media_api", "bytedance_advertiser_report_daily", advertiserReportDaily);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- log.info("账户id:{},日期:{},广告日报(账户粒度)请求结果为空", advertiserId, startDate);
|
|
|
|
|
|
|
+ log.info("账户id:{},日期:{},账户日报(账户粒度)请求结果为空", advertiserId, startDate);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- log.info("账户id:{},日期:{},广告日报(账户粒度)请求结果失败,返回数据:{}", advertiserId, startDate, result);
|
|
|
|
|
|
|
+ log.info("账户id:{},日期:{},账户日报(账户粒度)请求结果失败,返回数据:{}", advertiserId, startDate, result);
|
|
|
if (isLog == 1) {
|
|
if (isLog == 1) {
|
|
|
BytedanceErrorLog errorInfo = new BytedanceErrorLog();
|
|
BytedanceErrorLog errorInfo = new BytedanceErrorLog();
|
|
|
errorInfo.setAdvertiserId(advertiserId);
|
|
errorInfo.setAdvertiserId(advertiserId);
|
|
@@ -350,11 +350,16 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
|
|
|
}
|
|
}
|
|
|
getBytedanceAccountDaily(advertiserId, accessToken, startDate, endDate, page + 1, isLog);
|
|
getBytedanceAccountDaily(advertiserId, accessToken, startDate, endDate, page + 1, isLog);
|
|
|
} else {
|
|
} else {
|
|
|
- log.info("账户ID:{},日期:{},广告日报(账户粒度)数据请求成功", advertiserId, startDate);
|
|
|
|
|
|
|
+ log.info("账户ID:{},日期:{},账户日报(账户粒度)数据请求成功", advertiserId, startDate);
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public String getTokenByAdvertiserId(Long advertiserId) {
|
|
|
|
|
+ return accountReportMapper.getTokenByAdvertiserId(advertiserId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|