|
@@ -97,7 +97,7 @@
|
|
from (select report.material_id, sum(cost) as totalCost
|
|
from (select report.material_id, sum(cost) as totalCost
|
|
from ctop_bytedance_report_material_daily report
|
|
from ctop_bytedance_report_material_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.project_id = #{projectId}
|
|
|
|
|
|
+ where cua.account_id = #{accountId}
|
|
and report.stat_datetime >= #{startTime}
|
|
and report.stat_datetime >= #{startTime}
|
|
and report.stat_datetime <= #{endTime}
|
|
and report.stat_datetime <= #{endTime}
|
|
group by report.material_id
|
|
group by report.material_id
|
|
@@ -126,7 +126,7 @@
|
|
from (select report.material_id, sum(cost) as totalCost
|
|
from (select report.material_id, sum(cost) as totalCost
|
|
from ctop_bytedance_report_material_daily report
|
|
from ctop_bytedance_report_material_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.project_id = #{projectId}
|
|
|
|
|
|
+ where cua.account_id = #{accountId}
|
|
and report.stat_datetime >= #{startTime}
|
|
and report.stat_datetime >= #{startTime}
|
|
and report.stat_datetime <= #{endTime}
|
|
and report.stat_datetime <= #{endTime}
|
|
group by report.material_id
|
|
group by report.material_id
|
|
@@ -193,7 +193,7 @@
|
|
'image' as materialType
|
|
'image' as materialType
|
|
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.project_id = #{projectId}
|
|
|
|
|
|
+ where cua.account_id = #{accountId}
|
|
and report.stat_datetime >= #{startTime}
|
|
and report.stat_datetime >= #{startTime}
|
|
and report.stat_datetime <= #{endTime}
|
|
and report.stat_datetime <= #{endTime}
|
|
group by report.material_id
|
|
group by report.material_id
|
|
@@ -235,7 +235,7 @@
|
|
'image' as materialType
|
|
'image' as materialType
|
|
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.project_id = #{projectId}
|
|
|
|
|
|
+ where cua.account_id = #{accountId}
|
|
and report.stat_datetime >= #{startTime}
|
|
and report.stat_datetime >= #{startTime}
|
|
and report.stat_datetime <= #{endTime}
|
|
and report.stat_datetime <= #{endTime}
|
|
group by report.material_id
|
|
group by report.material_id
|