更新
<update id="updateXXX">
UPDATE XXX
<trim prefix="set" suffixOverrides=",">
<if test="reportDate != null and reportDate != ''">REPORT_DATE = #{reportDate},</if>
</trim>
WHERE XXX=#{XXX}
</update>
批量更新
<update id="XXX" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
UPDATE XXX set XX= '0' , XX= now() where XX= #{item} or XX= #{item}
</foreach>
</update>
mybatis 传入map 进行批量更新操作示例https://blog.csdn.net/woyuchengxian1111/article/details/78560341?locationNum=5&fps=1