|
@@ -545,7 +545,7 @@
|
|
|
a.account_id as 'accountId',
|
|
|
b.auth_name as 'authName',
|
|
|
b.project_id as 'projectId',
|
|
|
- (select project_name from ctop_project where id = b.project_id) as 'projectName',
|
|
|
+ (select project_name from ctop_project where id = b.project_id) as 'projectName',
|
|
|
round(sum(a.charge),2) as 'charge',
|
|
|
sum(a.photo_show) as 'photoShow', -- 封面曝光数
|
|
|
sum(a.photo_click) as 'photoClick', -- 封面点击数
|
|
@@ -595,7 +595,7 @@
|
|
|
) as 'eventNextDayStayCost' -- 次日留存成本
|
|
|
from
|
|
|
ctop_kuaishou_report_daily_account a
|
|
|
- left join ctop_user_allocation b on a.account_id = b.account_id
|
|
|
+ left join ctop_user_allocation b on a.account_id = b.account_id
|
|
|
where
|
|
|
a.stat_date >= #{startDate}
|
|
|
and
|
|
@@ -637,6 +637,11 @@
|
|
|
) as 'responsibleName',
|
|
|
(
|
|
|
select realname from sys_user where id = (
|
|
|
+ select sale_id from ctop_project where id = b.project_id
|
|
|
+ )
|
|
|
+ ) as 'saleName',
|
|
|
+ (
|
|
|
+ select realname from sys_user where id = (
|
|
|
select design_responsible_id from ctop_project where id = b.project_id
|
|
|
)
|
|
|
) as 'designResponsibleName',
|
|
@@ -702,7 +707,7 @@
|
|
|
open="(" close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- group by b.project_id order by sum(a.charge) desc
|
|
|
+ group by b.project_id order by sum(a.charge) desc
|
|
|
</select>
|
|
|
|
|
|
<!-- 计划汇总 -->
|
|
@@ -713,7 +718,7 @@
|
|
|
#{yn} as 'yn',
|
|
|
concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
|
|
|
b.project_id as 'projectId',
|
|
|
- (select project_name from ctop_project where id = b.project_id) as 'projectName',
|
|
|
+ (select project_name from ctop_project where id = b.project_id) as 'projectName',
|
|
|
b.auth_name as 'authName',
|
|
|
a.account_id as 'accountId',
|
|
|
a.campaign_id as 'campaignId', -- 计划id
|
|
@@ -809,7 +814,7 @@
|
|
|
#{yn} as 'yn',
|
|
|
concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
|
|
|
b.project_id as 'projectId',
|
|
|
- (select project_name from ctop_project where id = b.project_id) as 'projectName',
|
|
|
+ (select project_name from ctop_project where id = b.project_id) as 'projectName',
|
|
|
a.account_id as 'accountId',
|
|
|
b.auth_name as 'authName',
|
|
|
a.campaign_id as 'campaignId', -- 计划id
|
|
@@ -991,7 +996,7 @@
|
|
|
#{yn} as 'yn',
|
|
|
concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
|
|
|
b.project_id as 'projectId',
|
|
|
- (select project_name from ctop_project where id = b.project_id) as 'projectName',
|
|
|
+ (select project_name from ctop_project where id = b.project_id) as 'projectName',
|
|
|
a.account_id as 'accountId',
|
|
|
b.auth_name as 'authName',
|
|
|
a.creative_id as 'creativeId',
|
|
@@ -1052,7 +1057,7 @@
|
|
|
(select material_type from ctop_kuaishou_video_get where photo_id = c.photo_id limit 1) as materialType
|
|
|
from
|
|
|
ctop_kuaishou_report_daily_creative a
|
|
|
- left join ctop_user_allocation b on a.account_id = b.account_id
|
|
|
+ left join ctop_user_allocation b on a.account_id = b.account_id
|
|
|
left join ctop_kuaishou_creative c on a.creative_id = c.creative_id
|
|
|
where
|
|
|
a.stat_date >= #{startDate}
|
|
@@ -1153,6 +1158,11 @@
|
|
|
) as 'responsibleName',
|
|
|
(
|
|
|
select realname from sys_user where id = (
|
|
|
+ select sale_id from ctop_project where id = b.project_id
|
|
|
+ )
|
|
|
+ ) as 'saleName',
|
|
|
+ (
|
|
|
+ select realname from sys_user where id = (
|
|
|
select design_responsible_id from ctop_project where id = b.project_id
|
|
|
)
|
|
|
) as 'designResponsibleName',
|
|
@@ -1218,7 +1228,7 @@
|
|
|
open="(" close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- group by b.project_id order by sum(a.charge) desc
|
|
|
+ group by b.project_id order by sum(a.charge) desc
|
|
|
|
|
|
</select>
|
|
|
|