批量删除:
<delete id="deleteSIMCardList" parameterType="java.util.List">
delete from unicom_card where id in
<foreach collection="list" index="index" item="item" open="("
separator="," close=")">
#{item.id}
</foreach>
</delete>
批量更新:
<update id="updateSIMCardList" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="begin"
close=";end;" separator=";">
UPDATE unicom_card
<trim prefix="set" suffixOverrides=",">
<if test="item.iccid!=null and item.iccid!=''"> iccid=#{item.iccid},</if>
</trim>
WHERE id =${item.id}
</foreach>
</update>