<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.crm.ucard.dao.mapper.CardGlobalStatesMapper">

    <insert id="batchSave" parameterType="java.util.List">
        insert ignore into ucard_global_states(`code`,`name`,`country`,`country_standard_code`,`add_time`)
        values
        <foreach collection="list" item="item" index="index" separator=",">
            (#{item.code},#{item.name},#{item.country},#{item.countryStandardCode},now())
        </foreach>
    </insert>
    <delete id="deleteAll">
        delete from ucard_global_states
    </delete>

</mapper> 