yangzian 3 роки тому
батько
коміт
2e1c0da6a6

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

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