<?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.sckw.car.mapper.KwOrderCarWaybillOrderDispatchMapper">

    <insert id="insertBatch" parameterType="com.sckw.car.entity.KwOrderCarWaybillOrderDispatch">
        insert into kw_order_car_waybill_order_dispatch
        <trim prefix="(" suffix=")" suffixOverrides=",">
            id,
            waybill_id,
            dispatch_no,
            truck_no,
            driver_name
        </trim>
        values
        <foreach collection="list" item="item" separator=",">
            <trim prefix="(" suffix=")" suffixOverrides=",">
                ${item.id},
                #{item.waybillId,jdbcType=VARCHAR},
                #{item.dispatchNo,jdbcType=VARCHAR},
                #{item.truckNo,jdbcType=VARCHAR},
                #{item.driverName,jdbcType=VARCHAR}
            </trim>
        </foreach>
    </insert>
</mapper>