<?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="cn.superdesk.uniorder.dao.mapper.accounting.score.customer.AccountingScoreCustomerXCreditMapperEx">


    <!-- 成功 -->
    <!-- cn.superdesk.uniorder.dao.entity.accounting.score.customer.AccountingScoreCustomerXCredit -->
    <insert id="insertBatch" parameterType="java.util.List">

        <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
            SELECT LAST_INSERT_ID()
        </selectKey>
        insert into accounting_score_customer_x_credit (
        accounting_order_id,
        accounting_order_sn,

        unified_order_id,
        unified_order_goods_id,
        unified_order_credit_id,

        accounting_state,

        create_time,
        create_user_id,
        update_time,
        update_user_id)
        values
        <foreach collection="list" item="item" index="index" separator=",">
        (
        #{item.accountingOrderId,jdbcType=BIGINT},
        #{item.accountingOrderSn,jdbcType=VARCHAR},

        #{item.unifiedOrderId,jdbcType=BIGINT},
        #{item.unifiedOrderGoodsId,jdbcType=BIGINT},
        #{item.unifiedOrderCreditId,jdbcType=BIGINT},

        #{item.accountingState,jdbcType=TINYINT},

        #{item.createTime,jdbcType=TIMESTAMP},
        #{item.createUserId,jdbcType=BIGINT},
        #{item.updateTime,jdbcType=TIMESTAMP},
        #{item.updateUserId,jdbcType=BIGINT}
        )
        </foreach>
    </insert>


</mapper>
