Browse Source

Merge branch 'test'

yangzian 3 years ago
parent
commit
6439896584

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

@@ -79,6 +79,7 @@
         and cmi.code is not null
         and cmi.status = 1
         and cmi.offline_flag = 0
+        and video.status = 1
         and video.type = #{imageMode}
         and material_upload_time >= #{startTime}
         and material_upload_time <= #{endTime}
@@ -96,12 +97,12 @@
         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
-        where cua.project_id = #{projectId}
+        where cua.account_id = #{accountId}
         and report.stat_datetime >= #{startTime}
         and report.stat_datetime <= #{endTime}
         group by report.material_id
         order by sum(report.cost) desc ) a
-        left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = #{accountId} and a.type = #{imageMode})as video
+        left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = #{accountId} and a.type = #{imageMode} and a.status = 1)as video
         on a.material_id = video.material_id
         left join ctop_material_info cmi on cmi.code = video.signature and cmi.project_id = #{projectId}
         where cmi.id is not null
@@ -125,12 +126,12 @@
         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
-              where cua.project_id = #{projectId}
+              where cua.account_id = #{accountId}
                 and report.stat_datetime >= #{startTime}
                 and report.stat_datetime <= #{endTime}
               group by report.material_id
               order by sum(report.cost) desc ) a
-                 left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = #{accountId} and a.type = #{imageMode})as video
+                 left join (select distinct a.* from ctop_bytedance_video_info a where a.account_id = #{accountId} and a.type = #{imageMode} and a.status = 1)as video
                            on a.material_id = video.material_id
                  left join ctop_material_info cmi on cmi.code = video.signature and cmi.project_id = #{projectId}
         where cmi.id is not null
@@ -192,7 +193,7 @@
          'image' as materialType
         from ctop_bytedance_report_image_daily report
         left join ctop_user_allocation cua on report.account_id = cua.account_id
-        where cua.project_id = #{projectId}
+        where cua.account_id = #{accountId}
         and report.stat_datetime >= #{startTime}
         and report.stat_datetime <= #{endTime}
         group by report.material_id
@@ -234,7 +235,7 @@
         'image' as materialType
         from ctop_bytedance_report_image_daily report
         left join ctop_user_allocation cua on report.account_id = cua.account_id
-        where cua.project_id = #{projectId}
+        where cua.account_id = #{accountId}
         and report.stat_datetime >= #{startTime}
         and report.stat_datetime <= #{endTime}
         group by report.material_id