Explorar o código

智能投放--解決創意命名重複

liyuyi@c-top.com.cn %!s(int64=4) %!d(string=hai) anos
pai
achega
8e4a171440

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ads/service/impl/AiStrategyServiceImpl.java

@@ -198,7 +198,7 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
                                 Long unitId = (Long) unitCreateResult.get("unitId");
                                 for(int j=0;j<15;j++){
                                     JSONObject creativeParams = creativeParams(token,unitId,highQualityVideos.get(i*15+j),unitCnt,strategy);
-                                    createCreative(token,creativeParams,campaignId,unitId,strategy,null,1,highQualityVideos.get(i*15+j));
+                                    createCreative(token,creativeParams,campaignId,unitId,strategy,null,j+1,highQualityVideos.get(i*15+j));
                                 }
                                 innerUnitCnt++;
                             }
@@ -218,7 +218,7 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
 
                             for(int j=0;j<rem;j++){
                                 JSONObject creativeParams = creativeParams(token,unitId,highQualityVideos.get(mod*15+j),unitCnt,strategy);
-                                createCreative(token,creativeParams,campaignId,unitId,strategy,null,1,highQualityVideos.get(mod*15+j));
+                                createCreative(token,creativeParams,campaignId,unitId,strategy,null,j+1,highQualityVideos.get(mod*15+j));
                             }
                         }
                     }
@@ -242,7 +242,7 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
                                 Long unitId = (Long) unitCreateResult.get("unitId");
                                 for(int j=0;j<15;j++){
                                     JSONObject creativeParams = creativeParams(token,unitId,newVideos.get(i*15+j),unitCnt,strategy);
-                                    createCreative(token,creativeParams,campaignId,unitId,strategy,null,1,newVideos.get(i*15+j));
+                                    createCreative(token,creativeParams,campaignId,unitId,strategy,null,j+1,newVideos.get(i*15+j));
                                 }
                                 innerUnitCnt++;
                             }
@@ -262,7 +262,7 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
 
                             for(int j=0;j<rem;j++){
                                 JSONObject creativeParams = creativeParams(token,unitId,newVideos.get(mod*15+j),unitCnt,strategy);
-                                createCreative(token,creativeParams,campaignId,unitId,strategy,null,1,newVideos.get(mod*15+j));
+                                createCreative(token,creativeParams,campaignId,unitId,strategy,null,j+1,newVideos.get(mod*15+j));
                             }
                         }
                     }