|
@@ -32,7 +32,6 @@ public class BytedanceReportNewServiceImpl implements IBytedanceReportNewService
|
|
|
@Override
|
|
@Override
|
|
|
public void getBytedanceAccountHour(Long advertiserId, String accessToken, String startDate, String endDate, Integer page) {
|
|
public void getBytedanceAccountHour(Long advertiserId, String accessToken, String startDate, String endDate, Integer page) {
|
|
|
try {
|
|
try {
|
|
|
- Thread.sleep(500);
|
|
|
|
|
String url = "https://api.oceanengine.com/open_api/v3.0/report/custom/get/";
|
|
String url = "https://api.oceanengine.com/open_api/v3.0/report/custom/get/";
|
|
|
Map<String, Object> paramsMap = new HashMap<>();
|
|
Map<String, Object> paramsMap = new HashMap<>();
|
|
|
paramsMap.put("advertiser_id", advertiserId);
|
|
paramsMap.put("advertiser_id", advertiserId);
|
|
@@ -118,11 +117,6 @@ public class BytedanceReportNewServiceImpl implements IBytedanceReportNewService
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
if (hours.size() >= 100) {
|
|
if (hours.size() >= 100) {
|
|
|
- try {
|
|
|
|
|
- Thread.sleep(200L);
|
|
|
|
|
- } catch (InterruptedException e) {
|
|
|
|
|
- throw new RuntimeException(e);
|
|
|
|
|
- }
|
|
|
|
|
getBytedanceAccountHour(advertiserId, accessToken, startDate, endDate, page + 1);
|
|
getBytedanceAccountHour(advertiserId, accessToken, startDate, endDate, page + 1);
|
|
|
} else {
|
|
} else {
|
|
|
log.info("账户ID:{},日期:{},广告时报(账户粒度)数据请求成功", advertiserId, startDate);
|
|
log.info("账户ID:{},日期:{},广告时报(账户粒度)数据请求成功", advertiserId, startDate);
|
|
@@ -142,7 +136,6 @@ public class BytedanceReportNewServiceImpl implements IBytedanceReportNewService
|
|
|
@Override
|
|
@Override
|
|
|
public void getAdvertiserDailyReport(Long advertiserId, String oauthToken, String startDate, String endDate, int page) {
|
|
public void getAdvertiserDailyReport(Long advertiserId, String oauthToken, String startDate, String endDate, int page) {
|
|
|
try {
|
|
try {
|
|
|
- Thread.sleep(500L);
|
|
|
|
|
String url = "https://api.oceanengine.com/open_api/v3.0/report/custom/get/";
|
|
String url = "https://api.oceanengine.com/open_api/v3.0/report/custom/get/";
|
|
|
Map<String, Object> paramsMap = new HashMap<>();
|
|
Map<String, Object> paramsMap = new HashMap<>();
|
|
|
paramsMap.put("advertiser_id", advertiserId);
|
|
paramsMap.put("advertiser_id", advertiserId);
|
|
@@ -227,11 +220,6 @@ public class BytedanceReportNewServiceImpl implements IBytedanceReportNewService
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
if (dailies.size() >= 100) {
|
|
if (dailies.size() >= 100) {
|
|
|
- try {
|
|
|
|
|
- Thread.sleep(500L);
|
|
|
|
|
- } catch (InterruptedException e) {
|
|
|
|
|
- throw new RuntimeException(e);
|
|
|
|
|
- }
|
|
|
|
|
getAdvertiserDailyReport(advertiserId, oauthToken, startDate, endDate, page + 1);
|
|
getAdvertiserDailyReport(advertiserId, oauthToken, startDate, endDate, page + 1);
|
|
|
} else {
|
|
} else {
|
|
|
log.info("账户ID:{},开始日期:{},结束日期:{},广告日报(账户粒度)数据请求成功", advertiserId, startDate, endDate);
|
|
log.info("账户ID:{},开始日期:{},结束日期:{},广告日报(账户粒度)数据请求成功", advertiserId, startDate, endDate);
|