中间表教职工表状态是非在职或返聘的职工禁止登录学工系统

This commit is contained in:
2025-12-24 16:40:01 +08:00
parent 7eea23df7e
commit 6cfbb502da
5 changed files with 99 additions and 39 deletions

View File

@@ -77,17 +77,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<insert id="insertBatchSomeColumn" parameterType="java.util.List">
insert into qgzx_teacher(name,gender,age,employee_id,dept_id,status,create_time)
insert into qgzx_teacher(name,gender,employee_id,dept_id,status,create_time)
values
<foreach item="entity" collection="list" separator="," open="(" close=")">
<foreach item="entity" collection="list" separator="," >
(
<if test="entity.name != null and entity.name != ''">#{entity.name},</if>
<if test="entity.gender != null and entity.gender != ''">#{entity.gender},</if>
<if test="entity.age!=null">#{entity.age},</if>
<if test="entity.employeeId != null and entity.employeeId != ''">#{entity.employeeId},</if>
<if test="entity.deptId!=null">#{entity.deptId},</if>
<if test="entity.status != null and entity.status != ''">#{entity.status},</if>
<if test="entity.createTime!=null">#{entity.createTime},</if>
<if test="entity.name != null and entity.name != ''">#{entity.name}</if>,
<if test="entity.gender != null and entity.gender != ''">#{entity.gender}</if>,
<if test="entity.employeeId != null and entity.employeeId != ''">#{entity.employeeId}</if>,
<if test="entity.deptId !=null">#{entity.deptId}</if>,
<if test="entity.status != null and entity.status != ''">#{entity.status}</if>,
<if test="entity.createTime !=null">#{entity.createTime}</if>
)
</foreach>
</insert>

View File

@@ -291,19 +291,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
nick_name,
sex,
password,
status,
create_time
)
values
<foreach collection="userList" item="item" index="i" separator=",">
(
#{item.userName},
<if test="item.deptId != null">#{item.deptId}</if>
<if test="item.deptId == null">null</if>,
#{item.nickName},
<if test="item.sex != null">#{item.sex}</if>
<if test="item.sex == null">"2"</if>,
#{item.password},
sysdate())
#{item.userName},
<if test="item.deptId != null">#{item.deptId}</if>
<if test="item.deptId == null">null</if>,
#{item.nickName},
<if test="item.sex != null">#{item.sex}</if>
<if test="item.sex == null">'2'</if>,
#{item.password},
<if test="item.status != null">#{item.status}</if>
<if test="item.status == null">null</if>,
sysdate()
)
</foreach>
</insert>
<update id="updateUserListInfo" parameterType="java.util.List">
@@ -335,6 +339,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
when user_name=#{i.userName} then sysdate()
</foreach>
</trim>
<trim prefix="status=case" suffix="end,">
<foreach collection="studentList" item="i" index="index">
when user_name=#{i.userName} then #{i.status}
</foreach>
</trim>
</trim>
where user_name in
<foreach collection="studentList" separator="," item="i" index="index" open="(" close=")">