1.代码
<update id="qualityAudit" parameterType="list">
<if test="list !=null and list.size > 0 ">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update t_qc_fund_sentence
<set>
CHECK_CORPUS=#{item.corpus},
CHECK_LABEL=#{item.label}
</set>
where
id=#{item.sentenceId}
</foreach>
</if>
</update>
2.想要批量操作数据,配置在数据库url后面带一个参数 &allowMultiQueries=true,表示允许批量操作,否则就会报错
url: jdbc:mysql://172.000000:10096/databasename?&allowMultiQueries=true```