zhaotx 10 месяцев назад
Родитель
Сommit
eead85b19d

+ 2 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/mapper/xml/ReportsAdPushMapper.xml

@@ -281,7 +281,7 @@
         from application.user_data_report_daily where stat_date=${date}  and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_line in (1,4))
         group by advertiser_id) tb3
         on tb1.advertiser_id = tb3.advertiser_id
-        left join (select user_id, nick_name, phonenumber, dept_id from tidb.deepthink.sys_user) tb4
+        left join (select user_id, nick_name, phonenumber, dept_id, status, del_flag from tidb.deepthink.sys_user) tb4
         on tb1.user_id=tb4.user_id
         left join (
             select dp.dept_id, dp.dept_name, ifnull(subdp.dept_id, dp.dept_id) as sub_dept_id, ifnull(subdp.dept_name, dp.dept_name) as sub_dept_name from (select * from tidb.deepthink.sys_dept where parent_id in (select dept_id from tidb.deepthink.sys_dept where parent_id=300)) dp
@@ -292,6 +292,7 @@
         ) tb5
         on tb4.dept_id = tb5.sub_dept_id
         where tb1.user_id is not null and (tb4.nick_name not like '%IAP%' and tb4.nick_name not like '%IAA%')
+        and tb4.status = 0 and tb4.del_flag = 0
         group by tb1.user_id, tb4.phonenumber, tb4.nick_name, tb5.dept_id, tb5.dept_name
         having sum(cost_amount)>1
         order by rk asc