瀏覽代碼

过滤掉所有没有上传助手的视频素材以及未绑定广告语的素材

songyh 4 年之前
父節點
當前提交
65366b3444

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

@@ -97,6 +97,15 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         //根据dpLink获取组名称
 
         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;
+            }
             /**
              * 2:创建计划
              */
@@ -823,8 +832,9 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         }
         if(adName.contains("{{素材名称}}")){
             MaterialInfo info = materialInfoService.getParams(videoInfo.getSignature(),null);
-            System.out.println(info.getMaterialName());
-            adName = adName.replace("{{素材名称}}",info.getMaterialName());
+            if(null!=info&&null!=info.getMaterialName()){
+                adName = adName.replace("{{素材名称}}",info.getMaterialName());
+            }
         }
         return adName;
     }