2026-01-22 08:25:32 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
|
|
|
|
<mapper namespace="com.zcloud.edu.persistence.mapper.TrainingUserMapper">
|
2026-02-28 08:55:36 +08:00
|
|
|
<update id="updateTime">
|
|
|
|
|
update training_user
|
|
|
|
|
<set>
|
|
|
|
|
start_time = #{params.startTime},
|
|
|
|
|
end_time = #{params.endTime}
|
|
|
|
|
</set>
|
|
|
|
|
<where>
|
|
|
|
|
phone = #{params.phone}
|
|
|
|
|
and ( end_time is null or end_time < #{params.endTime})
|
|
|
|
|
</where>
|
|
|
|
|
</update>
|
2026-03-17 17:40:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="listAllByPhones" resultType="com.zcloud.edu.persistence.dataobject.TrainingUserDO">
|
|
|
|
|
|
|
|
|
|
select
|
|
|
|
|
phone,
|
|
|
|
|
start_time,
|
|
|
|
|
end_time,
|
|
|
|
|
case when start_time < now() and end_time > now() then 1 else 0 end stateFlag
|
|
|
|
|
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>
|
|
|
|
|
</select>
|
|
|
|
|
|
2026-01-22 08:25:32 +08:00
|
|
|
</mapper>
|
|
|
|
|
|