|
@@ -657,11 +657,11 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void getAdvertiserCreativeReportDaily(CtopOauthToken token, Date startDate, Date endDate, JSONArray campaignIds) {
|
|
|
- getAdvertiserCreativeReportDailyByPage(token, startDate, endDate, campaignIds, 1);
|
|
|
+ public void getAdvertiserCreativeReportDaily(CtopOauthToken token, Date startDate, Date endDate, JSONArray campaignIds, JSONArray creativeIds) {
|
|
|
+ getAdvertiserCreativeReportDailyByPage(token, startDate, endDate, campaignIds, creativeIds, 1);
|
|
|
}
|
|
|
|
|
|
- private void getAdvertiserCreativeReportDailyByPage(CtopOauthToken token, Date startDate, Date endDate, JSONArray campaignIds, int page) {
|
|
|
+ private void getAdvertiserCreativeReportDailyByPage(CtopOauthToken token, Date startDate, Date endDate, JSONArray campaignIds, JSONArray creativeIds, int page) {
|
|
|
String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CREATIVE_REPORT;
|
|
|
Map<String, String> headers = new HashMap<String, String>();
|
|
|
headers.put("Content-Type", "application/json");
|
|
@@ -677,7 +677,10 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
param.put("campaign_ids", campaignIds);
|
|
|
|
|
|
}
|
|
|
+ if (!Check.isNull(creativeIds) && creativeIds.size() > 0) {
|
|
|
+ param.put("creative_ids", creativeIds);
|
|
|
|
|
|
+ }
|
|
|
param.put("advertiser_id", token.getAccountId());
|
|
|
param.put("temporal_granularity", "DAILY");
|
|
|
param.put("page_size", 1000);
|
|
@@ -714,7 +717,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
dailyCreativeStatisticService.saveOrUpdate(statistic);
|
|
|
dailyCreativeService.saveOrUpdate(creative);
|
|
|
}
|
|
|
- getAdvertiserCreativeReportDailyByPage(token, startDate, endDate, campaignIds, page + 1);
|
|
|
+ getAdvertiserCreativeReportDailyByPage(token, startDate, endDate, campaignIds, creativeIds, page + 1);
|
|
|
}
|
|
|
|
|
|
private KuaishouReportDailyCreativeStatistic setDailyStatistic(KuaishouReportDailyCreative creative, CtopOauthToken token) {
|