<update id="batchUpdateStudent" parameterType="List">
UPDATE STUDENT SET name = "5566" WHERE id IN
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
</update>
传入的参数,对于传入的list,mybatis会给它一个默认的名称"list"
温馨提示:答案为网友推荐,仅供参考