|
@@ -28,6 +28,7 @@ import org.jeecg.modules.bytedance.common.entity.MaterialInfo;
|
|
|
import org.jeecg.modules.bytedance.common.entity.UserAllocation;
|
|
|
import org.jeecg.modules.bytedance.common.service.*;
|
|
|
import org.jeecg.modules.bytedance.common.utils.Check;
|
|
|
+import org.jeecg.modules.bytedance.common.utils.GetCampaignNum;
|
|
|
import org.jeecg.modules.bytedance.common.utils.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -189,6 +190,7 @@ 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());
|
|
|
return 0L;
|
|
@@ -889,6 +891,10 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
adName = adName.replace("{{素材名称}}",info.getMaterialName());
|
|
|
}
|
|
|
}
|
|
|
+ if(adName.contains("{{序号}}")){
|
|
|
+ int i = adDplinkInfoService.getDpLinkInfoCount(strategy.getAccountId());
|
|
|
+ adName = adName.replace("{{序号}}",String.valueOf(i+1));
|
|
|
+ }
|
|
|
|
|
|
adName = adName.replace("--","-");
|
|
|
if(adName.startsWith("-")){
|
|
@@ -952,6 +958,14 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
result = result + "-" + date;
|
|
|
}
|
|
|
|
|
|
+ if(result.contains("{{序号}}")){
|
|
|
+ //查询当天已有计划数量
|
|
|
+ int i = adDplinkInfoService.getDpLinkInfoCount(strategy.getAccountId());
|
|
|
+ Long num = GetCampaignNum.getCampaignNameNum(strategy.getCampaignCnt(),strategy.getCampaignAdCnt(),i);
|
|
|
+ result = result.replace("{{序号}}",String.valueOf(num));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
result = result.replace("--","-");
|
|
|
if(result.startsWith("-")){
|
|
|
result = result.substring(1);
|