Jelajahi Sumber

飞书推送-去掉转组优化师的原账号

zhaotx 10 bulan lalu
induk
melakukan
06e7f4ad2f

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

@@ -291,7 +291,7 @@
             select dept_id, dept_name, dept_id as sub_dept_id, dept_name as sub_dept_name from tidb.deepthink.sys_dept where parent_id in (select dept_id from tidb.deepthink.sys_dept where parent_id=300)
             select dept_id, dept_name, dept_id as sub_dept_id, dept_name as sub_dept_name from tidb.deepthink.sys_dept where parent_id in (select dept_id from tidb.deepthink.sys_dept where parent_id=300)
         ) tb5
         ) tb5
         on tb4.dept_id = tb5.sub_dept_id
         on tb4.dept_id = tb5.sub_dept_id
-        where tb1.user_id is not null
+        where tb1.user_id is not null and (tb4.nick_name not like '%IAP%' and tb4.nick_name not like '%IAA%')
         group by tb1.user_id, tb4.phonenumber, tb4.nick_name, tb5.dept_id, tb5.dept_name
         group by tb1.user_id, tb4.phonenumber, tb4.nick_name, tb5.dept_id, tb5.dept_name
         having sum(cost_amount)>1
         having sum(cost_amount)>1
         order by rk asc
         order by rk asc
@@ -653,6 +653,7 @@
         where u.del_flag = '0' and u.status=0
         where u.del_flag = '0' and u.status=0
           and (u.dept_id in (203,204,205,206)
           and (u.dept_id in (203,204,205,206)
             or d.parent_id in (203,204,205,206))
             or d.parent_id in (203,204,205,206))
+        and (u.nick_name not like '%IAP%' and u.nick_name not like '%IAA%')
     </select>
     </select>
     <select id="hourUpdateTime" resultType="java.lang.String">
     <select id="hourUpdateTime" resultType="java.lang.String">
         select max(update_time)
         select max(update_time)

+ 1 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/MovieRankPushServiceImpl.java

@@ -107,6 +107,7 @@ public class MovieRankPushServiceImpl implements IMovieRankPushService {
             List<JSONObject> users = reportsAdPushMapper.selectOptimizerList();
             List<JSONObject> users = reportsAdPushMapper.selectOptimizerList();
             List<String> mobiles = users.stream().map(user -> user.getString("phonenumber"))
             List<String> mobiles = users.stream().map(user -> user.getString("phonenumber"))
                     .filter(s -> s != null && s.length() == 11)
                     .filter(s -> s != null && s.length() == 11)
+                    .distinct()
                     .collect(Collectors.toList());
                     .collect(Collectors.toList());
             String token;
             String token;
             Map<String, String> mobileMap;
             Map<String, String> mobileMap;