第一步 映射文件配置
<update id="batchUpdate" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update lpt_dp_spzl
<trim prefix="set">
zlmc = #{item.zlmc},
px = ${item.px},
update_time = now()
</trim>
where dpzlid = #{item.dpzlid}
</foreach>
</update>
第二步 数据库url配置(经常忽略的地方)
dbc.url=jdbc:mysql://localhost:3306/ldata?useUnicode\=true&characterEncoding\=UTF-8&allowMultiQueries\=true