|
@@ -129,7 +129,7 @@
|
|
SELECT IFNULL(sum(cost), 0.00)
|
|
SELECT IFNULL(sum(cost), 0.00)
|
|
FROM application.bytedance_advertiser_report_hourly_dw
|
|
FROM application.bytedance_advertiser_report_hourly_dw
|
|
WHERE stat_datetime >= DATE_FORMAT(#{startDay}, '%Y%m%d')
|
|
WHERE stat_datetime >= DATE_FORMAT(#{startDay}, '%Y%m%d')
|
|
- and stat_datetime < DATE_FORMAT(#{endDay}, '%Y%m%d')
|
|
|
|
|
|
+ and stat_datetime <= DATE_FORMAT(#{endDay}, '%Y%m%d')
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
and account_id in
|
|
and account_id in
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
@@ -177,7 +177,7 @@
|
|
FROM application.kuaishou_account_report_hourly_dw
|
|
FROM application.kuaishou_account_report_hourly_dw
|
|
WHERE
|
|
WHERE
|
|
stat_date >= DATE_FORMAT(#{startDay}, '%Y%m%d')
|
|
stat_date >= DATE_FORMAT(#{startDay}, '%Y%m%d')
|
|
- and stat_date < DATE_FORMAT(#{endDay}, '%Y%m%d')
|
|
|
|
|
|
+ and stat_date <= DATE_FORMAT(#{endDay}, '%Y%m%d')
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
and account_id in
|
|
and account_id in
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
@@ -459,7 +459,7 @@
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
and t1.project_id in
|
|
and t1.project_id in
|
|
(
|
|
(
|
|
- SELECT project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
|
|
|
|
+ SELECT distinct project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{id}
|
|
#{id}
|
|
@@ -479,7 +479,7 @@
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
and t1.project_id in
|
|
and t1.project_id in
|
|
(
|
|
(
|
|
- SELECT project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
|
|
|
|
+ SELECT distinct project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{id}
|
|
#{id}
|
|
@@ -513,7 +513,7 @@
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
and project_id in
|
|
and project_id in
|
|
(
|
|
(
|
|
- SELECT project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
|
|
|
|
+ SELECT distinct project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{id}
|
|
#{id}
|
|
@@ -528,7 +528,7 @@
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
and project_id in
|
|
and project_id in
|
|
(
|
|
(
|
|
- SELECT project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
|
|
|
|
+ SELECT distinct project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{id}
|
|
#{id}
|
|
@@ -539,11 +539,11 @@
|
|
AND stat_date <= DATE_FORMAT(DATE_ADD(#{endTime}, INTERVAL - ${days} DAY ), '%Y%m%d' )
|
|
AND stat_date <= DATE_FORMAT(DATE_ADD(#{endTime}, INTERVAL - ${days} DAY ), '%Y%m%d' )
|
|
GROUP BY project_id ) t3 ON
|
|
GROUP BY project_id ) t3 ON
|
|
t1.project_id = t3.project_id
|
|
t1.project_id = t3.project_id
|
|
- WHERE hour <= #{hour}
|
|
|
|
|
|
+ WHERE hour <= #{hour}
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
and t1.project_id in
|
|
and t1.project_id in
|
|
(
|
|
(
|
|
- SELECT project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
|
|
|
|
+ SELECT distinct project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{id}
|
|
#{id}
|
|
@@ -579,7 +579,7 @@
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
and project_id in
|
|
and project_id in
|
|
(
|
|
(
|
|
- SELECT project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
|
|
|
|
+ SELECT distinct project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{id}
|
|
#{id}
|
|
@@ -595,7 +595,7 @@
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
and project_id in
|
|
and project_id in
|
|
(
|
|
(
|
|
- SELECT project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
|
|
|
|
+ SELECT distinct project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{id}
|
|
#{id}
|
|
@@ -610,7 +610,7 @@
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
<if test="accountIds !=null and accountIds.size()>0">
|
|
and t1.project_id in
|
|
and t1.project_id in
|
|
(
|
|
(
|
|
- SELECT project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
|
|
|
|
+ SELECT distinct project_id FROM `jeecg-boot`.ctop_user_allocation WHERE account_id in
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
<foreach collection="accountIds" item="id" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{id}
|
|
#{id}
|