Explorar el Código

添加视频创建创意信息过滤

songyh hace 4 años
padre
commit
3a42aa4d02

+ 2 - 0
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/entity/BytedanceAiVideoCreativeLog.java

@@ -26,6 +26,7 @@ public class BytedanceAiVideoCreativeLog {
 	/**id*/
 	@TableId(type = IdType.AUTO)
 	private Long id;
+	private Long accountId;
 	/**videoCode*/
 	private String videoCode;
 	private Long campaignId;
@@ -44,6 +45,7 @@ public class BytedanceAiVideoCreativeLog {
 	private Date updateTime;
 
 	public BytedanceAiVideoCreativeLog(AiBytedanceAdvertiserStrategy strategy, Long adId, Long campaignId, ByteDanceVideoInfo video) {
+		this.accountId = strategy.getAccountId();
 		this.strategyId = strategy.getId();
 		this.adId = adId;
 		this.campaignId = campaignId;

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

@@ -69,7 +69,7 @@
     <select id="getNewVideoByParams"
             resultType="org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo">
         select distinct video.*,
-        (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.state_date = #{now}) as creativeNum,
+        (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.account_id = video.account_id and l.state_date = #{now}) as creativeNum,
         (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = '${accountId}') as creativeCnt,
         (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature) as slogens
         from ctop_bytedance_video_info video
@@ -86,9 +86,9 @@
     <select id="topMatByParams" resultType="org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo">
         select distinct video.*,
         a.totalCost,
-        (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.state_date = #{now}) as creativeNum,
+        (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.account_id = video.account_id and l.state_date = #{now}) as creativeNum,
         (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = '${accountId}') as creativeCnt,
-        (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature) as slogens
+        (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature ) as slogens
         from (select report.material_id, sum(cost) as totalCost
         from ctop_bytedance_report_material_daily report
         left join ctop_user_allocation cua on report.account_id = cua.account_id
@@ -114,7 +114,7 @@
     <select id="historyMatByParams" resultType="org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo">
         select distinct video.*,
                a.totalCost,
-               (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.state_date = #{now}) as creativeNum,
+               (select count(1) from ctop_bytedance_ai_video_creative_log l where l.video_code = video.signature and l.account_id = video.account_id and l.state_date = #{now}) as creativeNum,
                (select count(1) from ctop_bytedance_creative c where c.video_id = video.vid and c.account_id = '${accountId}') as creativeCnt,
                (select count(1) from ctop_bytedance_video_slogen_info s where s.video_code = video.signature) as slogens
         from (select report.material_id, sum(cost) as totalCost