|
@@ -5,11 +5,13 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
|
import org.jeecg.modules.bytedance.advertise.dockapi.marketing;
|
|
|
+import org.jeecg.modules.bytedance.advertise.entity.AiBytedanceAdDplinkInfo;
|
|
|
import org.jeecg.modules.bytedance.advertise.entity.AiBytedanceAdvertiserStrategy;
|
|
|
import org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo;
|
|
|
import org.jeecg.modules.bytedance.advertise.entity.UpdAdStaOrCpaOrBudget;
|
|
|
import org.jeecg.modules.bytedance.advertise.enums.BytedanceCreativeMatTypeEnum;
|
|
|
import org.jeecg.modules.bytedance.advertise.mapper.AiBytedanceAdvertiserStrategyMapper;
|
|
|
+import org.jeecg.modules.bytedance.advertise.service.IAiBytedanceAdDplinkInfoService;
|
|
|
import org.jeecg.modules.bytedance.advertise.service.IAiBytedanceAdvertiserStrategyService;
|
|
|
import org.jeecg.modules.bytedance.advertise.service.IByteDanceVideoInfoService;
|
|
|
import org.jeecg.modules.bytedance.advertise.vo.AdGroupSearchVo;
|
|
@@ -76,10 +78,31 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
* 查询当前账户排列到的dp链接标识号
|
|
|
*
|
|
|
*/
|
|
|
+ Long dpIndex ;
|
|
|
+ AiBytedanceAdDplinkInfo adDplinkInfo = adDplinkInfoService.getlatestDpLinkInfo(strategy.getId(),strategy.getAccountId(),1);
|
|
|
+ if(null == adDplinkInfo){
|
|
|
+ dpIndex = strategy.getDpLinkStartIndex();
|
|
|
+ }else{
|
|
|
+ dpIndex = adDplinkInfo.getDpLinkIndex()+1;
|
|
|
+ }
|
|
|
+ if(dpIndex>strategy.getDpLinkEndIndex()){
|
|
|
+ log.info("此账户策略创建结束=>账户id:{};策略id:{}", token.getAccountId(),strategy.getId());
|
|
|
+ return 0L;
|
|
|
+ }
|
|
|
+ //根据dpLink获取组名称
|
|
|
+ String campaignName = getCampaignName(dpIndex,strategy);
|
|
|
//2:创建计划
|
|
|
//3:创建创意
|
|
|
return videoCnt;
|
|
|
}
|
|
|
+
|
|
|
+ private String getCampaignName(Long dpIndex, AiBytedanceAdvertiserStrategy strategy) {
|
|
|
+ Long unitCreativeNum = strategy.getCampaignAdCnt();
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAiBytedanceAdDplinkInfoService adDplinkInfoService;
|
|
|
@Autowired
|
|
|
private IByteDanceVideoInfoService videoInfoService;
|
|
|
private List<ByteDanceVideoInfo> getVideoInfoByCreateType(Long projectId,AiBytedanceAdvertiserStrategy strategy, String startTime, String endTime, Integer createType, Long videoCnt) {
|