|
@@ -82,7 +82,7 @@
|
|
|
)
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
- <insert id="cleanPromoterBindChannel" parameterType="java.lang.Long">
|
|
|
+ <insert id="cleanKuaiShouPromoterBindChannel" parameterType="java.lang.Long">
|
|
|
insert into ruixuan.promoter_bind_channel_date (promoter_id, promoter_name,promoter_url, user_id, user_name, stat_date,media_id)
|
|
|
select t1.promoter_id, t1.promoter_nick_name, t1.promoter_url,t1.user_id, t1.user_name, #{date},media_id
|
|
|
from ruixuan.kuaishou_promoter t1
|
|
@@ -91,6 +91,7 @@
|
|
|
left join ruixuan.sys_role t3
|
|
|
on t2.role_id = t3.role_id
|
|
|
where 1 = 1
|
|
|
+ and t1.media_id = '2'
|
|
|
and t3.role_key in ('bdManager', 'bd')
|
|
|
and date_format(t1.create_time, '%Y%m%d') < #{date}
|
|
|
group by t1.promoter_id
|
|
@@ -165,5 +166,20 @@ group by t1.promoter_id;
|
|
|
and collect_sample_status = 4
|
|
|
and collect_sample_desc = '单号异常'
|
|
|
</select>
|
|
|
+ <select id="cleanBytedancePromoterBindChannel" parameterType="java.lang.Long">
|
|
|
+ insert into ruixuan.promoter_bind_channel_date (promoter_id, promoter_name,promoter_url, user_id, user_name, stat_date,media_id)
|
|
|
+ select t1.promoter_id, t1.promoter_nick_name, t1.promoter_url,t1.user_id, t1.user_name, #{date},media_id
|
|
|
+ from ruixuan.kuaishou_promoter t1
|
|
|
+ left join ruixuan.sys_user_role t2
|
|
|
+ on t1.user_id = t2.user_id
|
|
|
+ left join ruixuan.sys_role t3
|
|
|
+ on t2.role_id = t3.role_id
|
|
|
+ where 1 = 1
|
|
|
+ and t1.media_id = '1'
|
|
|
+ and t3.role_key in ('bdManager', 'bd')
|
|
|
+ and date_format(t1.create_time, '%Y%m%d') <= #{date}
|
|
|
+ group by t1.promoter_id
|
|
|
+
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|