Pārlūkot izejas kodu

盯盘2.0功能 ,添加账户状态筛选条件

zhaoxian 4 gadi atpakaļ
vecāks
revīzija
3822a9e5ae

+ 4 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/EtlKuaishouReportAccountHourlyMapper.xml

@@ -436,7 +436,8 @@
         ctop_etl_kuaishou_report_account_hourly t1
         LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
         LEFT JOIN(
-        SELECT user_id,COUNT(1) 'accountCount' FROM ctop_user_allocation WHERE user_id IN
+        SELECT user_id,COUNT(1) 'accountCount' FROM ctop_user_allocation WHERE
+        account_status = 0 AND user_id IN
         <foreach item="id" index="index" collection="userIds"
                  open="(" separator="," close=")">
             #{id}
@@ -599,6 +600,7 @@
         GROUP BY i1.account_id
         ) t6 ON t2.account_id = t6.account_id
         where stat_date = #{startTime}
+        and t2.account_status = 0
         AND t2.user_id IN
         <foreach item="id" index="index" collection="userIds"
                  open="(" separator="," close=")">
@@ -620,6 +622,7 @@
         LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
         LEFT JOIN ctop_project t3 ON t2.project_id = t3.id
         where stat_date = #{startTime}
+        and t2.account_status = 0
         AND t2.user_id in
         <foreach item="id" index="index" collection="userIds"
                  open="(" separator="," close=")">