<?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="shop.alien.mapper.LifeDiscountCouponFriendRuleDetailMapper">

    <resultMap id="BaseResultMap" type="shop.alien.entity.store.LifeDiscountCouponFriendRuleDetail">
            <id property="id" column="id" />
            <result property="ruleId" column="rule_id" />
            <result property="couponId" column="coupon_id" />
    </resultMap>

    <sql id="Base_Column_List">
        id,rule_id,coupon_id
    </sql>

    <insert id="insertList" parameterType="java.util.List">
        INSERT INTO life_discount_coupon_friend_rule_detail (rule_id, coupon_id, friend_store_user_id,store_id)
        VALUES
        <foreach collection="list" item="item" separator=",">
            (#{item.ruleId}, #{item.couponId}, #{item.friendStoreUserId}, #{item.storeId})
        </foreach>
    </insert>

</mapper>
