|
@@ -777,11 +777,11 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public void getAdvertiserCreativeReportDaily(CtopOauthToken token, Date startDate, Date endDate) {
|
|
|
|
- getAdvertiserCreativeReportDailyByPage(token, startDate, endDate, 1);
|
|
|
|
|
|
+ public void getAdvertiserCreativeReportDaily(CtopOauthToken token, Date startDate, Date endDate, JSONArray campaignIds) {
|
|
|
|
+ getAdvertiserCreativeReportDailyByPage(token, startDate, endDate, campaignIds, 1);
|
|
}
|
|
}
|
|
|
|
|
|
- private void getAdvertiserCreativeReportDailyByPage(CtopOauthToken token, Date startDate, Date endDate, int page) {
|
|
|
|
|
|
+ private void getAdvertiserCreativeReportDailyByPage(CtopOauthToken token, Date startDate, Date endDate, JSONArray campaignIds, int page) {
|
|
String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CREATIVE_REPORT;
|
|
String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CREATIVE_REPORT;
|
|
Map<String, String> headers = new HashMap<String, String>();
|
|
Map<String, String> headers = new HashMap<String, String>();
|
|
headers.put("Content-Type", "application/json");
|
|
headers.put("Content-Type", "application/json");
|
|
@@ -793,9 +793,14 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
if (!Check.isNull(endDate)) {
|
|
if (!Check.isNull(endDate)) {
|
|
param.put("end_date", DateUtils.formatDate(endDate));
|
|
param.put("end_date", DateUtils.formatDate(endDate));
|
|
}
|
|
}
|
|
|
|
+ if (!Check.isNull(campaignIds) && campaignIds.size() > 0) {
|
|
|
|
+ param.put("campaign_ids", campaignIds);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
param.put("advertiser_id", token.getAccountId());
|
|
param.put("advertiser_id", token.getAccountId());
|
|
param.put("temporal_granularity", "DAILY");
|
|
param.put("temporal_granularity", "DAILY");
|
|
- param.put("page_size", 500);
|
|
|
|
|
|
+ param.put("page_size", 1000);
|
|
param.put("page", page);
|
|
param.put("page", page);
|
|
|
|
|
|
String result = HttpUtils.httpPostRequest(url, param, headers);
|
|
String result = HttpUtils.httpPostRequest(url, param, headers);
|
|
@@ -830,7 +835,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
dailyCreativeStatisticService.saveOrUpdate(statistic);
|
|
dailyCreativeStatisticService.saveOrUpdate(statistic);
|
|
dailyCreativeService.saveOrUpdate(creative);
|
|
dailyCreativeService.saveOrUpdate(creative);
|
|
}
|
|
}
|
|
- getAdvertiserCreativeReportDailyByPage(token, startDate, endDate, page + 1);
|
|
|
|
|
|
+ getAdvertiserCreativeReportDailyByPage(token, startDate, endDate, campaignIds, page + 1);
|
|
}
|
|
}
|
|
|
|
|
|
private KuaishouReportDailyCreativeStatistic setDailyStatistic(KuaishouReportDailyCreative creative, CtopOauthToken token) {
|
|
private KuaishouReportDailyCreativeStatistic setDailyStatistic(KuaishouReportDailyCreative creative, CtopOauthToken token) {
|
|
@@ -1056,7 +1061,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
//3:获取广告组信息数据
|
|
//3:获取广告组信息数据
|
|
getAdvertiserGroupReportDaily(token, getStartDate, getEndDate);
|
|
getAdvertiserGroupReportDaily(token, getStartDate, getEndDate);
|
|
//4: 获取广告创意信息数据
|
|
//4: 获取广告创意信息数据
|
|
- getAdvertiserCreativeReportDaily(token, getStartDate, getEndDate);
|
|
|
|
|
|
+ // getAdvertiserCreativeReportDaily(token, getStartDate, getEndDate);
|
|
|
|
|
|
//获取全量广告计划数据
|
|
//获取全量广告计划数据
|
|
getCampaignList(token, null, null);
|
|
getCampaignList(token, null, null);
|