Explorar o código

Merge branch 'test' of http://git.tjyourong.com.cn/ctop/adsp-bytedance into test

huangxuechao %!s(int64=4) %!d(string=hai) anos
pai
achega
d8d7e3ee71

+ 6 - 5
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java

@@ -242,9 +242,10 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                     adDplinkInfo.setDpLinkIndex(adDplinkInfo.getDpLinkIndex()+1);
                 }
                 dpIndex = adDplinkInfo.getDpLinkIndex();
-                // 已创建计划 > 账户配置结束下标
-                if(dpIndex>strategy.getDpLinkEndIndex()){
-                    log.info("此账户策略创建结束=>账户id:{};策略id:{}", token.getAccountId(),strategy.getId());
+                // 超出下标范围
+                // 已创建计划 > 账户配置结束下标 || 已创建计划 > 结束下标 || 已创建计划 > 账户配置最大组个数 * 组下计划个数
+                if( dpIndex < strategy.getDpLinkStartIndex() || dpIndex > strategy.getDpLinkEndIndex() || dpIndex > strategy.getCampaignCnt()*strategy.getCampaignAdCnt()){
+                    log.info("此账户策略创建结束===已创建的计划超过了账户配置中dp链接结束下标===>账户id:{};策略id:{}", token.getAccountId(),strategy.getId());
                     return 0L;
                 }
                 //组名称
@@ -1124,10 +1125,10 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
     }
 
     private String getRangeIndex(Long dpLinkStartIndex,Long dpLinkEndIndex, Long campaignAdCnt, Long dpIndex) {
-        if(dpIndex<dpLinkStartIndex||dpIndex>dpLinkEndIndex){
+       /* if(dpIndex<dpLinkStartIndex||dpIndex>dpLinkEndIndex){
             //超出下标范围
             return null;
-        }
+        }*/
         Long startIndex ;
         Long endIndex ;
         //计算当前下标值和范围区段的余数