1.新增
<insert id="insertList" parameterType="list">
insert into table(
column
) VALUES
<foreach collection="list" item="item" index="index" open="(" separator="," close=") >
#{item.column}
</foreach>
</insert>
2.修改
<update id="deleteList" parameterType="list" >
UPDATE table
SET table.column1 = #{column1}
WHERE table.column2 IN
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</update>
3.删除
<delete id="deleteList">
UPDATE table SET
column1 = #{column1}
WHERE column2 IN
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>