修复培训用户查询的时间条件过滤逻辑
parent
0e8138b9b5
commit
6b6bb27969
|
|
@ -87,13 +87,15 @@
|
||||||
u.org_id,
|
u.org_id,
|
||||||
u.env,
|
u.env,
|
||||||
u.open_id,
|
u.open_id,
|
||||||
tu.phone,
|
tu.phone
|
||||||
case when tu.start_time < now() and tu.end_time > now() then 1 else 0 end stateFlag
|
-- case when tu.start_time < now() and tu.end_time > now() then 1 else 0 end stateFlag
|
||||||
from
|
from
|
||||||
user u
|
user u
|
||||||
left join training_user tu on tu.phone = u.username and tu.delete_enum = 'FALSE'
|
left join training_user tu on tu.phone = u.username and tu.delete_enum = 'FALSE'
|
||||||
<where>
|
<where>
|
||||||
and u.delete_enum = 'FALSE'
|
and u.delete_enum = 'FALSE'
|
||||||
|
and tu.start_time < now()
|
||||||
|
and tu.end_time > now()
|
||||||
<if test="params.noMain != null">
|
<if test="params.noMain != null">
|
||||||
and u.id != u.corpinfo_id
|
and u.id != u.corpinfo_id
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -170,13 +172,15 @@
|
||||||
u.org_id,
|
u.org_id,
|
||||||
u.env,
|
u.env,
|
||||||
u.open_id,
|
u.open_id,
|
||||||
tu.phone,
|
tu.phone
|
||||||
case when tu.start_time < now() and tu.end_time > now() then 1 else 0 end stateFlag
|
-- case when tu.start_time < now() and tu.end_time > now() then 1 else 0 end stateFlag
|
||||||
from
|
from
|
||||||
user u
|
user u
|
||||||
left join training_user tu on tu.phone = u.username and tu.delete_enum = 'FALSE'
|
left join training_user tu on tu.phone = u.username and tu.delete_enum = 'FALSE'
|
||||||
<where>
|
<where>
|
||||||
and u.delete_enum = 'FALSE'
|
and u.delete_enum = 'FALSE'
|
||||||
|
and tu.start_time < now()
|
||||||
|
and tu.end_time > now()
|
||||||
<if test="params.noMain != null">
|
<if test="params.noMain != null">
|
||||||
and u.id != u.corpinfo_id
|
and u.id != u.corpinfo_id
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue