<?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.hzs.sale.order.mapper.SaOrderBonusMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hzs.common.domain.sale.order.SaOrderBonus">
        <result column="PK_ORDER" property="pkOrder"/>
        <result column="PK_BONUS_ITEMS" property="pkBonusItems"/>
    </resultMap>

    <!-- 批量插入 -->
    <insert id="insertBatch">
        INSERT ALL
        <foreach collection="list" item="item" separator=" ">
            into SA_ORDER_BONUS (PK_ORDER, PK_BONUS_ITEMS)
            values (#{item.pkOrder}, #{item.pkBonusItems})
        </foreach>
        SELECT 1 FROM dual
    </insert>

</mapper>
