|
@@ -541,9 +541,11 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
|
|
|
private Long getCampaignId(AiKuaishouAdvertiserStrategy strategy, CtopOauthToken token, String replaceString, String checkType,Integer createType,AiKuaiShouAppInfo appInfo,String uuid) {
|
|
private Long getCampaignId(AiKuaishouAdvertiserStrategy strategy, CtopOauthToken token, String replaceString, String checkType,Integer createType,AiKuaiShouAppInfo appInfo,String uuid) {
|
|
JSONArray campaignList;
|
|
JSONArray campaignList;
|
|
|
|
+ String timestamp = null;
|
|
if ("ALL_CAMPAIGN".equals(checkType)) {
|
|
if ("ALL_CAMPAIGN".equals(checkType)) {
|
|
campaignList = kuaishouInterfaceService.getCampaignList(token, null, null, 1);
|
|
campaignList = kuaishouInterfaceService.getCampaignList(token, null, null, 1);
|
|
} else {
|
|
} else {
|
|
|
|
+ timestamp = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss");
|
|
campaignList = kuaishouInterfaceService.getCampaignList(token, new Date(), new Date(), 1);
|
|
campaignList = kuaishouInterfaceService.getCampaignList(token, new Date(), new Date(), 1);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -558,7 +560,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
// 不存在“上新”计划,则创建一个计划
|
|
// 不存在“上新”计划,则创建一个计划
|
|
JSONObject campaignParams = new JSONObject();
|
|
JSONObject campaignParams = new JSONObject();
|
|
campaignParams.put("advertiser_id", token.getAccountId());
|
|
campaignParams.put("advertiser_id", token.getAccountId());
|
|
- String campaignName = getName(strategy.getCampaignName(),strategy,createType,appInfo,null,null);
|
|
|
|
|
|
+ String campaignName = getName(strategy.getCampaignName(),strategy,createType,appInfo,timestamp,null);
|
|
campaignParams.put("campaign_name", campaignName);
|
|
campaignParams.put("campaign_name", campaignName);
|
|
campaignParams.put("type", strategy.getCampaignType());
|
|
campaignParams.put("type", strategy.getCampaignType());
|
|
if(null!=strategy.getCampaignDayBudget()&&strategy.getCampaignDayBudget()!=0){
|
|
if(null!=strategy.getCampaignDayBudget()&&strategy.getCampaignDayBudget()!=0){
|