package com.hai.dao;

import com.hai.entity.HighDiscountAgentCode;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * mapper扩展类
 */
public interface HighDiscountAgentCodeMapperExt {

    @Insert({
            "<script>",
            "insert into high_discount_agent_code (discount_agent_id, qr_code, ",
            "create_time, `status`, ",
            "ext_1, ext_2, ext_3)",
            "values " +
            "<foreach collection='list' item='item' index='index' separator=','>",
            "(#{discountAgentId,jdbcType=BIGINT}, ",
            "#{qrCode,jdbcType=VARCHAR}, ",
            "#{createTime,jdbcType=TIMESTAMP},",
            "#{status,jdbcType=INTEGER}, ",
            "#{ext1,jdbcType=VARCHAR},",
            "#{ext2,jdbcType=VARCHAR}, ",
            "#{ext3,jdbcType=VARCHAR})",
            "</foreach>",
            "</script>"
    })
    void insertListCode(@Param(value = "list") List<HighDiscountAgentCode> discountAgentCodeList);

}
