<?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.uml.tech.mapper.StatisticsMapper" >


    <insert id="insertFromList" parameterType="com.uml.tech.bean.Statistics" >
        replace into ${tb_name} (did, alarm, averageCharge,
            averageChargeTime, averageElectricQuantity, 
            averageEnergy, averageHistory, averageLinkStatus, 
            averageMileage, averageRealtime, averageSpeed, 
            averageTermin, averageTermout, charge, 
            chargeTime, electricQuantity, energy, 
            lastGpsTime, mileage, numSpeed, 
            runDays, runTime, stopDays, 
            sumSpeed, totalHistory, totalLinkStatus, 
            totalMileage, totalRealtime, totalTermin, 
            totalTermout , maxSpeed, cyclingTime, totalCyclingTime)
        values
        <foreach collection="list" item="item" index="index" separator=",">
            (#{item.did}, #{item.alarm}, #{item.averageCharge},
            #{item.averageChargeTime}, #{item.averageElectricQuantity},
            #{item.averageEnergy}, #{item.averageHistory}, #{item.averageLinkStatus},
            #{item.averageMileage}, #{item.averageRealtime}, #{item.averageSpeed},
            #{item.averageTermin}, #{item.averageTermout}, #{item.charge},
            #{item.chargeTime}, #{item.electricQuantity}, #{item.energy},
            #{item.lastGpsTime}, #{item.mileage}, #{item.numSpeed},
            #{item.runDays}, #{item.runTime}, #{item.stopDays},
            #{item.sumSpeed}, #{item.totalHistory}, #{item.totalLinkStatus},
            #{item.totalMileage}, #{item.totalRealtime}, #{item.totalTermin},
            #{item.totalTermout}, #{item.maxSpeed},
            #{item.cyclingTime},
            #{item.totalCyclingTime})
        </foreach>
    </insert>


</mapper>