<?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.bailuntec.mapper.DcAverageWarehouseMapper">
  <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcAverageWarehouse">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="INTEGER" property="id" />
    <result column="bailun_sku" jdbcType="VARCHAR" property="bailunSku" />
    <result column="warehouse_code" jdbcType="VARCHAR" property="warehouseCode" />
    <result column="inbound_days" jdbcType="INTEGER" property="inboundDays" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="transfer_type_1_days" jdbcType="DECIMAL" property="transferType1Days" />
    <result column="transfer_type_2_days" jdbcType="DECIMAL" property="transferType2Days" />
    <result column="transfer_bale_delivery" jdbcType="DECIMAL" property="transferBaleDelivery" />
    <result column="abroad_inbound_delivery" jdbcType="DECIMAL" property="abroadInboundDelivery" />
    <result column="transfer_delivery" jdbcType="DECIMAL" property="transferDelivery" />
    <result column="product_count" jdbcType="INTEGER" property="productCount" />
    <result column="order_count" jdbcType="INTEGER" property="orderCount" />
    <result column="product_count_2" jdbcType="INTEGER" property="productCount2" />
    <result column="order_count_2" jdbcType="INTEGER" property="orderCount2" />
    <result column="product_count_3" jdbcType="INTEGER" property="productCount3" />
    <result column="order_count_3" jdbcType="INTEGER" property="orderCount3" />
    <result column="transfer_bale_delivery_ocean" jdbcType="DECIMAL" property="transferBaleDeliveryOcean" />
    <result column="abroad_inbound_delivery_ocean" jdbcType="DECIMAL" property="abroadInboundDeliveryOcean" />
    <result column="transfer_delivery_ocean" jdbcType="DECIMAL" property="transferDeliveryOcean" />
    <result column="transfer_bale_delivery_empty" jdbcType="DECIMAL" property="transferBaleDeliveryEmpty" />
    <result column="abroad_inbound_delivery_empty" jdbcType="DECIMAL" property="abroadInboundDeliveryEmpty" />
    <result column="transfer_delivery_empty" jdbcType="DECIMAL" property="transferDeliveryEmpty" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    ID, bailun_sku, warehouse_code, inbound_days, update_time, transfer_type_1_days, 
    transfer_type_2_days, transfer_bale_delivery, abroad_inbound_delivery, transfer_delivery, 
    product_count, order_count, product_count_2, order_count_2, product_count_3, order_count_3, 
    transfer_bale_delivery_ocean, abroad_inbound_delivery_ocean, transfer_delivery_ocean, 
    transfer_bale_delivery_empty, abroad_inbound_delivery_empty, transfer_delivery_empty
  </sql>
  <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAverageWarehouseExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from dc_average_warehouse
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    <if test="rows != null">
      <if test="offset != null">
        limit ${offset}, ${rows}
      </if>
      <if test="offset == null">
        limit ${rows}
      </if>
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from dc_average_warehouse
    where ID = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_average_warehouse
    where ID = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcAverageWarehouseExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_average_warehouse
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.bailuntec.domain.entity.DcAverageWarehouse">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_average_warehouse (ID, bailun_sku, warehouse_code, 
      inbound_days, update_time, transfer_type_1_days, 
      transfer_type_2_days, transfer_bale_delivery, 
      abroad_inbound_delivery, transfer_delivery, 
      product_count, order_count, product_count_2, 
      order_count_2, product_count_3, order_count_3, 
      transfer_bale_delivery_ocean, abroad_inbound_delivery_ocean, 
      transfer_delivery_ocean, transfer_bale_delivery_empty, 
      abroad_inbound_delivery_empty, transfer_delivery_empty
      )
    values (#{id,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR}, 
      #{inboundDays,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{transferType1Days,jdbcType=DECIMAL}, 
      #{transferType2Days,jdbcType=DECIMAL}, #{transferBaleDelivery,jdbcType=DECIMAL}, 
      #{abroadInboundDelivery,jdbcType=DECIMAL}, #{transferDelivery,jdbcType=DECIMAL}, 
      #{productCount,jdbcType=INTEGER}, #{orderCount,jdbcType=INTEGER}, #{productCount2,jdbcType=INTEGER}, 
      #{orderCount2,jdbcType=INTEGER}, #{productCount3,jdbcType=INTEGER}, #{orderCount3,jdbcType=INTEGER}, 
      #{transferBaleDeliveryOcean,jdbcType=DECIMAL}, #{abroadInboundDeliveryOcean,jdbcType=DECIMAL}, 
      #{transferDeliveryOcean,jdbcType=DECIMAL}, #{transferBaleDeliveryEmpty,jdbcType=DECIMAL}, 
      #{abroadInboundDeliveryEmpty,jdbcType=DECIMAL}, #{transferDeliveryEmpty,jdbcType=DECIMAL}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAverageWarehouse">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_average_warehouse
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="bailunSku != null">
        bailun_sku,
      </if>
      <if test="warehouseCode != null">
        warehouse_code,
      </if>
      <if test="inboundDays != null">
        inbound_days,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="transferType1Days != null">
        transfer_type_1_days,
      </if>
      <if test="transferType2Days != null">
        transfer_type_2_days,
      </if>
      <if test="transferBaleDelivery != null">
        transfer_bale_delivery,
      </if>
      <if test="abroadInboundDelivery != null">
        abroad_inbound_delivery,
      </if>
      <if test="transferDelivery != null">
        transfer_delivery,
      </if>
      <if test="productCount != null">
        product_count,
      </if>
      <if test="orderCount != null">
        order_count,
      </if>
      <if test="productCount2 != null">
        product_count_2,
      </if>
      <if test="orderCount2 != null">
        order_count_2,
      </if>
      <if test="productCount3 != null">
        product_count_3,
      </if>
      <if test="orderCount3 != null">
        order_count_3,
      </if>
      <if test="transferBaleDeliveryOcean != null">
        transfer_bale_delivery_ocean,
      </if>
      <if test="abroadInboundDeliveryOcean != null">
        abroad_inbound_delivery_ocean,
      </if>
      <if test="transferDeliveryOcean != null">
        transfer_delivery_ocean,
      </if>
      <if test="transferBaleDeliveryEmpty != null">
        transfer_bale_delivery_empty,
      </if>
      <if test="abroadInboundDeliveryEmpty != null">
        abroad_inbound_delivery_empty,
      </if>
      <if test="transferDeliveryEmpty != null">
        transfer_delivery_empty,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="bailunSku != null">
        #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="warehouseCode != null">
        #{warehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="inboundDays != null">
        #{inboundDays,jdbcType=INTEGER},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="transferType1Days != null">
        #{transferType1Days,jdbcType=DECIMAL},
      </if>
      <if test="transferType2Days != null">
        #{transferType2Days,jdbcType=DECIMAL},
      </if>
      <if test="transferBaleDelivery != null">
        #{transferBaleDelivery,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDelivery != null">
        #{abroadInboundDelivery,jdbcType=DECIMAL},
      </if>
      <if test="transferDelivery != null">
        #{transferDelivery,jdbcType=DECIMAL},
      </if>
      <if test="productCount != null">
        #{productCount,jdbcType=INTEGER},
      </if>
      <if test="orderCount != null">
        #{orderCount,jdbcType=INTEGER},
      </if>
      <if test="productCount2 != null">
        #{productCount2,jdbcType=INTEGER},
      </if>
      <if test="orderCount2 != null">
        #{orderCount2,jdbcType=INTEGER},
      </if>
      <if test="productCount3 != null">
        #{productCount3,jdbcType=INTEGER},
      </if>
      <if test="orderCount3 != null">
        #{orderCount3,jdbcType=INTEGER},
      </if>
      <if test="transferBaleDeliveryOcean != null">
        #{transferBaleDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDeliveryOcean != null">
        #{abroadInboundDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="transferDeliveryOcean != null">
        #{transferDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="transferBaleDeliveryEmpty != null">
        #{transferBaleDeliveryEmpty,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDeliveryEmpty != null">
        #{abroadInboundDeliveryEmpty,jdbcType=DECIMAL},
      </if>
      <if test="transferDeliveryEmpty != null">
        #{transferDeliveryEmpty,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.bailuntec.domain.example.DcAverageWarehouseExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from dc_average_warehouse
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_average_warehouse
    <set>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.bailunSku != null">
        bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="record.warehouseCode != null">
        warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="record.inboundDays != null">
        inbound_days = #{record.inboundDays,jdbcType=INTEGER},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.transferType1Days != null">
        transfer_type_1_days = #{record.transferType1Days,jdbcType=DECIMAL},
      </if>
      <if test="record.transferType2Days != null">
        transfer_type_2_days = #{record.transferType2Days,jdbcType=DECIMAL},
      </if>
      <if test="record.transferBaleDelivery != null">
        transfer_bale_delivery = #{record.transferBaleDelivery,jdbcType=DECIMAL},
      </if>
      <if test="record.abroadInboundDelivery != null">
        abroad_inbound_delivery = #{record.abroadInboundDelivery,jdbcType=DECIMAL},
      </if>
      <if test="record.transferDelivery != null">
        transfer_delivery = #{record.transferDelivery,jdbcType=DECIMAL},
      </if>
      <if test="record.productCount != null">
        product_count = #{record.productCount,jdbcType=INTEGER},
      </if>
      <if test="record.orderCount != null">
        order_count = #{record.orderCount,jdbcType=INTEGER},
      </if>
      <if test="record.productCount2 != null">
        product_count_2 = #{record.productCount2,jdbcType=INTEGER},
      </if>
      <if test="record.orderCount2 != null">
        order_count_2 = #{record.orderCount2,jdbcType=INTEGER},
      </if>
      <if test="record.productCount3 != null">
        product_count_3 = #{record.productCount3,jdbcType=INTEGER},
      </if>
      <if test="record.orderCount3 != null">
        order_count_3 = #{record.orderCount3,jdbcType=INTEGER},
      </if>
      <if test="record.transferBaleDeliveryOcean != null">
        transfer_bale_delivery_ocean = #{record.transferBaleDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="record.abroadInboundDeliveryOcean != null">
        abroad_inbound_delivery_ocean = #{record.abroadInboundDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="record.transferDeliveryOcean != null">
        transfer_delivery_ocean = #{record.transferDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="record.transferBaleDeliveryEmpty != null">
        transfer_bale_delivery_empty = #{record.transferBaleDeliveryEmpty,jdbcType=DECIMAL},
      </if>
      <if test="record.abroadInboundDeliveryEmpty != null">
        abroad_inbound_delivery_empty = #{record.abroadInboundDeliveryEmpty,jdbcType=DECIMAL},
      </if>
      <if test="record.transferDeliveryEmpty != null">
        transfer_delivery_empty = #{record.transferDeliveryEmpty,jdbcType=DECIMAL},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_average_warehouse
    set ID = #{record.id,jdbcType=INTEGER},
      bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
      warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
      inbound_days = #{record.inboundDays,jdbcType=INTEGER},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      transfer_type_1_days = #{record.transferType1Days,jdbcType=DECIMAL},
      transfer_type_2_days = #{record.transferType2Days,jdbcType=DECIMAL},
      transfer_bale_delivery = #{record.transferBaleDelivery,jdbcType=DECIMAL},
      abroad_inbound_delivery = #{record.abroadInboundDelivery,jdbcType=DECIMAL},
      transfer_delivery = #{record.transferDelivery,jdbcType=DECIMAL},
      product_count = #{record.productCount,jdbcType=INTEGER},
      order_count = #{record.orderCount,jdbcType=INTEGER},
      product_count_2 = #{record.productCount2,jdbcType=INTEGER},
      order_count_2 = #{record.orderCount2,jdbcType=INTEGER},
      product_count_3 = #{record.productCount3,jdbcType=INTEGER},
      order_count_3 = #{record.orderCount3,jdbcType=INTEGER},
      transfer_bale_delivery_ocean = #{record.transferBaleDeliveryOcean,jdbcType=DECIMAL},
      abroad_inbound_delivery_ocean = #{record.abroadInboundDeliveryOcean,jdbcType=DECIMAL},
      transfer_delivery_ocean = #{record.transferDeliveryOcean,jdbcType=DECIMAL},
      transfer_bale_delivery_empty = #{record.transferBaleDeliveryEmpty,jdbcType=DECIMAL},
      abroad_inbound_delivery_empty = #{record.abroadInboundDeliveryEmpty,jdbcType=DECIMAL},
      transfer_delivery_empty = #{record.transferDeliveryEmpty,jdbcType=DECIMAL}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcAverageWarehouse">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_average_warehouse
    <set>
      <if test="bailunSku != null">
        bailun_sku = #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="warehouseCode != null">
        warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="inboundDays != null">
        inbound_days = #{inboundDays,jdbcType=INTEGER},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="transferType1Days != null">
        transfer_type_1_days = #{transferType1Days,jdbcType=DECIMAL},
      </if>
      <if test="transferType2Days != null">
        transfer_type_2_days = #{transferType2Days,jdbcType=DECIMAL},
      </if>
      <if test="transferBaleDelivery != null">
        transfer_bale_delivery = #{transferBaleDelivery,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDelivery != null">
        abroad_inbound_delivery = #{abroadInboundDelivery,jdbcType=DECIMAL},
      </if>
      <if test="transferDelivery != null">
        transfer_delivery = #{transferDelivery,jdbcType=DECIMAL},
      </if>
      <if test="productCount != null">
        product_count = #{productCount,jdbcType=INTEGER},
      </if>
      <if test="orderCount != null">
        order_count = #{orderCount,jdbcType=INTEGER},
      </if>
      <if test="productCount2 != null">
        product_count_2 = #{productCount2,jdbcType=INTEGER},
      </if>
      <if test="orderCount2 != null">
        order_count_2 = #{orderCount2,jdbcType=INTEGER},
      </if>
      <if test="productCount3 != null">
        product_count_3 = #{productCount3,jdbcType=INTEGER},
      </if>
      <if test="orderCount3 != null">
        order_count_3 = #{orderCount3,jdbcType=INTEGER},
      </if>
      <if test="transferBaleDeliveryOcean != null">
        transfer_bale_delivery_ocean = #{transferBaleDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDeliveryOcean != null">
        abroad_inbound_delivery_ocean = #{abroadInboundDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="transferDeliveryOcean != null">
        transfer_delivery_ocean = #{transferDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="transferBaleDeliveryEmpty != null">
        transfer_bale_delivery_empty = #{transferBaleDeliveryEmpty,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDeliveryEmpty != null">
        abroad_inbound_delivery_empty = #{abroadInboundDeliveryEmpty,jdbcType=DECIMAL},
      </if>
      <if test="transferDeliveryEmpty != null">
        transfer_delivery_empty = #{transferDeliveryEmpty,jdbcType=DECIMAL},
      </if>
    </set>
    where ID = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcAverageWarehouse">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_average_warehouse
    set bailun_sku = #{bailunSku,jdbcType=VARCHAR},
      warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
      inbound_days = #{inboundDays,jdbcType=INTEGER},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      transfer_type_1_days = #{transferType1Days,jdbcType=DECIMAL},
      transfer_type_2_days = #{transferType2Days,jdbcType=DECIMAL},
      transfer_bale_delivery = #{transferBaleDelivery,jdbcType=DECIMAL},
      abroad_inbound_delivery = #{abroadInboundDelivery,jdbcType=DECIMAL},
      transfer_delivery = #{transferDelivery,jdbcType=DECIMAL},
      product_count = #{productCount,jdbcType=INTEGER},
      order_count = #{orderCount,jdbcType=INTEGER},
      product_count_2 = #{productCount2,jdbcType=INTEGER},
      order_count_2 = #{orderCount2,jdbcType=INTEGER},
      product_count_3 = #{productCount3,jdbcType=INTEGER},
      order_count_3 = #{orderCount3,jdbcType=INTEGER},
      transfer_bale_delivery_ocean = #{transferBaleDeliveryOcean,jdbcType=DECIMAL},
      abroad_inbound_delivery_ocean = #{abroadInboundDeliveryOcean,jdbcType=DECIMAL},
      transfer_delivery_ocean = #{transferDeliveryOcean,jdbcType=DECIMAL},
      transfer_bale_delivery_empty = #{transferBaleDeliveryEmpty,jdbcType=DECIMAL},
      abroad_inbound_delivery_empty = #{abroadInboundDeliveryEmpty,jdbcType=DECIMAL},
      transfer_delivery_empty = #{transferDeliveryEmpty,jdbcType=DECIMAL}
    where ID = #{id,jdbcType=INTEGER}
  </update>
  <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcAverageWarehouse">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    insert into dc_average_warehouse
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="bailunSku != null">
        bailun_sku,
      </if>
      <if test="warehouseCode != null">
        warehouse_code,
      </if>
      <if test="inboundDays != null">
        inbound_days,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="transferType1Days != null">
        transfer_type_1_days,
      </if>
      <if test="transferType2Days != null">
        transfer_type_2_days,
      </if>
      <if test="transferBaleDelivery != null">
        transfer_bale_delivery,
      </if>
      <if test="abroadInboundDelivery != null">
        abroad_inbound_delivery,
      </if>
      <if test="transferDelivery != null">
        transfer_delivery,
      </if>
      <if test="productCount != null">
        product_count,
      </if>
      <if test="orderCount != null">
        order_count,
      </if>
      <if test="productCount2 != null">
        product_count_2,
      </if>
      <if test="orderCount2 != null">
        order_count_2,
      </if>
      <if test="productCount3 != null">
        product_count_3,
      </if>
      <if test="orderCount3 != null">
        order_count_3,
      </if>
      <if test="transferBaleDeliveryOcean != null">
        transfer_bale_delivery_ocean,
      </if>
      <if test="abroadInboundDeliveryOcean != null">
        abroad_inbound_delivery_ocean,
      </if>
      <if test="transferDeliveryOcean != null">
        transfer_delivery_ocean,
      </if>
      <if test="transferBaleDeliveryEmpty != null">
        transfer_bale_delivery_empty,
      </if>
      <if test="abroadInboundDeliveryEmpty != null">
        abroad_inbound_delivery_empty,
      </if>
      <if test="transferDeliveryEmpty != null">
        transfer_delivery_empty,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="bailunSku != null">
        #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="warehouseCode != null">
        #{warehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="inboundDays != null">
        #{inboundDays,jdbcType=INTEGER},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="transferType1Days != null">
        #{transferType1Days,jdbcType=DECIMAL},
      </if>
      <if test="transferType2Days != null">
        #{transferType2Days,jdbcType=DECIMAL},
      </if>
      <if test="transferBaleDelivery != null">
        #{transferBaleDelivery,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDelivery != null">
        #{abroadInboundDelivery,jdbcType=DECIMAL},
      </if>
      <if test="transferDelivery != null">
        #{transferDelivery,jdbcType=DECIMAL},
      </if>
      <if test="productCount != null">
        #{productCount,jdbcType=INTEGER},
      </if>
      <if test="orderCount != null">
        #{orderCount,jdbcType=INTEGER},
      </if>
      <if test="productCount2 != null">
        #{productCount2,jdbcType=INTEGER},
      </if>
      <if test="orderCount2 != null">
        #{orderCount2,jdbcType=INTEGER},
      </if>
      <if test="productCount3 != null">
        #{productCount3,jdbcType=INTEGER},
      </if>
      <if test="orderCount3 != null">
        #{orderCount3,jdbcType=INTEGER},
      </if>
      <if test="transferBaleDeliveryOcean != null">
        #{transferBaleDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDeliveryOcean != null">
        #{abroadInboundDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="transferDeliveryOcean != null">
        #{transferDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="transferBaleDeliveryEmpty != null">
        #{transferBaleDeliveryEmpty,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDeliveryEmpty != null">
        #{abroadInboundDeliveryEmpty,jdbcType=DECIMAL},
      </if>
      <if test="transferDeliveryEmpty != null">
        #{transferDeliveryEmpty,jdbcType=DECIMAL},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        ID = #{id,jdbcType=INTEGER},
      </if>
      <if test="bailunSku != null">
        bailun_sku = #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="warehouseCode != null">
        warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="inboundDays != null">
        inbound_days = #{inboundDays,jdbcType=INTEGER},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="transferType1Days != null">
        transfer_type_1_days = #{transferType1Days,jdbcType=DECIMAL},
      </if>
      <if test="transferType2Days != null">
        transfer_type_2_days = #{transferType2Days,jdbcType=DECIMAL},
      </if>
      <if test="transferBaleDelivery != null">
        transfer_bale_delivery = #{transferBaleDelivery,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDelivery != null">
        abroad_inbound_delivery = #{abroadInboundDelivery,jdbcType=DECIMAL},
      </if>
      <if test="transferDelivery != null">
        transfer_delivery = #{transferDelivery,jdbcType=DECIMAL},
      </if>
      <if test="productCount != null">
        product_count = #{productCount,jdbcType=INTEGER},
      </if>
      <if test="orderCount != null">
        order_count = #{orderCount,jdbcType=INTEGER},
      </if>
      <if test="productCount2 != null">
        product_count_2 = #{productCount2,jdbcType=INTEGER},
      </if>
      <if test="orderCount2 != null">
        order_count_2 = #{orderCount2,jdbcType=INTEGER},
      </if>
      <if test="productCount3 != null">
        product_count_3 = #{productCount3,jdbcType=INTEGER},
      </if>
      <if test="orderCount3 != null">
        order_count_3 = #{orderCount3,jdbcType=INTEGER},
      </if>
      <if test="transferBaleDeliveryOcean != null">
        transfer_bale_delivery_ocean = #{transferBaleDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDeliveryOcean != null">
        abroad_inbound_delivery_ocean = #{abroadInboundDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="transferDeliveryOcean != null">
        transfer_delivery_ocean = #{transferDeliveryOcean,jdbcType=DECIMAL},
      </if>
      <if test="transferBaleDeliveryEmpty != null">
        transfer_bale_delivery_empty = #{transferBaleDeliveryEmpty,jdbcType=DECIMAL},
      </if>
      <if test="abroadInboundDeliveryEmpty != null">
        abroad_inbound_delivery_empty = #{abroadInboundDeliveryEmpty,jdbcType=DECIMAL},
      </if>
      <if test="transferDeliveryEmpty != null">
        transfer_delivery_empty = #{transferDeliveryEmpty,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAverageWarehouse">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    insert into dc_average_warehouse
    (ID, bailun_sku, warehouse_code, inbound_days, update_time, transfer_type_1_days, 
      transfer_type_2_days, transfer_bale_delivery, abroad_inbound_delivery, transfer_delivery, 
      product_count, order_count, product_count_2, order_count_2, product_count_3, order_count_3, 
      transfer_bale_delivery_ocean, abroad_inbound_delivery_ocean, transfer_delivery_ocean, 
      transfer_bale_delivery_empty, abroad_inbound_delivery_empty, transfer_delivery_empty
      )
    values
    (#{id,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR}, 
      #{inboundDays,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{transferType1Days,jdbcType=DECIMAL}, 
      #{transferType2Days,jdbcType=DECIMAL}, #{transferBaleDelivery,jdbcType=DECIMAL}, 
      #{abroadInboundDelivery,jdbcType=DECIMAL}, #{transferDelivery,jdbcType=DECIMAL}, 
      #{productCount,jdbcType=INTEGER}, #{orderCount,jdbcType=INTEGER}, #{productCount2,jdbcType=INTEGER}, 
      #{orderCount2,jdbcType=INTEGER}, #{productCount3,jdbcType=INTEGER}, #{orderCount3,jdbcType=INTEGER}, 
      #{transferBaleDeliveryOcean,jdbcType=DECIMAL}, #{abroadInboundDeliveryOcean,jdbcType=DECIMAL}, 
      #{transferDeliveryOcean,jdbcType=DECIMAL}, #{transferBaleDeliveryEmpty,jdbcType=DECIMAL}, 
      #{abroadInboundDeliveryEmpty,jdbcType=DECIMAL}, #{transferDeliveryEmpty,jdbcType=DECIMAL}
      )
    on duplicate key update 
    ID = #{id,jdbcType=INTEGER}, 
    bailun_sku = #{bailunSku,jdbcType=VARCHAR}, 
    warehouse_code = #{warehouseCode,jdbcType=VARCHAR}, 
    inbound_days = #{inboundDays,jdbcType=INTEGER}, 
    update_time = #{updateTime,jdbcType=TIMESTAMP}, 
    transfer_type_1_days = #{transferType1Days,jdbcType=DECIMAL}, 
    transfer_type_2_days = #{transferType2Days,jdbcType=DECIMAL}, 
    transfer_bale_delivery = #{transferBaleDelivery,jdbcType=DECIMAL}, 
    abroad_inbound_delivery = #{abroadInboundDelivery,jdbcType=DECIMAL}, 
    transfer_delivery = #{transferDelivery,jdbcType=DECIMAL}, 
    product_count = #{productCount,jdbcType=INTEGER}, 
    order_count = #{orderCount,jdbcType=INTEGER}, 
    product_count_2 = #{productCount2,jdbcType=INTEGER}, 
    order_count_2 = #{orderCount2,jdbcType=INTEGER}, 
    product_count_3 = #{productCount3,jdbcType=INTEGER}, 
    order_count_3 = #{orderCount3,jdbcType=INTEGER}, 
    transfer_bale_delivery_ocean = #{transferBaleDeliveryOcean,jdbcType=DECIMAL}, 
    abroad_inbound_delivery_ocean = #{abroadInboundDeliveryOcean,jdbcType=DECIMAL}, 
    transfer_delivery_ocean = #{transferDeliveryOcean,jdbcType=DECIMAL}, 
    transfer_bale_delivery_empty = #{transferBaleDeliveryEmpty,jdbcType=DECIMAL}, 
    abroad_inbound_delivery_empty = #{abroadInboundDeliveryEmpty,jdbcType=DECIMAL}, 
    transfer_delivery_empty = #{transferDeliveryEmpty,jdbcType=DECIMAL}
  </insert>
  <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAverageWarehouseExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <include refid="Base_Column_List" />
    from dc_average_warehouse
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>

    <select id="selectByUnionKey" resultType="com.bailuntec.domain.entity.DcAverageWarehouse">
        select *
        from dc_average_warehouse
        where bailun_sku = #{bailunSku}
          and warehouse_code = #{warehouseCode}
    </select>
</mapper>