Ver código fonte

添加图片类型开屏

yangzian 4 anos atrás
pai
commit
7cc5287efe

+ 1 - 0
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/enums/BytedanceCreativeMatTypeEnum.java

@@ -15,6 +15,7 @@ public enum BytedanceCreativeMatTypeEnum {
 
     BYTEDANCE_CREATIVE_IMAGE_MODE_LARGE("CREATIVE_IMAGE_MODE_LARGE","1","大图横图"),
     BYTEDANCE_CREATIVE_IMAGE_MODE_LARGE_VERTICAL("CREATIVE_IMAGE_MODE_LARGE_VERTICAL","2","大图竖图"),
+    BYTEDANCE_CREATIVE_IMAGE_MODE_UNION_SPLASH("CREATIVE_IMAGE_MODE_UNION_SPLASH","3","开屏"),
     BYTEDANCE_CREATIVE_IMAGE_MODE_VIDEO("CREATIVE_IMAGE_MODE_VIDEO","2","横版视频"),
     BYTEDANCE_CREATIVE_IMAGE_MODE_VIDEO_VERTICAL("CREATIVE_IMAGE_MODE_VIDEO_VERTICAL","1","竖版视频");
 

+ 29 - 3
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/xml/ByteDanceVideoInfoMapper.xml

@@ -157,7 +157,15 @@
         'image' as materialType
         from ctop_bytedance_image_info image
         where account_id = #{accountId}
-        and image.type = #{imageMode}
+        <if test="imageMode = '1'">
+            and image.type = '1'
+        </if>
+        <if test="imageMode = '2'">
+            and (image.type = '2' or image.type = '4')
+        </if>
+        <if test="imageMode = '3'">
+            and (image.type = '3' or image.type = '4')
+        </if>
         and image.create_time &gt;= #{startTime}
         and image.create_time &lt;= #{endTime}
         having creativeCnt &lt;= #{creativeCnt}
@@ -188,7 +196,16 @@
         and report.stat_datetime &lt;= #{endTime}
         group by report.material_id
         order by sum(report.cost) desc ) a
-        left join (select distinct a.* from ctop_bytedance_image_info a where a.account_id = #{accountId} and a.type = #{imageMode})as image
+        left join (select distinct a.* from ctop_bytedance_image_info a where 1 = 1  and a.account_id = #{accountId}
+        <if test="imageMode = '1'">
+            and a.type = '1'
+        </if>
+        <if test="imageMode = '2'">
+            and (a.type = '2' or a.type = '4')
+        </if>
+        <if test="imageMode = '3'">
+            and (a.type = '3' or a.type = '4')
+        </if>)as image
         on a.material_id = image.material_id
         where 1=1
         and a.totalCost &gt; 500
@@ -221,7 +238,16 @@
         and report.stat_datetime &lt;= #{endTime}
         group by report.material_id
         order by sum(report.cost) desc) a
-        left join (select distinct a.* from ctop_bytedance_image_info a where a.account_id =#{accountId} and a.type = #{imageMode}) as image
+        left join (select distinct a.* from ctop_bytedance_image_info a where 1 = 1 and a.account_id =#{accountId}
+        <if test="imageMode = '1'">
+            and a.type = '1'
+        </if>
+        <if test="imageMode = '2'">
+            and (a.type = '2' or a.type = '4')
+        </if>
+        <if test="imageMode = '3'">
+            and (a.type = '3' or a.type = '4')
+        </if>) as image
         on a.material_id = image.material_id
         where 1=1
         and a.totalCost &lt;= 100

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

@@ -1171,7 +1171,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
      */
     private List<ByteDanceVideoInfo> getImageInfoByCreateType(Long projectId,AiBytedanceAdvertiserStrategy strategy, String startTime, String endTime, Integer createType, Long videoCnt) {
         //根据 imageMode 获取素材类型
-        //1-大图横图; 2-大图竖图
+        //1-大图横图; 2-大图竖图 3-开屏
         String imageMode = BytedanceCreativeMatTypeEnum.getNameByType(strategy.getCreativeImageMode());
         //1:上新素材 2:跑量素材 3:遗漏素材 4:打捞素材
         if(createType == 1||createType == 3){