|
@@ -31,16 +31,41 @@
|
|
|
<update id="updateStudent" parameterType="java.util.List" >
|
|
<update id="updateStudent" parameterType="java.util.List" >
|
|
|
update repairs_student
|
|
update repairs_student
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
|
+ <trim prefix="student_name=case" suffix="end,">
|
|
|
|
|
+ <foreach collection="list" item="item" index="index">
|
|
|
|
|
+ when student_id = #{item.studentId} then #{item.studentName}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="student_sex=case" suffix="end,">
|
|
|
|
|
+ <foreach collection="list" item="item" index="index">
|
|
|
|
|
+ when student_id = #{item.studentId} then #{item.studentSex}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="student_phone=case" suffix="end,">
|
|
|
|
|
+ <foreach collection="list" item="item" index="index">
|
|
|
|
|
+ when student_id = #{item.studentId} then #{item.studentPhone}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </trim>
|
|
|
<trim prefix="student_other_phone=case" suffix="end,">
|
|
<trim prefix="student_other_phone=case" suffix="end,">
|
|
|
<foreach collection="list" item="item" index="index">
|
|
<foreach collection="list" item="item" index="index">
|
|
|
when student_id = #{item.studentId} then #{item.studentOtherPhone}
|
|
when student_id = #{item.studentId} then #{item.studentOtherPhone}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</trim>
|
|
</trim>
|
|
|
|
|
+ <trim prefix="student_clazz=case" suffix="end,">
|
|
|
|
|
+ <foreach collection="list" item="item" index="index">
|
|
|
|
|
+ when student_id = #{item.studentId} then #{item.studentClazz}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </trim>
|
|
|
<trim prefix="dorm_number=case" suffix="end,">
|
|
<trim prefix="dorm_number=case" suffix="end,">
|
|
|
<foreach collection="list" item="item" index="index">
|
|
<foreach collection="list" item="item" index="index">
|
|
|
when student_id = #{item.studentId} then #{item.dormNumber}
|
|
when student_id = #{item.studentId} then #{item.dormNumber}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</trim>
|
|
</trim>
|
|
|
|
|
+ <trim prefix="student_campus=case" suffix="end,">
|
|
|
|
|
+ <foreach collection="list" item="item" index="index">
|
|
|
|
|
+ when student_id = #{item.studentId} then #{item.studentCampus}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </trim>
|
|
|
</trim>
|
|
</trim>
|
|
|
where student_id in
|
|
where student_id in
|
|
|
<foreach collection="list" index="index" item="item"
|
|
<foreach collection="list" index="index" item="item"
|