yangzian 4 yıl önce
ebeveyn
işleme
3ae1bad810

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

@@ -236,8 +236,9 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                     adDplinkInfo.setDpLinkIndex(adDplinkInfo.getDpLinkIndex()+1);
                 }
                 dpIndex = adDplinkInfo.getDpLinkIndex();
-                // 已创建计划 > 账户配置结束下标
-                if(dpIndex>strategy.getDpLinkEndIndex()){
+                // 超出下标范围
+                // 已创建计划 > 账户配置结束下标 || 已创建计划 > 结束下标 || 已创建计划 > 账户配置最大组个数 * 组下计划个数
+                if( dpIndex < strategy.getDpLinkStartIndex() || dpIndex > strategy.getDpLinkEndIndex() || dpIndex > strategy.getCampaignCnt()*strategy.getCampaignAdCnt()){
                     log.info("此账户策略创建结束===已创建的计划超过了账户配置中dp链接结束下标===>账户id:{};策略id:{}", token.getAccountId(),strategy.getId());
                     return 0L;
                 }
@@ -1106,10 +1107,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 ;
         //计算当前下标值和范围区段的余数