<?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.yami.shop.discount.comment.dao.DiscountItemMapper">
  <resultMap id="BaseResultMap" type="com.yami.shop.discount.comment.model.DiscountItem">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="discount_item_id" jdbcType="BIGINT" property="discountItemId" />
    <result column="discount_id" jdbcType="BIGINT" property="discountId" />
    <result column="need_amount" jdbcType="DECIMAL" property="needAmount" />
    <result column="discount" jdbcType="DECIMAL" property="discount" />
  </resultMap>

  <insert id="insertDiscountItems">
    insert into tz_discount_item (discount_id,need_amount,discount) values
    <foreach collection="discountItems" item="discountItem" separator=",">
    (#{discountItem.discountId},#{discountItem.needAmount},#{discountItem.discount})
    </foreach>
  </insert>
</mapper>
