1、批量删除 <delete id="deleteLanguageBatch"> delete from user where <foreach collection="list" item="item" separator="or"> id = #{item.id} name = #{item.name} </foreach> </delete>
2、批量插入 <!-- 批量插入 --> <insert id="batchInsert" parameterType="java.util.List"> INSERT INTO ORDER_GOODS ( OG_ID, ORDER_ID, GOODS_DBID )VALUE <foreach collection="orderGoodsList" item="item" separator=",">
( #{item.ogId}, #{item.orderId}, #{item.goodsDbid} )
</foreach> </insert>