批量update语句优化
<update id="updateBatchNoticeEditTypeById" parameterType="java.util.List">
update task_notice_setup
<trim prefix="set" suffixOverrides=",">
<trim prefix="notice_edit_type =case" suffix="end,">
<foreach collection="list" item="item" index="index">
when id=#{item.id} then #{item.noticeEditType}
</foreach>
</trim>
</trim>
where id in
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
咱也不懂咱也不敢问呐