一、使用MyBatis批量更新数据到Oracle的表中
<update id="batchUpdate" parameterType="java.util.List">
<foreach collection="list" index="index" item="item" open="begin" close=";end;" separator=";">
update MS_USER
<set>
<if test="item.mobilePhone != null">mobile_phone = #{item.mobilePhone},</if>
<if test="item.userName != null">user_name = #{item.userName},</if>
</set>
where id = #{item.id}
</foreach>
</update>
二、参考文章
1.《mybatis执行批量更新batch update 的方法(oracle,mysql)》(https://my.oschina.net/jsonavaj/blog/265112)