|
@@ -157,15 +157,14 @@
|
|
|
|
|
|
<!-- 图片 上新 遗漏 -->
|
|
|
<select id="imageListByParams" resultType="org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo">
|
|
|
- select distinct image.*,
|
|
|
+ select distinct image.*,'image' as materialType,
|
|
|
(select count(1) from ctop_bytedance_ai_video_creative_log l
|
|
|
where l.video_code = image.signature
|
|
|
and l.account_id = image.account_id
|
|
|
and l.state_date = #{now}) as creativeNum,
|
|
|
(select count(1) from ctop_bytedance_creative c
|
|
|
where SUBSTRING_INDEX(SUBSTRING_INDEX(image_ids,'["',-1),'"]',1) in(image.id)
|
|
|
- and c.account_id = '${accountId}') as creativeCnt,
|
|
|
- 'image' as materialType
|
|
|
+ and c.account_id = '${accountId}') as creativeCnt
|
|
|
from ctop_bytedance_image_info image
|
|
|
where account_id = #{accountId}
|
|
|
<if test="imageMode == '1'.toString()">
|
|
@@ -190,7 +189,7 @@
|
|
|
<!-- 图片 跑量-->
|
|
|
<select id="imageTopMatByParams" resultType="org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo">
|
|
|
select distinct image.*,
|
|
|
- a.totalCost,
|
|
|
+ a.totalCost,'image' as materialType,
|
|
|
(select count(1) from ctop_bytedance_ai_video_creative_log l
|
|
|
where l.video_code = image.signature
|
|
|
and l.account_id = image.account_id
|
|
@@ -199,8 +198,7 @@
|
|
|
from ctop_bytedance_creative c
|
|
|
where SUBSTRING_INDEX(SUBSTRING_INDEX(image_ids,'["',-1),'"]',1) in(image.id)
|
|
|
and c.account_id = '${accountId}') as creativeCnt
|
|
|
- from (select report.material_id, sum(cost) as totalCost,
|
|
|
- 'image' as materialType
|
|
|
+ from (select report.material_id, sum(cost) as totalCost
|
|
|
from ctop_bytedance_report_image_daily report
|
|
|
left join ctop_user_allocation cua on report.account_id = cua.account_id
|
|
|
where cua.account_id = #{accountId}
|
|
@@ -232,7 +230,7 @@
|
|
|
<!-- 图片 打捞-->
|
|
|
<select id="imageHistoryMatByParams" resultType="org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo">
|
|
|
select distinct image.*,
|
|
|
- a.totalCost,
|
|
|
+ a.totalCost,'image' as materialType,
|
|
|
(select count(1)
|
|
|
from ctop_bytedance_ai_video_creative_log l
|
|
|
where l.video_code = image.signature
|
|
@@ -242,8 +240,7 @@
|
|
|
from ctop_bytedance_creative c
|
|
|
where SUBSTRING_INDEX(SUBSTRING_INDEX(image_ids,'["',-1),'"]',1) in(image.id)
|
|
|
and c.account_id = '${accountId}') as creativeCnt
|
|
|
- from (select report.material_id, sum(cost) as totalCost,
|
|
|
- 'image' as materialType
|
|
|
+ from (select report.material_id, sum(cost) as totalCost
|
|
|
from ctop_bytedance_report_image_daily report
|
|
|
left join ctop_user_allocation cua on report.account_id = cua.account_id
|
|
|
where cua.account_id = #{accountId}
|