|
@@ -176,7 +176,7 @@
|
|
|
SELECT IFNULL(COUNT(1), 0)
|
|
|
FROM (
|
|
|
select t1.account_id
|
|
|
- FROM ctop_kuaishou_report_daily_material t1
|
|
|
+ FROM ctop_kuaishou_video_get t1
|
|
|
LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
|
WHERE t2.project_id = #{projectId}
|
|
|
AND t1.signature = #{signature}
|
|
@@ -186,8 +186,8 @@
|
|
|
|
|
|
<select id="getAccountVideos" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
SELECT t2.auth_name 'authName',
|
|
|
- t2.account_id 'accountId',
|
|
|
- t1.stat_date 'statDate',
|
|
|
+ t0.account_id 'accountId',
|
|
|
+ t0.stat_date 'statDate',
|
|
|
t3.rejectCount,
|
|
|
(SELECT COUNT(0) FROM ctop_kuaishou_creative WHERE account_id = t1.account_id) 'creativeCount',
|
|
|
IFNULL(SUM(t1.charge), 0) 'charge',
|
|
@@ -201,15 +201,15 @@
|
|
|
IFNULL(ROUND(SUM(t1.charge) / SUM(t1.aclick) * 1000, 2), 0) 'impression1kCost',
|
|
|
IFNULL(ROUND(SUM(t1.charge) / SUM(t1.photo_click), 2), 0) 'photoClickCost',
|
|
|
IFNULL(ROUND(SUM(t1.charge) / SUM(t1.bclick), 2), 0) 'actionCost'
|
|
|
- FROM ctop_kuaishou_report_daily_material t1
|
|
|
- LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
|
- LEFT JOIN (
|
|
|
+ FROM ctop_kuaishou_video_get t0
|
|
|
+ LEFT JOIN ctop_kuaishou_report_daily_material t1 ON t0.signature = t1.signature
|
|
|
+ LEFT JOIN ctop_user_allocation t2 ON t0.account_id = t2.account_id
|
|
|
+ LEFT JOIN (
|
|
|
SELECT COUNT(1) 'rejectCount',account_id FROM ctop_kuaishou_creative WHERE `status` = 42 GROUP BY account_id
|
|
|
- ) t3 ON t1.account_id = t3.account_id
|
|
|
+ ) t3 ON t0.account_id = t3.account_id
|
|
|
WHERE t2.project_id = #{projectId}
|
|
|
- AND t1.signature = #{signature}
|
|
|
- GROUP BY t1.account_id
|
|
|
-
|
|
|
+ AND t0.signature = #{signature}
|
|
|
+ GROUP BY t0.account_id
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|