<update id="updateLeadBatch" parameterType="java.util.List">
update list_breakthrough
<trim prefix="set" suffixOverrides=",">
<trim prefix="leading_status=case" suffix="end,">
<foreach collection="breakthroughList" item="item" index="index">
<if test="item.leadingStatus!=null">
when id=#{item.id} then #{item.leadingStatus}
</if>
</foreach>
</trim>
</trim>
where
<foreach collection="breakthroughList" separator="or" item="item" index="index">
id = #{item.id}
</foreach>
</update>
mybatis-plus批量更新
于 2021-12-29 15:21:15 首次发布