syh 4 лет назад
Родитель
Сommit
abea91e46a

+ 3 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouCreateCreativeServiceImpl.java

@@ -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) {
         JSONArray campaignList;
+        String timestamp = null;
         if ("ALL_CAMPAIGN".equals(checkType)) {
             campaignList = kuaishouInterfaceService.getCampaignList(token, null, null, 1);
         } else {
+            timestamp = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss");
             campaignList = kuaishouInterfaceService.getCampaignList(token, new Date(), new Date(), 1);
         }
 
@@ -558,7 +560,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
         // 不存在“上新”计划,则创建一个计划
         JSONObject campaignParams = new JSONObject();
         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("type", strategy.getCampaignType());
         if(null!=strategy.getCampaignDayBudget()&&strategy.getCampaignDayBudget()!=0){