<update id="updateBatchReview" parameterType="list">
update erp_employee
<trim prefix="set" suffixOverrides=",">
<trim prefix="employee_no =case" suffix="end,">
<foreach collection="list" item="item">
when mobile=#{item.mobile} then #{item.employeeNo}
</foreach>
</trim>
<trim prefix="mobile = case" suffix="end,">
<foreach collection="list" item="item">
when mobile=#{item.mobile} then #{item.mobile}
</foreach>
</trim>
<trim prefix="avatar = case" suffix="end,">
<foreach collection="list" item="item">
when mobile
Mybatis批量更新多条数据
最新推荐文章于 2024-08-23 17:37:30 发布
本文介绍如何使用Mybatis进行批量更新操作,特别是在mobile字段唯一的情况下,通过主键ID实现数据的高效更新。
摘要由CSDN通过智能技术生成