|
|
@@ -149,52 +149,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<update id="updateFsCourseQuestionBankBatch">
|
|
|
- update fs_course_question_bank
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
- <trim prefix="sort = CASE" suffix="END,">
|
|
|
- <foreach collection="list" item="item">
|
|
|
- WHEN title = #{item.title} THEN #{item.sort}
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- <trim prefix="type = CASE" suffix="END,">
|
|
|
- <foreach collection="list" item="item">
|
|
|
- WHEN title = #{item.title} THEN #{item.type}
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- <trim prefix="status = CASE" suffix="END,">
|
|
|
- <foreach collection="list" item="item">
|
|
|
- WHEN title = #{item.title} THEN #{item.status}
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- <trim prefix="question = CASE" suffix="END,">
|
|
|
- <foreach collection="list" item="item">
|
|
|
- WHEN title = #{item.title} THEN #{item.question}
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- <trim prefix="answer = CASE" suffix="END,">
|
|
|
- <foreach collection="list" item="item">
|
|
|
- WHEN title = #{item.title} THEN #{item.answer}
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- <trim prefix="create_by = CASE" suffix="END,">
|
|
|
- <foreach collection="list" item="item">
|
|
|
- WHEN title = #{item.title} THEN #{item.createBy}
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- <trim prefix="question_type = CASE" suffix="END,">
|
|
|
- <foreach collection="list" item="item">
|
|
|
- WHEN title = #{item.title} THEN #{item.questionType}
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- <trim prefix="question_sub_type = CASE" suffix="END,">
|
|
|
- <foreach collection="list" item="item">
|
|
|
- WHEN title = #{item.title} THEN #{item.questionSubType}
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- </trim>
|
|
|
- WHERE title IN
|
|
|
- <foreach collection="list" item="item" open="(" separator="," close=")">
|
|
|
- #{item.title}
|
|
|
+ <foreach collection="list" item="item" separator=";">
|
|
|
+ update fs_course_question_bank
|
|
|
+ <set>
|
|
|
+ <if test="item.sort != null">sort = #{item.sort},</if>
|
|
|
+ <if test="item.type != null">type = #{item.type},</if>
|
|
|
+ <if test="item.status != null">status = #{item.status},</if>
|
|
|
+ <if test="item.question != null">question = #{item.question},</if>
|
|
|
+ <if test="item.answer != null">answer = #{item.answer},</if>
|
|
|
+ <if test="item.createBy != null">create_by = #{item.createBy},</if>
|
|
|
+ <if test="item.questionType != null">question_type = #{item.questionType},</if>
|
|
|
+ <if test="item.questionSubType != null">question_sub_type = #{item.questionSubType},</if>
|
|
|
+ <if test="item.userId != null">user_id = #{item.userId},</if>
|
|
|
+ </set>
|
|
|
+ where title = #{item.title}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
</mapper>
|