修改查询过滤逻辑4

This commit is contained in:
liaozetao
2023-12-11 15:39:13 +08:00
parent faa7da7a87
commit 92acbc13f2

View File

@@ -25,17 +25,23 @@
</if>
<if test="(ignoreVersion != null and ignoreVersion != '') and (ignoreChannel == null or ignoreChannel == '')">
and alr.uid not in (
select a.uid from account as a where find_in_set(a.app_version, #{ignoreVersion})
select a.uid from account as a where
a.last_login_time >= DATE_SUB(CURDATE(), INTERVAL 60 DAY)
and find_in_set(a.app_version, #{ignoreVersion})
)
</if>
<if test="(ignoreVersion == null or ignoreVersion == '') and (ignoreChannel != null and ignoreChannel != '')">
and alr.uid not in (
select a.uid from account as a where find_in_set(a.channel, #{ignoreChannel})
select a.uid from account as a where
a.last_login_time >= DATE_SUB(CURDATE(), INTERVAL 60 DAY)
and find_in_set(a.channel, #{ignoreChannel})
)
</if>
<if test="(ignoreVersion != null and ignoreVersion != '') and (ignoreChannel != null and ignoreChannel != '')">
and alr.uid not in (
select a.uid from account as a where (find_in_set(a.app_version, #{ignoreVersion})) or find_in_set(a.channel, #{ignoreChannel}))
select a.uid from account as a where
a.last_login_time >= DATE_SUB(CURDATE(), INTERVAL 60 DAY)
and (find_in_set(a.app_version, #{ignoreVersion})) or find_in_set(a.channel, #{ignoreChannel}))
)
</if>
limit #{index}, #{offset}