修改查询过滤逻辑
This commit is contained in:
@@ -24,13 +24,28 @@
|
||||
and u.channel = #{channel}
|
||||
</if>
|
||||
<if test="(ignoreVersion != null and ignoreVersion != '') and (ignoreChannel == null or ignoreChannel == '')">
|
||||
and alr.uid not in (
|
||||
select distinct alr.uid from account_login_record as alr
|
||||
left join users as u on u.uid = alr.uid
|
||||
where alr.create_time >= DATE_SUB(CURDATE(), INTERVAL 60 DAY)
|
||||
and (not find_in_set(alr.app_version, #{ignoreVersion}))
|
||||
)
|
||||
</if>
|
||||
<if test="(ignoreVersion == null or ignoreVersion == '') and (ignoreChannel != null and ignoreChannel != '')">
|
||||
and alr.uid not in (
|
||||
select distinct alr.uid from account_login_record as alr
|
||||
left join users as u on u.uid = alr.uid
|
||||
where alr.create_time >= DATE_SUB(CURDATE(), INTERVAL 60 DAY)
|
||||
and (not find_in_set(u.channel, #{ignoreChannel}))
|
||||
)
|
||||
</if>
|
||||
<if test="(ignoreVersion != null and ignoreVersion != '') and (ignoreChannel != null and ignoreChannel != '')">
|
||||
and alr.uid not in (
|
||||
select distinct alr.uid from account_login_record as alr
|
||||
left join users as u on u.uid = alr.uid
|
||||
where alr.create_time >= DATE_SUB(CURDATE(), INTERVAL 60 DAY)
|
||||
and ((not find_in_set(alr.app_version, #{ignoreVersion})) or (not find_in_set(u.channel, #{ignoreChannel})))
|
||||
)
|
||||
</if>
|
||||
limit #{index}, #{offset}
|
||||
</select>
|
||||
|
Reference in New Issue
Block a user