<?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="uml.tech.bigdata.mapper.VehicleRegionStatisticsMapper">

    <insert id="insertBatch" parameterType="java.util.List">
        replace INTO bigdata.tb_vehicle_region_statistics
            (id,
             did,
             vin,
             org_id_path,
             lon,
             lat,
             province_code,
             province_name,
             city_code,
             city_name,
             district_code,
             district_name,
             address,
             statistics_time,
             work_time) VALUES
        <foreach collection="list" index="index" item="item" separator=",">
            (#{item.id},
                   #{item.did},
                   #{item.vin},
                   #{item.orgIdPath},
                   #{item.lon},
                   #{item.lat},
                   #{item.provinceCode},
                   #{item.provinceName},
                   #{item.cityCode},
                   #{item.cityName},
                   #{item.districtCode},
                   #{item.districtName},
                   #{item.address},
                   #{item.statisticsTime},
                   #{item.workTime})
        </foreach>
    </insert>
</mapper>