feat(config): 更新配置文件和培训用户添加命令

main
zhaokai 2026-08-12 15:13:14 +08:00
parent 2120e28698
commit 801f5ec66c
1 changed files with 21 additions and 7 deletions

View File

@ -17,15 +17,29 @@
<select id="listAllByPhones" resultType="com.zcloud.edu.persistence.dataobject.TrainingUserDO"> <select id="listAllByPhones" resultType="com.zcloud.edu.persistence.dataobject.TrainingUserDO">
select select
phone, tu.phone,
start_time, tu.start_time,
end_time, tu.end_time,
case when start_time &lt; now() and end_time > now() then 1 else 0 end stateFlag case when tu.start_time &lt; now() and tu.end_time > now() then 1 else 0 end stateFlag
from training_user from training_user tu
inner join (
select phone, max(id) id
from training_user
<where>
delete_enum = 'false'
<if test="params.phones != null">
and phone in
<foreach item="phone" collection="params.phones" open="(" separator="," close=")">
#{phone}
</foreach>
</if>
</where>
group by phone
) latest on latest.id = tu.id
<where> <where>
delete_enum = 'false' tu.delete_enum = 'false'
<if test="params.phones != null"> <if test="params.phones != null">
and phone in and tu.phone in
<foreach item="phone" collection="params.phones" open="(" separator="," close=")"> <foreach item="phone" collection="params.phones" open="(" separator="," close=")">
#{phone} #{phone}
</foreach> </foreach>