Przeglądaj źródła

添加计划创建日志打印

songyh 4 lat temu
rodzic
commit
44c8a2e41a

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

@@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.base.Joiner;
-import com.google.gson.JsonObject;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.util.DateUtils;
@@ -108,19 +107,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         }
 
         for (ByteDanceVideoInfo video:videoInfos) {
-            //1:过滤掉所有不存在于视频库的数据
-            MaterialInfo materialInfo = materialInfoService.getParams(video.getSignature(),1);
-            if(null == materialInfo){
-                continue;
-            }
-            //过滤掉所有未绑定文案的数据
-            List<BytedanceVideoSlogenInfo>slogenInfos = slogenInfoService.listByParams(video.getSignature(),1);
-            if(null == slogenInfos||slogenInfos.isEmpty()){
-                continue;
-            }
             Integer useDplinkIndex = strategy.getDpLinkIndexUsed();
             if(null==useDplinkIndex||useDplinkIndex.equals(0)){
-                Long dpIndex ;
                 AiBytedanceAdDplinkInfo adDplinkInfo = adDplinkInfoService.getlatestDpLinkInfo(strategy.getId(),strategy.getAccountId(),1);
                 if(null == adDplinkInfo){
                     adDplinkInfo = new AiBytedanceAdDplinkInfo();
@@ -169,6 +157,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                     log.info("创意创建失败:code==>{};message==>{}",code,message);
                     continue;
                 }
+                BytedanceAiVideoCreativeLog creativeLog = new BytedanceAiVideoCreativeLog(strategy,adId,campaignId,video);
+                videoCreativeLogService.saveOrUpdate(creativeLog);
                 videoCnt --;
                 if(videoCnt<=0){
                     return 0L;
@@ -221,11 +211,10 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                 JSONObject creativeParams = getCreativeParams(strategy,adId,video,token);
                 log.info("创意创建参数:{}",creativeParams);
                 JSONObject creativeObject =  marketingService.creativeCreate(token,adId,creativeParams);
+                log.info("创意创建返回数据:{}",creativeObject);
                 if(null!=creativeObject.getInteger("code")&&creativeObject.getInteger("code")!=0){
                     String message = creativeObject.getString("message");
                     Integer code = creativeObject.getInteger("code");
-                    //创建创意失败
-                    log.info("创意创建失败:code==>{};message==>{}",code,message);
                     continue;
                 }
                 BytedanceAiVideoCreativeLog creativeLog = new BytedanceAiVideoCreativeLog(strategy,adId,campaignId,video);
@@ -1489,12 +1478,12 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
 
     /**
      *
-     * @description:获取橙子建站站点列表
+     * 获取橙子建站站点列表
      * https://www.chengzijianzhan.com/tetris/page/XXXXXXXXXXXXX/(其中XX是建站ID,拼装后就可获得投放的URL/预览URL)
      * Android应用下载详情页 当广告计划app_type为"APP_ANDROID"时, 必填
      * @param accountId
-     * @return: org.jeecg.common.api.vo.Result
-     * @author: zianY
+     * @return org.jeecg.common.api.vo.Result
+     * @author zianY
      */
     @Override
     public Result getChengZiSite(String accountId) {