<?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.DcAutoTurnoverMapper">
  <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcAutoTurnover">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="purchase_advice_id" jdbcType="VARCHAR" property="purchaseAdviceId" />
    <result column="bailun_sku" jdbcType="VARCHAR" property="bailunSku" />
    <result column="warehouse_code" jdbcType="VARCHAR" property="warehouseCode" />
    <result column="quantity_init_advise" jdbcType="DECIMAL" property="quantityInitAdvise" />
    <result column="quantity_minimum_order" jdbcType="INTEGER" property="quantityMinimumOrder" />
    <result column="quantity_final_advise" jdbcType="DECIMAL" property="quantityFinalAdvise" />
    <result column="warehouse_name" jdbcType="VARCHAR" property="warehouseName" />
    <result column="quantity_promotion" jdbcType="INTEGER" property="quantityPromotion" />
    <result column="quantity_inventory" jdbcType="INTEGER" property="quantityInventory" />
    <result column="quantity_transfer" jdbcType="INTEGER" property="quantityTransfer" />
    <result column="quantity_purchase" jdbcType="INTEGER" property="quantityPurchase" />
    <result column="turnover_days" jdbcType="INTEGER" property="turnoverDays" />
    <result column="quantity_safe_inventory" jdbcType="DECIMAL" property="quantitySafeInventory" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
    <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
    <result column="status" jdbcType="TINYINT" property="status" />
    <result column="quantity_out_stock" jdbcType="INTEGER" property="quantityOutStock" />
    <result column="sku_title" jdbcType="VARCHAR" property="skuTitle" />
    <result column="promotions" jdbcType="VARCHAR" property="promotions" />
    <result column="supplier_delivery" jdbcType="INTEGER" property="supplierDelivery" />
    <result column="inventory_available_days" jdbcType="INTEGER" property="inventoryAvailableDays" />
    <result column="quantity_inbound" jdbcType="INTEGER" property="quantityInbound" />
    <result column="forecast_oneday_sales" jdbcType="DECIMAL" property="forecastOnedaySales" />
    <result column="forecast_sevenday_sales" jdbcType="DECIMAL" property="forecastSevendaySales" />
    <result column="forecast_fourteenday_sales" jdbcType="DECIMAL" property="forecastFourteendaySales" />
    <result column="inbound_details" jdbcType="VARCHAR" property="inboundDetails" />
    <result column="inventory_details" jdbcType="VARCHAR" property="inventoryDetails" />
    <result column="advised_details" jdbcType="VARCHAR" property="advisedDetails" />
    <result column="sales_upper_limit" jdbcType="DECIMAL" property="salesUpperLimit" />
    <result column="average_overdue" jdbcType="DECIMAL" property="averageOverdue" />
    <result column="average_supplier_delivery" jdbcType="INTEGER" property="averageSupplierDelivery" />
    <result column="transfer_config_delivery" jdbcType="INTEGER" property="transferConfigDelivery" />
    <result column="transfer_bale_config_delivery" jdbcType="INTEGER" property="transferBaleConfigDelivery" />
    <result column="abroad_inbound_config_delivery" jdbcType="INTEGER" property="abroadInboundConfigDelivery" />
    <result column="inspection_config_delivery" jdbcType="INTEGER" property="inspectionConfigDelivery" />
    <result column="inspection_delivery" jdbcType="INTEGER" property="inspectionDelivery" />
    <result column="transfer_delivery" jdbcType="INTEGER" property="transferDelivery" />
    <result column="transfer_delivery_source" jdbcType="VARCHAR" property="transferDeliverySource" />
    <result column="transfer_bale_delivery" jdbcType="INTEGER" property="transferBaleDelivery" />
    <result column="transfer_bale_delivery_source" jdbcType="VARCHAR" property="transferBaleDeliverySource" />
    <result column="abroad_inbound_delivery" jdbcType="INTEGER" property="abroadInboundDelivery" />
    <result column="abroad_inbound_delivery_source" jdbcType="VARCHAR" property="abroadInboundDeliverySource" />
    <result column="supplementary_sales" jdbcType="DECIMAL" property="supplementarySales" />
    <result column="turnover_sales" jdbcType="DECIMAL" property="turnoverSales" />
    <result column="turnover_inbound" jdbcType="DECIMAL" property="turnoverInbound" />
    <result column="history_sevenday_sales" jdbcType="DECIMAL" property="historySevendaySales" />
    <result column="history_fourteenday_sales" jdbcType="DECIMAL" property="historyFourteendaySales" />
    <result column="history_thirtyday_sales" jdbcType="DECIMAL" property="historyThirtydaySales" />
    <result column="sales_explain_details" jdbcType="VARCHAR" property="salesExplainDetails" />
    <result column="forecast_turnoverday_sales" jdbcType="DECIMAL" property="forecastTurnoverdaySales" />
    <result column="stock_up_sales" jdbcType="DECIMAL" property="stockUpSales" />
    <result column="quantity_begin_advise" jdbcType="DECIMAL" property="quantityBeginAdvise" />
    <result column="stock_up_days" jdbcType="INTEGER" property="stockUpDays" />
    <result column="payment_before_delivery" jdbcType="INTEGER" property="paymentBeforeDelivery" />
    <result column="product_code" jdbcType="VARCHAR" property="productCode" />
    <result column="product_inner_code" jdbcType="VARCHAR" property="productInnerCode" />
    <result column="bailun_category_id" jdbcType="INTEGER" property="bailunCategoryId" />
    <result column="buyer_name" jdbcType="VARCHAR" property="buyerName" />
    <result column="suppliers_name" jdbcType="VARCHAR" property="suppliersName" />
    <result column="history_sevenday_sales_ebay" jdbcType="DECIMAL" property="historySevendaySalesEbay" />
    <result column="history_fourteenday_sales_ebay" jdbcType="DECIMAL" property="historyFourteendaySalesEbay" />
    <result column="history_thirtyday_sales_ebay" jdbcType="DECIMAL" property="historyThirtydaySalesEbay" />
    <result column="history_sevenday_sales_aliexpress" jdbcType="DECIMAL" property="historySevendaySalesAliexpress" />
    <result column="history_fourteenday_sales_aliexpress" jdbcType="DECIMAL" property="historyFourteendaySalesAliexpress" />
    <result column="history_thirtyday_sales_aliexpress" jdbcType="DECIMAL" property="historyThirtydaySalesAliexpress" />
    <result column="daily_weighted_sales" jdbcType="DECIMAL" property="dailyWeightedSales" />
    <result column="original_quantity_init_advise" jdbcType="INTEGER" property="originalQuantityInitAdvise" />
    <result column="is_modify_quantity_init_advise" jdbcType="INTEGER" property="isModifyQuantityInitAdvise" />
    <result column="tag_id" jdbcType="INTEGER" property="tagId" />
    <result column="hq_type" jdbcType="VARCHAR" property="hqType" />
    <result column="history_sevenday_sales_amazon" jdbcType="DECIMAL" property="historySevendaySalesAmazon" />
    <result column="history_fourteenday_sales_amazon" jdbcType="DECIMAL" property="historyFourteendaySalesAmazon" />
    <result column="history_thirtyday_sales_amazon" jdbcType="DECIMAL" property="historyThirtydaySalesAmazon" />
    <result column="dc_auto_sales_forecast_config_id" jdbcType="INTEGER" property="dcAutoSalesForecastConfigId" />
    <result column="is_out_stock" jdbcType="INTEGER" property="isOutStock" />
    <result column="dc_auto_sales_forecast_stage_config_id" jdbcType="INTEGER" property="dcAutoSalesForecastStageConfigId" />
    <result column="dc_auto_sales_forecast_title" jdbcType="VARCHAR" property="dcAutoSalesForecastTitle" />
    <result column="head_transport_type" jdbcType="VARCHAR" property="headTransportType" />
    <result column="head_transport_logistics_code" jdbcType="VARCHAR" property="headTransportLogisticsCode" />
    <result column="auto_replace_logistics_task_id" jdbcType="INTEGER" property="autoReplaceLogisticsTaskId" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.bailuntec.domain.entity.DcAutoTurnoverWithBLOBs">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <result column="sales_details" jdbcType="LONGVARCHAR" property="salesDetails" />
    <result column="short_supply_details" jdbcType="LONGVARCHAR" property="shortSupplyDetails" />
    <result column="sales_details_formula" jdbcType="LONGVARCHAR" property="salesDetailsFormula" />
  </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, purchase_advice_id, bailun_sku, warehouse_code, quantity_init_advise, quantity_minimum_order, 
    quantity_final_advise, warehouse_name, quantity_promotion, quantity_inventory, quantity_transfer, 
    quantity_purchase, turnover_days, quantity_safe_inventory, remark, gmt_create, gmt_modified, 
    status, quantity_out_stock, sku_title, promotions, supplier_delivery, inventory_available_days, 
    quantity_inbound, forecast_oneday_sales, forecast_sevenday_sales, forecast_fourteenday_sales, 
    inbound_details, inventory_details, advised_details, sales_upper_limit, average_overdue, 
    average_supplier_delivery, transfer_config_delivery, transfer_bale_config_delivery, 
    abroad_inbound_config_delivery, inspection_config_delivery, inspection_delivery, 
    transfer_delivery, transfer_delivery_source, transfer_bale_delivery, transfer_bale_delivery_source, 
    abroad_inbound_delivery, abroad_inbound_delivery_source, supplementary_sales, turnover_sales, 
    turnover_inbound, history_sevenday_sales, history_fourteenday_sales, history_thirtyday_sales, 
    sales_explain_details, forecast_turnoverday_sales, stock_up_sales, quantity_begin_advise, 
    stock_up_days, payment_before_delivery, product_code, product_inner_code, bailun_category_id, 
    buyer_name, suppliers_name, history_sevenday_sales_ebay, history_fourteenday_sales_ebay, 
    history_thirtyday_sales_ebay, history_sevenday_sales_aliexpress, history_fourteenday_sales_aliexpress, 
    history_thirtyday_sales_aliexpress, daily_weighted_sales, original_quantity_init_advise, 
    is_modify_quantity_init_advise, tag_id, hq_type, history_sevenday_sales_amazon, history_fourteenday_sales_amazon, 
    history_thirtyday_sales_amazon, dc_auto_sales_forecast_config_id, is_out_stock, dc_auto_sales_forecast_stage_config_id, 
    dc_auto_sales_forecast_title, head_transport_type, head_transport_logistics_code, 
    auto_replace_logistics_task_id
  </sql>
  <sql id="Blob_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    sales_details, short_supply_details, sales_details_formula
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" resultMap="ResultMapWithBLOBs">
    <!--
      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" />
    ,
    <include refid="Blob_Column_List" />
    from dc_auto_turnover
    <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="selectByExample" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" 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_auto_turnover
    <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="ResultMapWithBLOBs">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from dc_auto_turnover
    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_auto_turnover
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_auto_turnover
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.bailuntec.domain.entity.DcAutoTurnoverWithBLOBs">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_auto_turnover (id, purchase_advice_id, bailun_sku, 
      warehouse_code, quantity_init_advise, quantity_minimum_order, 
      quantity_final_advise, warehouse_name, quantity_promotion, 
      quantity_inventory, quantity_transfer, quantity_purchase, 
      turnover_days, quantity_safe_inventory, remark, 
      gmt_create, gmt_modified, status, 
      quantity_out_stock, sku_title, promotions, 
      supplier_delivery, inventory_available_days, 
      quantity_inbound, forecast_oneday_sales, forecast_sevenday_sales, 
      forecast_fourteenday_sales, inbound_details, 
      inventory_details, advised_details, sales_upper_limit, 
      average_overdue, average_supplier_delivery, 
      transfer_config_delivery, transfer_bale_config_delivery, 
      abroad_inbound_config_delivery, inspection_config_delivery, 
      inspection_delivery, transfer_delivery, transfer_delivery_source, 
      transfer_bale_delivery, transfer_bale_delivery_source, 
      abroad_inbound_delivery, abroad_inbound_delivery_source, 
      supplementary_sales, turnover_sales, turnover_inbound, 
      history_sevenday_sales, history_fourteenday_sales, 
      history_thirtyday_sales, sales_explain_details, 
      forecast_turnoverday_sales, stock_up_sales, 
      quantity_begin_advise, stock_up_days, payment_before_delivery, 
      product_code, product_inner_code, bailun_category_id, 
      buyer_name, suppliers_name, history_sevenday_sales_ebay, 
      history_fourteenday_sales_ebay, history_thirtyday_sales_ebay, 
      history_sevenday_sales_aliexpress, history_fourteenday_sales_aliexpress, 
      history_thirtyday_sales_aliexpress, daily_weighted_sales, 
      original_quantity_init_advise, is_modify_quantity_init_advise, 
      tag_id, hq_type, history_sevenday_sales_amazon, 
      history_fourteenday_sales_amazon, history_thirtyday_sales_amazon, 
      dc_auto_sales_forecast_config_id, is_out_stock, 
      dc_auto_sales_forecast_stage_config_id, dc_auto_sales_forecast_title, 
      head_transport_type, head_transport_logistics_code, 
      auto_replace_logistics_task_id, sales_details, 
      short_supply_details, sales_details_formula
      )
    values (#{id,jdbcType=INTEGER}, #{purchaseAdviceId,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR}, 
      #{warehouseCode,jdbcType=VARCHAR}, #{quantityInitAdvise,jdbcType=DECIMAL}, #{quantityMinimumOrder,jdbcType=INTEGER}, 
      #{quantityFinalAdvise,jdbcType=DECIMAL}, #{warehouseName,jdbcType=VARCHAR}, #{quantityPromotion,jdbcType=INTEGER}, 
      #{quantityInventory,jdbcType=INTEGER}, #{quantityTransfer,jdbcType=INTEGER}, #{quantityPurchase,jdbcType=INTEGER}, 
      #{turnoverDays,jdbcType=INTEGER}, #{quantitySafeInventory,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, 
      #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT}, 
      #{quantityOutStock,jdbcType=INTEGER}, #{skuTitle,jdbcType=VARCHAR}, #{promotions,jdbcType=VARCHAR}, 
      #{supplierDelivery,jdbcType=INTEGER}, #{inventoryAvailableDays,jdbcType=INTEGER}, 
      #{quantityInbound,jdbcType=INTEGER}, #{forecastOnedaySales,jdbcType=DECIMAL}, #{forecastSevendaySales,jdbcType=DECIMAL}, 
      #{forecastFourteendaySales,jdbcType=DECIMAL}, #{inboundDetails,jdbcType=VARCHAR}, 
      #{inventoryDetails,jdbcType=VARCHAR}, #{advisedDetails,jdbcType=VARCHAR}, #{salesUpperLimit,jdbcType=DECIMAL}, 
      #{averageOverdue,jdbcType=DECIMAL}, #{averageSupplierDelivery,jdbcType=INTEGER}, 
      #{transferConfigDelivery,jdbcType=INTEGER}, #{transferBaleConfigDelivery,jdbcType=INTEGER}, 
      #{abroadInboundConfigDelivery,jdbcType=INTEGER}, #{inspectionConfigDelivery,jdbcType=INTEGER}, 
      #{inspectionDelivery,jdbcType=INTEGER}, #{transferDelivery,jdbcType=INTEGER}, #{transferDeliverySource,jdbcType=VARCHAR}, 
      #{transferBaleDelivery,jdbcType=INTEGER}, #{transferBaleDeliverySource,jdbcType=VARCHAR}, 
      #{abroadInboundDelivery,jdbcType=INTEGER}, #{abroadInboundDeliverySource,jdbcType=VARCHAR}, 
      #{supplementarySales,jdbcType=DECIMAL}, #{turnoverSales,jdbcType=DECIMAL}, #{turnoverInbound,jdbcType=DECIMAL}, 
      #{historySevendaySales,jdbcType=DECIMAL}, #{historyFourteendaySales,jdbcType=DECIMAL}, 
      #{historyThirtydaySales,jdbcType=DECIMAL}, #{salesExplainDetails,jdbcType=VARCHAR}, 
      #{forecastTurnoverdaySales,jdbcType=DECIMAL}, #{stockUpSales,jdbcType=DECIMAL}, 
      #{quantityBeginAdvise,jdbcType=DECIMAL}, #{stockUpDays,jdbcType=INTEGER}, #{paymentBeforeDelivery,jdbcType=INTEGER}, 
      #{productCode,jdbcType=VARCHAR}, #{productInnerCode,jdbcType=VARCHAR}, #{bailunCategoryId,jdbcType=INTEGER}, 
      #{buyerName,jdbcType=VARCHAR}, #{suppliersName,jdbcType=VARCHAR}, #{historySevendaySalesEbay,jdbcType=DECIMAL}, 
      #{historyFourteendaySalesEbay,jdbcType=DECIMAL}, #{historyThirtydaySalesEbay,jdbcType=DECIMAL}, 
      #{historySevendaySalesAliexpress,jdbcType=DECIMAL}, #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL}, 
      #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL}, #{dailyWeightedSales,jdbcType=DECIMAL}, 
      #{originalQuantityInitAdvise,jdbcType=INTEGER}, #{isModifyQuantityInitAdvise,jdbcType=INTEGER}, 
      #{tagId,jdbcType=INTEGER}, #{hqType,jdbcType=VARCHAR}, #{historySevendaySalesAmazon,jdbcType=DECIMAL}, 
      #{historyFourteendaySalesAmazon,jdbcType=DECIMAL}, #{historyThirtydaySalesAmazon,jdbcType=DECIMAL}, 
      #{dcAutoSalesForecastConfigId,jdbcType=INTEGER}, #{isOutStock,jdbcType=INTEGER}, 
      #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER}, #{dcAutoSalesForecastTitle,jdbcType=VARCHAR}, 
      #{headTransportType,jdbcType=VARCHAR}, #{headTransportLogisticsCode,jdbcType=VARCHAR}, 
      #{autoReplaceLogisticsTaskId,jdbcType=INTEGER}, #{salesDetails,jdbcType=LONGVARCHAR}, 
      #{shortSupplyDetails,jdbcType=LONGVARCHAR}, #{salesDetailsFormula,jdbcType=LONGVARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAutoTurnoverWithBLOBs">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_auto_turnover
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="purchaseAdviceId != null">
        purchase_advice_id,
      </if>
      <if test="bailunSku != null">
        bailun_sku,
      </if>
      <if test="warehouseCode != null">
        warehouse_code,
      </if>
      <if test="quantityInitAdvise != null">
        quantity_init_advise,
      </if>
      <if test="quantityMinimumOrder != null">
        quantity_minimum_order,
      </if>
      <if test="quantityFinalAdvise != null">
        quantity_final_advise,
      </if>
      <if test="warehouseName != null">
        warehouse_name,
      </if>
      <if test="quantityPromotion != null">
        quantity_promotion,
      </if>
      <if test="quantityInventory != null">
        quantity_inventory,
      </if>
      <if test="quantityTransfer != null">
        quantity_transfer,
      </if>
      <if test="quantityPurchase != null">
        quantity_purchase,
      </if>
      <if test="turnoverDays != null">
        turnover_days,
      </if>
      <if test="quantitySafeInventory != null">
        quantity_safe_inventory,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="quantityOutStock != null">
        quantity_out_stock,
      </if>
      <if test="skuTitle != null">
        sku_title,
      </if>
      <if test="promotions != null">
        promotions,
      </if>
      <if test="supplierDelivery != null">
        supplier_delivery,
      </if>
      <if test="inventoryAvailableDays != null">
        inventory_available_days,
      </if>
      <if test="quantityInbound != null">
        quantity_inbound,
      </if>
      <if test="forecastOnedaySales != null">
        forecast_oneday_sales,
      </if>
      <if test="forecastSevendaySales != null">
        forecast_sevenday_sales,
      </if>
      <if test="forecastFourteendaySales != null">
        forecast_fourteenday_sales,
      </if>
      <if test="inboundDetails != null">
        inbound_details,
      </if>
      <if test="inventoryDetails != null">
        inventory_details,
      </if>
      <if test="advisedDetails != null">
        advised_details,
      </if>
      <if test="salesUpperLimit != null">
        sales_upper_limit,
      </if>
      <if test="averageOverdue != null">
        average_overdue,
      </if>
      <if test="averageSupplierDelivery != null">
        average_supplier_delivery,
      </if>
      <if test="transferConfigDelivery != null">
        transfer_config_delivery,
      </if>
      <if test="transferBaleConfigDelivery != null">
        transfer_bale_config_delivery,
      </if>
      <if test="abroadInboundConfigDelivery != null">
        abroad_inbound_config_delivery,
      </if>
      <if test="inspectionConfigDelivery != null">
        inspection_config_delivery,
      </if>
      <if test="inspectionDelivery != null">
        inspection_delivery,
      </if>
      <if test="transferDelivery != null">
        transfer_delivery,
      </if>
      <if test="transferDeliverySource != null">
        transfer_delivery_source,
      </if>
      <if test="transferBaleDelivery != null">
        transfer_bale_delivery,
      </if>
      <if test="transferBaleDeliverySource != null">
        transfer_bale_delivery_source,
      </if>
      <if test="abroadInboundDelivery != null">
        abroad_inbound_delivery,
      </if>
      <if test="abroadInboundDeliverySource != null">
        abroad_inbound_delivery_source,
      </if>
      <if test="supplementarySales != null">
        supplementary_sales,
      </if>
      <if test="turnoverSales != null">
        turnover_sales,
      </if>
      <if test="turnoverInbound != null">
        turnover_inbound,
      </if>
      <if test="historySevendaySales != null">
        history_sevenday_sales,
      </if>
      <if test="historyFourteendaySales != null">
        history_fourteenday_sales,
      </if>
      <if test="historyThirtydaySales != null">
        history_thirtyday_sales,
      </if>
      <if test="salesExplainDetails != null">
        sales_explain_details,
      </if>
      <if test="forecastTurnoverdaySales != null">
        forecast_turnoverday_sales,
      </if>
      <if test="stockUpSales != null">
        stock_up_sales,
      </if>
      <if test="quantityBeginAdvise != null">
        quantity_begin_advise,
      </if>
      <if test="stockUpDays != null">
        stock_up_days,
      </if>
      <if test="paymentBeforeDelivery != null">
        payment_before_delivery,
      </if>
      <if test="productCode != null">
        product_code,
      </if>
      <if test="productInnerCode != null">
        product_inner_code,
      </if>
      <if test="bailunCategoryId != null">
        bailun_category_id,
      </if>
      <if test="buyerName != null">
        buyer_name,
      </if>
      <if test="suppliersName != null">
        suppliers_name,
      </if>
      <if test="historySevendaySalesEbay != null">
        history_sevenday_sales_ebay,
      </if>
      <if test="historyFourteendaySalesEbay != null">
        history_fourteenday_sales_ebay,
      </if>
      <if test="historyThirtydaySalesEbay != null">
        history_thirtyday_sales_ebay,
      </if>
      <if test="historySevendaySalesAliexpress != null">
        history_sevenday_sales_aliexpress,
      </if>
      <if test="historyFourteendaySalesAliexpress != null">
        history_fourteenday_sales_aliexpress,
      </if>
      <if test="historyThirtydaySalesAliexpress != null">
        history_thirtyday_sales_aliexpress,
      </if>
      <if test="dailyWeightedSales != null">
        daily_weighted_sales,
      </if>
      <if test="originalQuantityInitAdvise != null">
        original_quantity_init_advise,
      </if>
      <if test="isModifyQuantityInitAdvise != null">
        is_modify_quantity_init_advise,
      </if>
      <if test="tagId != null">
        tag_id,
      </if>
      <if test="hqType != null">
        hq_type,
      </if>
      <if test="historySevendaySalesAmazon != null">
        history_sevenday_sales_amazon,
      </if>
      <if test="historyFourteendaySalesAmazon != null">
        history_fourteenday_sales_amazon,
      </if>
      <if test="historyThirtydaySalesAmazon != null">
        history_thirtyday_sales_amazon,
      </if>
      <if test="dcAutoSalesForecastConfigId != null">
        dc_auto_sales_forecast_config_id,
      </if>
      <if test="isOutStock != null">
        is_out_stock,
      </if>
      <if test="dcAutoSalesForecastStageConfigId != null">
        dc_auto_sales_forecast_stage_config_id,
      </if>
      <if test="dcAutoSalesForecastTitle != null">
        dc_auto_sales_forecast_title,
      </if>
      <if test="headTransportType != null">
        head_transport_type,
      </if>
      <if test="headTransportLogisticsCode != null">
        head_transport_logistics_code,
      </if>
      <if test="autoReplaceLogisticsTaskId != null">
        auto_replace_logistics_task_id,
      </if>
      <if test="salesDetails != null">
        sales_details,
      </if>
      <if test="shortSupplyDetails != null">
        short_supply_details,
      </if>
      <if test="salesDetailsFormula != null">
        sales_details_formula,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="purchaseAdviceId != null">
        #{purchaseAdviceId,jdbcType=VARCHAR},
      </if>
      <if test="bailunSku != null">
        #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="warehouseCode != null">
        #{warehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="quantityInitAdvise != null">
        #{quantityInitAdvise,jdbcType=DECIMAL},
      </if>
      <if test="quantityMinimumOrder != null">
        #{quantityMinimumOrder,jdbcType=INTEGER},
      </if>
      <if test="quantityFinalAdvise != null">
        #{quantityFinalAdvise,jdbcType=DECIMAL},
      </if>
      <if test="warehouseName != null">
        #{warehouseName,jdbcType=VARCHAR},
      </if>
      <if test="quantityPromotion != null">
        #{quantityPromotion,jdbcType=INTEGER},
      </if>
      <if test="quantityInventory != null">
        #{quantityInventory,jdbcType=INTEGER},
      </if>
      <if test="quantityTransfer != null">
        #{quantityTransfer,jdbcType=INTEGER},
      </if>
      <if test="quantityPurchase != null">
        #{quantityPurchase,jdbcType=INTEGER},
      </if>
      <if test="turnoverDays != null">
        #{turnoverDays,jdbcType=INTEGER},
      </if>
      <if test="quantitySafeInventory != null">
        #{quantitySafeInventory,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        #{status,jdbcType=TINYINT},
      </if>
      <if test="quantityOutStock != null">
        #{quantityOutStock,jdbcType=INTEGER},
      </if>
      <if test="skuTitle != null">
        #{skuTitle,jdbcType=VARCHAR},
      </if>
      <if test="promotions != null">
        #{promotions,jdbcType=VARCHAR},
      </if>
      <if test="supplierDelivery != null">
        #{supplierDelivery,jdbcType=INTEGER},
      </if>
      <if test="inventoryAvailableDays != null">
        #{inventoryAvailableDays,jdbcType=INTEGER},
      </if>
      <if test="quantityInbound != null">
        #{quantityInbound,jdbcType=INTEGER},
      </if>
      <if test="forecastOnedaySales != null">
        #{forecastOnedaySales,jdbcType=DECIMAL},
      </if>
      <if test="forecastSevendaySales != null">
        #{forecastSevendaySales,jdbcType=DECIMAL},
      </if>
      <if test="forecastFourteendaySales != null">
        #{forecastFourteendaySales,jdbcType=DECIMAL},
      </if>
      <if test="inboundDetails != null">
        #{inboundDetails,jdbcType=VARCHAR},
      </if>
      <if test="inventoryDetails != null">
        #{inventoryDetails,jdbcType=VARCHAR},
      </if>
      <if test="advisedDetails != null">
        #{advisedDetails,jdbcType=VARCHAR},
      </if>
      <if test="salesUpperLimit != null">
        #{salesUpperLimit,jdbcType=DECIMAL},
      </if>
      <if test="averageOverdue != null">
        #{averageOverdue,jdbcType=DECIMAL},
      </if>
      <if test="averageSupplierDelivery != null">
        #{averageSupplierDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferConfigDelivery != null">
        #{transferConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferBaleConfigDelivery != null">
        #{transferBaleConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="abroadInboundConfigDelivery != null">
        #{abroadInboundConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="inspectionConfigDelivery != null">
        #{inspectionConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="inspectionDelivery != null">
        #{inspectionDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferDelivery != null">
        #{transferDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferDeliverySource != null">
        #{transferDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="transferBaleDelivery != null">
        #{transferBaleDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferBaleDeliverySource != null">
        #{transferBaleDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="abroadInboundDelivery != null">
        #{abroadInboundDelivery,jdbcType=INTEGER},
      </if>
      <if test="abroadInboundDeliverySource != null">
        #{abroadInboundDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="supplementarySales != null">
        #{supplementarySales,jdbcType=DECIMAL},
      </if>
      <if test="turnoverSales != null">
        #{turnoverSales,jdbcType=DECIMAL},
      </if>
      <if test="turnoverInbound != null">
        #{turnoverInbound,jdbcType=DECIMAL},
      </if>
      <if test="historySevendaySales != null">
        #{historySevendaySales,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySales != null">
        #{historyFourteendaySales,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySales != null">
        #{historyThirtydaySales,jdbcType=DECIMAL},
      </if>
      <if test="salesExplainDetails != null">
        #{salesExplainDetails,jdbcType=VARCHAR},
      </if>
      <if test="forecastTurnoverdaySales != null">
        #{forecastTurnoverdaySales,jdbcType=DECIMAL},
      </if>
      <if test="stockUpSales != null">
        #{stockUpSales,jdbcType=DECIMAL},
      </if>
      <if test="quantityBeginAdvise != null">
        #{quantityBeginAdvise,jdbcType=DECIMAL},
      </if>
      <if test="stockUpDays != null">
        #{stockUpDays,jdbcType=INTEGER},
      </if>
      <if test="paymentBeforeDelivery != null">
        #{paymentBeforeDelivery,jdbcType=INTEGER},
      </if>
      <if test="productCode != null">
        #{productCode,jdbcType=VARCHAR},
      </if>
      <if test="productInnerCode != null">
        #{productInnerCode,jdbcType=VARCHAR},
      </if>
      <if test="bailunCategoryId != null">
        #{bailunCategoryId,jdbcType=INTEGER},
      </if>
      <if test="buyerName != null">
        #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="suppliersName != null">
        #{suppliersName,jdbcType=VARCHAR},
      </if>
      <if test="historySevendaySalesEbay != null">
        #{historySevendaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesEbay != null">
        #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesEbay != null">
        #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historySevendaySalesAliexpress != null">
        #{historySevendaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesAliexpress != null">
        #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesAliexpress != null">
        #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="dailyWeightedSales != null">
        #{dailyWeightedSales,jdbcType=DECIMAL},
      </if>
      <if test="originalQuantityInitAdvise != null">
        #{originalQuantityInitAdvise,jdbcType=INTEGER},
      </if>
      <if test="isModifyQuantityInitAdvise != null">
        #{isModifyQuantityInitAdvise,jdbcType=INTEGER},
      </if>
      <if test="tagId != null">
        #{tagId,jdbcType=INTEGER},
      </if>
      <if test="hqType != null">
        #{hqType,jdbcType=VARCHAR},
      </if>
      <if test="historySevendaySalesAmazon != null">
        #{historySevendaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesAmazon != null">
        #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesAmazon != null">
        #{historyThirtydaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="dcAutoSalesForecastConfigId != null">
        #{dcAutoSalesForecastConfigId,jdbcType=INTEGER},
      </if>
      <if test="isOutStock != null">
        #{isOutStock,jdbcType=INTEGER},
      </if>
      <if test="dcAutoSalesForecastStageConfigId != null">
        #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER},
      </if>
      <if test="dcAutoSalesForecastTitle != null">
        #{dcAutoSalesForecastTitle,jdbcType=VARCHAR},
      </if>
      <if test="headTransportType != null">
        #{headTransportType,jdbcType=VARCHAR},
      </if>
      <if test="headTransportLogisticsCode != null">
        #{headTransportLogisticsCode,jdbcType=VARCHAR},
      </if>
      <if test="autoReplaceLogisticsTaskId != null">
        #{autoReplaceLogisticsTaskId,jdbcType=INTEGER},
      </if>
      <if test="salesDetails != null">
        #{salesDetails,jdbcType=LONGVARCHAR},
      </if>
      <if test="shortSupplyDetails != null">
        #{shortSupplyDetails,jdbcType=LONGVARCHAR},
      </if>
      <if test="salesDetailsFormula != null">
        #{salesDetailsFormula,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from dc_auto_turnover
    <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_auto_turnover
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.purchaseAdviceId != null">
        purchase_advice_id = #{record.purchaseAdviceId,jdbcType=VARCHAR},
      </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.quantityInitAdvise != null">
        quantity_init_advise = #{record.quantityInitAdvise,jdbcType=DECIMAL},
      </if>
      <if test="record.quantityMinimumOrder != null">
        quantity_minimum_order = #{record.quantityMinimumOrder,jdbcType=INTEGER},
      </if>
      <if test="record.quantityFinalAdvise != null">
        quantity_final_advise = #{record.quantityFinalAdvise,jdbcType=DECIMAL},
      </if>
      <if test="record.warehouseName != null">
        warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
      </if>
      <if test="record.quantityPromotion != null">
        quantity_promotion = #{record.quantityPromotion,jdbcType=INTEGER},
      </if>
      <if test="record.quantityInventory != null">
        quantity_inventory = #{record.quantityInventory,jdbcType=INTEGER},
      </if>
      <if test="record.quantityTransfer != null">
        quantity_transfer = #{record.quantityTransfer,jdbcType=INTEGER},
      </if>
      <if test="record.quantityPurchase != null">
        quantity_purchase = #{record.quantityPurchase,jdbcType=INTEGER},
      </if>
      <if test="record.turnoverDays != null">
        turnover_days = #{record.turnoverDays,jdbcType=INTEGER},
      </if>
      <if test="record.quantitySafeInventory != null">
        quantity_safe_inventory = #{record.quantitySafeInventory,jdbcType=DECIMAL},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.gmtCreate != null">
        gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.gmtModified != null">
        gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="record.status != null">
        status = #{record.status,jdbcType=TINYINT},
      </if>
      <if test="record.quantityOutStock != null">
        quantity_out_stock = #{record.quantityOutStock,jdbcType=INTEGER},
      </if>
      <if test="record.skuTitle != null">
        sku_title = #{record.skuTitle,jdbcType=VARCHAR},
      </if>
      <if test="record.promotions != null">
        promotions = #{record.promotions,jdbcType=VARCHAR},
      </if>
      <if test="record.supplierDelivery != null">
        supplier_delivery = #{record.supplierDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.inventoryAvailableDays != null">
        inventory_available_days = #{record.inventoryAvailableDays,jdbcType=INTEGER},
      </if>
      <if test="record.quantityInbound != null">
        quantity_inbound = #{record.quantityInbound,jdbcType=INTEGER},
      </if>
      <if test="record.forecastOnedaySales != null">
        forecast_oneday_sales = #{record.forecastOnedaySales,jdbcType=DECIMAL},
      </if>
      <if test="record.forecastSevendaySales != null">
        forecast_sevenday_sales = #{record.forecastSevendaySales,jdbcType=DECIMAL},
      </if>
      <if test="record.forecastFourteendaySales != null">
        forecast_fourteenday_sales = #{record.forecastFourteendaySales,jdbcType=DECIMAL},
      </if>
      <if test="record.inboundDetails != null">
        inbound_details = #{record.inboundDetails,jdbcType=VARCHAR},
      </if>
      <if test="record.inventoryDetails != null">
        inventory_details = #{record.inventoryDetails,jdbcType=VARCHAR},
      </if>
      <if test="record.advisedDetails != null">
        advised_details = #{record.advisedDetails,jdbcType=VARCHAR},
      </if>
      <if test="record.salesUpperLimit != null">
        sales_upper_limit = #{record.salesUpperLimit,jdbcType=DECIMAL},
      </if>
      <if test="record.averageOverdue != null">
        average_overdue = #{record.averageOverdue,jdbcType=DECIMAL},
      </if>
      <if test="record.averageSupplierDelivery != null">
        average_supplier_delivery = #{record.averageSupplierDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.transferConfigDelivery != null">
        transfer_config_delivery = #{record.transferConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.transferBaleConfigDelivery != null">
        transfer_bale_config_delivery = #{record.transferBaleConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.abroadInboundConfigDelivery != null">
        abroad_inbound_config_delivery = #{record.abroadInboundConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.inspectionConfigDelivery != null">
        inspection_config_delivery = #{record.inspectionConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.inspectionDelivery != null">
        inspection_delivery = #{record.inspectionDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.transferDelivery != null">
        transfer_delivery = #{record.transferDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.transferDeliverySource != null">
        transfer_delivery_source = #{record.transferDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="record.transferBaleDelivery != null">
        transfer_bale_delivery = #{record.transferBaleDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.transferBaleDeliverySource != null">
        transfer_bale_delivery_source = #{record.transferBaleDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="record.abroadInboundDelivery != null">
        abroad_inbound_delivery = #{record.abroadInboundDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.abroadInboundDeliverySource != null">
        abroad_inbound_delivery_source = #{record.abroadInboundDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="record.supplementarySales != null">
        supplementary_sales = #{record.supplementarySales,jdbcType=DECIMAL},
      </if>
      <if test="record.turnoverSales != null">
        turnover_sales = #{record.turnoverSales,jdbcType=DECIMAL},
      </if>
      <if test="record.turnoverInbound != null">
        turnover_inbound = #{record.turnoverInbound,jdbcType=DECIMAL},
      </if>
      <if test="record.historySevendaySales != null">
        history_sevenday_sales = #{record.historySevendaySales,jdbcType=DECIMAL},
      </if>
      <if test="record.historyFourteendaySales != null">
        history_fourteenday_sales = #{record.historyFourteendaySales,jdbcType=DECIMAL},
      </if>
      <if test="record.historyThirtydaySales != null">
        history_thirtyday_sales = #{record.historyThirtydaySales,jdbcType=DECIMAL},
      </if>
      <if test="record.salesExplainDetails != null">
        sales_explain_details = #{record.salesExplainDetails,jdbcType=VARCHAR},
      </if>
      <if test="record.forecastTurnoverdaySales != null">
        forecast_turnoverday_sales = #{record.forecastTurnoverdaySales,jdbcType=DECIMAL},
      </if>
      <if test="record.stockUpSales != null">
        stock_up_sales = #{record.stockUpSales,jdbcType=DECIMAL},
      </if>
      <if test="record.quantityBeginAdvise != null">
        quantity_begin_advise = #{record.quantityBeginAdvise,jdbcType=DECIMAL},
      </if>
      <if test="record.stockUpDays != null">
        stock_up_days = #{record.stockUpDays,jdbcType=INTEGER},
      </if>
      <if test="record.paymentBeforeDelivery != null">
        payment_before_delivery = #{record.paymentBeforeDelivery,jdbcType=INTEGER},
      </if>
      <if test="record.productCode != null">
        product_code = #{record.productCode,jdbcType=VARCHAR},
      </if>
      <if test="record.productInnerCode != null">
        product_inner_code = #{record.productInnerCode,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunCategoryId != null">
        bailun_category_id = #{record.bailunCategoryId,jdbcType=INTEGER},
      </if>
      <if test="record.buyerName != null">
        buyer_name = #{record.buyerName,jdbcType=VARCHAR},
      </if>
      <if test="record.suppliersName != null">
        suppliers_name = #{record.suppliersName,jdbcType=VARCHAR},
      </if>
      <if test="record.historySevendaySalesEbay != null">
        history_sevenday_sales_ebay = #{record.historySevendaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="record.historyFourteendaySalesEbay != null">
        history_fourteenday_sales_ebay = #{record.historyFourteendaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="record.historyThirtydaySalesEbay != null">
        history_thirtyday_sales_ebay = #{record.historyThirtydaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="record.historySevendaySalesAliexpress != null">
        history_sevenday_sales_aliexpress = #{record.historySevendaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="record.historyFourteendaySalesAliexpress != null">
        history_fourteenday_sales_aliexpress = #{record.historyFourteendaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="record.historyThirtydaySalesAliexpress != null">
        history_thirtyday_sales_aliexpress = #{record.historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="record.dailyWeightedSales != null">
        daily_weighted_sales = #{record.dailyWeightedSales,jdbcType=DECIMAL},
      </if>
      <if test="record.originalQuantityInitAdvise != null">
        original_quantity_init_advise = #{record.originalQuantityInitAdvise,jdbcType=INTEGER},
      </if>
      <if test="record.isModifyQuantityInitAdvise != null">
        is_modify_quantity_init_advise = #{record.isModifyQuantityInitAdvise,jdbcType=INTEGER},
      </if>
      <if test="record.tagId != null">
        tag_id = #{record.tagId,jdbcType=INTEGER},
      </if>
      <if test="record.hqType != null">
        hq_type = #{record.hqType,jdbcType=VARCHAR},
      </if>
      <if test="record.historySevendaySalesAmazon != null">
        history_sevenday_sales_amazon = #{record.historySevendaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="record.historyFourteendaySalesAmazon != null">
        history_fourteenday_sales_amazon = #{record.historyFourteendaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="record.historyThirtydaySalesAmazon != null">
        history_thirtyday_sales_amazon = #{record.historyThirtydaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="record.dcAutoSalesForecastConfigId != null">
        dc_auto_sales_forecast_config_id = #{record.dcAutoSalesForecastConfigId,jdbcType=INTEGER},
      </if>
      <if test="record.isOutStock != null">
        is_out_stock = #{record.isOutStock,jdbcType=INTEGER},
      </if>
      <if test="record.dcAutoSalesForecastStageConfigId != null">
        dc_auto_sales_forecast_stage_config_id = #{record.dcAutoSalesForecastStageConfigId,jdbcType=INTEGER},
      </if>
      <if test="record.dcAutoSalesForecastTitle != null">
        dc_auto_sales_forecast_title = #{record.dcAutoSalesForecastTitle,jdbcType=VARCHAR},
      </if>
      <if test="record.headTransportType != null">
        head_transport_type = #{record.headTransportType,jdbcType=VARCHAR},
      </if>
      <if test="record.headTransportLogisticsCode != null">
        head_transport_logistics_code = #{record.headTransportLogisticsCode,jdbcType=VARCHAR},
      </if>
      <if test="record.autoReplaceLogisticsTaskId != null">
        auto_replace_logistics_task_id = #{record.autoReplaceLogisticsTaskId,jdbcType=INTEGER},
      </if>
      <if test="record.salesDetails != null">
        sales_details = #{record.salesDetails,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.shortSupplyDetails != null">
        short_supply_details = #{record.shortSupplyDetails,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.salesDetailsFormula != null">
        sales_details_formula = #{record.salesDetailsFormula,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_auto_turnover
    set id = #{record.id,jdbcType=INTEGER},
      purchase_advice_id = #{record.purchaseAdviceId,jdbcType=VARCHAR},
      bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
      warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
      quantity_init_advise = #{record.quantityInitAdvise,jdbcType=DECIMAL},
      quantity_minimum_order = #{record.quantityMinimumOrder,jdbcType=INTEGER},
      quantity_final_advise = #{record.quantityFinalAdvise,jdbcType=DECIMAL},
      warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
      quantity_promotion = #{record.quantityPromotion,jdbcType=INTEGER},
      quantity_inventory = #{record.quantityInventory,jdbcType=INTEGER},
      quantity_transfer = #{record.quantityTransfer,jdbcType=INTEGER},
      quantity_purchase = #{record.quantityPurchase,jdbcType=INTEGER},
      turnover_days = #{record.turnoverDays,jdbcType=INTEGER},
      quantity_safe_inventory = #{record.quantitySafeInventory,jdbcType=DECIMAL},
      remark = #{record.remark,jdbcType=VARCHAR},
      gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
      status = #{record.status,jdbcType=TINYINT},
      quantity_out_stock = #{record.quantityOutStock,jdbcType=INTEGER},
      sku_title = #{record.skuTitle,jdbcType=VARCHAR},
      promotions = #{record.promotions,jdbcType=VARCHAR},
      supplier_delivery = #{record.supplierDelivery,jdbcType=INTEGER},
      inventory_available_days = #{record.inventoryAvailableDays,jdbcType=INTEGER},
      quantity_inbound = #{record.quantityInbound,jdbcType=INTEGER},
      forecast_oneday_sales = #{record.forecastOnedaySales,jdbcType=DECIMAL},
      forecast_sevenday_sales = #{record.forecastSevendaySales,jdbcType=DECIMAL},
      forecast_fourteenday_sales = #{record.forecastFourteendaySales,jdbcType=DECIMAL},
      inbound_details = #{record.inboundDetails,jdbcType=VARCHAR},
      inventory_details = #{record.inventoryDetails,jdbcType=VARCHAR},
      advised_details = #{record.advisedDetails,jdbcType=VARCHAR},
      sales_upper_limit = #{record.salesUpperLimit,jdbcType=DECIMAL},
      average_overdue = #{record.averageOverdue,jdbcType=DECIMAL},
      average_supplier_delivery = #{record.averageSupplierDelivery,jdbcType=INTEGER},
      transfer_config_delivery = #{record.transferConfigDelivery,jdbcType=INTEGER},
      transfer_bale_config_delivery = #{record.transferBaleConfigDelivery,jdbcType=INTEGER},
      abroad_inbound_config_delivery = #{record.abroadInboundConfigDelivery,jdbcType=INTEGER},
      inspection_config_delivery = #{record.inspectionConfigDelivery,jdbcType=INTEGER},
      inspection_delivery = #{record.inspectionDelivery,jdbcType=INTEGER},
      transfer_delivery = #{record.transferDelivery,jdbcType=INTEGER},
      transfer_delivery_source = #{record.transferDeliverySource,jdbcType=VARCHAR},
      transfer_bale_delivery = #{record.transferBaleDelivery,jdbcType=INTEGER},
      transfer_bale_delivery_source = #{record.transferBaleDeliverySource,jdbcType=VARCHAR},
      abroad_inbound_delivery = #{record.abroadInboundDelivery,jdbcType=INTEGER},
      abroad_inbound_delivery_source = #{record.abroadInboundDeliverySource,jdbcType=VARCHAR},
      supplementary_sales = #{record.supplementarySales,jdbcType=DECIMAL},
      turnover_sales = #{record.turnoverSales,jdbcType=DECIMAL},
      turnover_inbound = #{record.turnoverInbound,jdbcType=DECIMAL},
      history_sevenday_sales = #{record.historySevendaySales,jdbcType=DECIMAL},
      history_fourteenday_sales = #{record.historyFourteendaySales,jdbcType=DECIMAL},
      history_thirtyday_sales = #{record.historyThirtydaySales,jdbcType=DECIMAL},
      sales_explain_details = #{record.salesExplainDetails,jdbcType=VARCHAR},
      forecast_turnoverday_sales = #{record.forecastTurnoverdaySales,jdbcType=DECIMAL},
      stock_up_sales = #{record.stockUpSales,jdbcType=DECIMAL},
      quantity_begin_advise = #{record.quantityBeginAdvise,jdbcType=DECIMAL},
      stock_up_days = #{record.stockUpDays,jdbcType=INTEGER},
      payment_before_delivery = #{record.paymentBeforeDelivery,jdbcType=INTEGER},
      product_code = #{record.productCode,jdbcType=VARCHAR},
      product_inner_code = #{record.productInnerCode,jdbcType=VARCHAR},
      bailun_category_id = #{record.bailunCategoryId,jdbcType=INTEGER},
      buyer_name = #{record.buyerName,jdbcType=VARCHAR},
      suppliers_name = #{record.suppliersName,jdbcType=VARCHAR},
      history_sevenday_sales_ebay = #{record.historySevendaySalesEbay,jdbcType=DECIMAL},
      history_fourteenday_sales_ebay = #{record.historyFourteendaySalesEbay,jdbcType=DECIMAL},
      history_thirtyday_sales_ebay = #{record.historyThirtydaySalesEbay,jdbcType=DECIMAL},
      history_sevenday_sales_aliexpress = #{record.historySevendaySalesAliexpress,jdbcType=DECIMAL},
      history_fourteenday_sales_aliexpress = #{record.historyFourteendaySalesAliexpress,jdbcType=DECIMAL},
      history_thirtyday_sales_aliexpress = #{record.historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
      daily_weighted_sales = #{record.dailyWeightedSales,jdbcType=DECIMAL},
      original_quantity_init_advise = #{record.originalQuantityInitAdvise,jdbcType=INTEGER},
      is_modify_quantity_init_advise = #{record.isModifyQuantityInitAdvise,jdbcType=INTEGER},
      tag_id = #{record.tagId,jdbcType=INTEGER},
      hq_type = #{record.hqType,jdbcType=VARCHAR},
      history_sevenday_sales_amazon = #{record.historySevendaySalesAmazon,jdbcType=DECIMAL},
      history_fourteenday_sales_amazon = #{record.historyFourteendaySalesAmazon,jdbcType=DECIMAL},
      history_thirtyday_sales_amazon = #{record.historyThirtydaySalesAmazon,jdbcType=DECIMAL},
      dc_auto_sales_forecast_config_id = #{record.dcAutoSalesForecastConfigId,jdbcType=INTEGER},
      is_out_stock = #{record.isOutStock,jdbcType=INTEGER},
      dc_auto_sales_forecast_stage_config_id = #{record.dcAutoSalesForecastStageConfigId,jdbcType=INTEGER},
      dc_auto_sales_forecast_title = #{record.dcAutoSalesForecastTitle,jdbcType=VARCHAR},
      head_transport_type = #{record.headTransportType,jdbcType=VARCHAR},
      head_transport_logistics_code = #{record.headTransportLogisticsCode,jdbcType=VARCHAR},
      auto_replace_logistics_task_id = #{record.autoReplaceLogisticsTaskId,jdbcType=INTEGER},
      sales_details = #{record.salesDetails,jdbcType=LONGVARCHAR},
      short_supply_details = #{record.shortSupplyDetails,jdbcType=LONGVARCHAR},
      sales_details_formula = #{record.salesDetailsFormula,jdbcType=LONGVARCHAR}
    <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_auto_turnover
    set id = #{record.id,jdbcType=INTEGER},
      purchase_advice_id = #{record.purchaseAdviceId,jdbcType=VARCHAR},
      bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
      warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
      quantity_init_advise = #{record.quantityInitAdvise,jdbcType=DECIMAL},
      quantity_minimum_order = #{record.quantityMinimumOrder,jdbcType=INTEGER},
      quantity_final_advise = #{record.quantityFinalAdvise,jdbcType=DECIMAL},
      warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
      quantity_promotion = #{record.quantityPromotion,jdbcType=INTEGER},
      quantity_inventory = #{record.quantityInventory,jdbcType=INTEGER},
      quantity_transfer = #{record.quantityTransfer,jdbcType=INTEGER},
      quantity_purchase = #{record.quantityPurchase,jdbcType=INTEGER},
      turnover_days = #{record.turnoverDays,jdbcType=INTEGER},
      quantity_safe_inventory = #{record.quantitySafeInventory,jdbcType=DECIMAL},
      remark = #{record.remark,jdbcType=VARCHAR},
      gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
      status = #{record.status,jdbcType=TINYINT},
      quantity_out_stock = #{record.quantityOutStock,jdbcType=INTEGER},
      sku_title = #{record.skuTitle,jdbcType=VARCHAR},
      promotions = #{record.promotions,jdbcType=VARCHAR},
      supplier_delivery = #{record.supplierDelivery,jdbcType=INTEGER},
      inventory_available_days = #{record.inventoryAvailableDays,jdbcType=INTEGER},
      quantity_inbound = #{record.quantityInbound,jdbcType=INTEGER},
      forecast_oneday_sales = #{record.forecastOnedaySales,jdbcType=DECIMAL},
      forecast_sevenday_sales = #{record.forecastSevendaySales,jdbcType=DECIMAL},
      forecast_fourteenday_sales = #{record.forecastFourteendaySales,jdbcType=DECIMAL},
      inbound_details = #{record.inboundDetails,jdbcType=VARCHAR},
      inventory_details = #{record.inventoryDetails,jdbcType=VARCHAR},
      advised_details = #{record.advisedDetails,jdbcType=VARCHAR},
      sales_upper_limit = #{record.salesUpperLimit,jdbcType=DECIMAL},
      average_overdue = #{record.averageOverdue,jdbcType=DECIMAL},
      average_supplier_delivery = #{record.averageSupplierDelivery,jdbcType=INTEGER},
      transfer_config_delivery = #{record.transferConfigDelivery,jdbcType=INTEGER},
      transfer_bale_config_delivery = #{record.transferBaleConfigDelivery,jdbcType=INTEGER},
      abroad_inbound_config_delivery = #{record.abroadInboundConfigDelivery,jdbcType=INTEGER},
      inspection_config_delivery = #{record.inspectionConfigDelivery,jdbcType=INTEGER},
      inspection_delivery = #{record.inspectionDelivery,jdbcType=INTEGER},
      transfer_delivery = #{record.transferDelivery,jdbcType=INTEGER},
      transfer_delivery_source = #{record.transferDeliverySource,jdbcType=VARCHAR},
      transfer_bale_delivery = #{record.transferBaleDelivery,jdbcType=INTEGER},
      transfer_bale_delivery_source = #{record.transferBaleDeliverySource,jdbcType=VARCHAR},
      abroad_inbound_delivery = #{record.abroadInboundDelivery,jdbcType=INTEGER},
      abroad_inbound_delivery_source = #{record.abroadInboundDeliverySource,jdbcType=VARCHAR},
      supplementary_sales = #{record.supplementarySales,jdbcType=DECIMAL},
      turnover_sales = #{record.turnoverSales,jdbcType=DECIMAL},
      turnover_inbound = #{record.turnoverInbound,jdbcType=DECIMAL},
      history_sevenday_sales = #{record.historySevendaySales,jdbcType=DECIMAL},
      history_fourteenday_sales = #{record.historyFourteendaySales,jdbcType=DECIMAL},
      history_thirtyday_sales = #{record.historyThirtydaySales,jdbcType=DECIMAL},
      sales_explain_details = #{record.salesExplainDetails,jdbcType=VARCHAR},
      forecast_turnoverday_sales = #{record.forecastTurnoverdaySales,jdbcType=DECIMAL},
      stock_up_sales = #{record.stockUpSales,jdbcType=DECIMAL},
      quantity_begin_advise = #{record.quantityBeginAdvise,jdbcType=DECIMAL},
      stock_up_days = #{record.stockUpDays,jdbcType=INTEGER},
      payment_before_delivery = #{record.paymentBeforeDelivery,jdbcType=INTEGER},
      product_code = #{record.productCode,jdbcType=VARCHAR},
      product_inner_code = #{record.productInnerCode,jdbcType=VARCHAR},
      bailun_category_id = #{record.bailunCategoryId,jdbcType=INTEGER},
      buyer_name = #{record.buyerName,jdbcType=VARCHAR},
      suppliers_name = #{record.suppliersName,jdbcType=VARCHAR},
      history_sevenday_sales_ebay = #{record.historySevendaySalesEbay,jdbcType=DECIMAL},
      history_fourteenday_sales_ebay = #{record.historyFourteendaySalesEbay,jdbcType=DECIMAL},
      history_thirtyday_sales_ebay = #{record.historyThirtydaySalesEbay,jdbcType=DECIMAL},
      history_sevenday_sales_aliexpress = #{record.historySevendaySalesAliexpress,jdbcType=DECIMAL},
      history_fourteenday_sales_aliexpress = #{record.historyFourteendaySalesAliexpress,jdbcType=DECIMAL},
      history_thirtyday_sales_aliexpress = #{record.historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
      daily_weighted_sales = #{record.dailyWeightedSales,jdbcType=DECIMAL},
      original_quantity_init_advise = #{record.originalQuantityInitAdvise,jdbcType=INTEGER},
      is_modify_quantity_init_advise = #{record.isModifyQuantityInitAdvise,jdbcType=INTEGER},
      tag_id = #{record.tagId,jdbcType=INTEGER},
      hq_type = #{record.hqType,jdbcType=VARCHAR},
      history_sevenday_sales_amazon = #{record.historySevendaySalesAmazon,jdbcType=DECIMAL},
      history_fourteenday_sales_amazon = #{record.historyFourteendaySalesAmazon,jdbcType=DECIMAL},
      history_thirtyday_sales_amazon = #{record.historyThirtydaySalesAmazon,jdbcType=DECIMAL},
      dc_auto_sales_forecast_config_id = #{record.dcAutoSalesForecastConfigId,jdbcType=INTEGER},
      is_out_stock = #{record.isOutStock,jdbcType=INTEGER},
      dc_auto_sales_forecast_stage_config_id = #{record.dcAutoSalesForecastStageConfigId,jdbcType=INTEGER},
      dc_auto_sales_forecast_title = #{record.dcAutoSalesForecastTitle,jdbcType=VARCHAR},
      head_transport_type = #{record.headTransportType,jdbcType=VARCHAR},
      head_transport_logistics_code = #{record.headTransportLogisticsCode,jdbcType=VARCHAR},
      auto_replace_logistics_task_id = #{record.autoReplaceLogisticsTaskId,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcAutoTurnoverWithBLOBs">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_auto_turnover
    <set>
      <if test="purchaseAdviceId != null">
        purchase_advice_id = #{purchaseAdviceId,jdbcType=VARCHAR},
      </if>
      <if test="bailunSku != null">
        bailun_sku = #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="warehouseCode != null">
        warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="quantityInitAdvise != null">
        quantity_init_advise = #{quantityInitAdvise,jdbcType=DECIMAL},
      </if>
      <if test="quantityMinimumOrder != null">
        quantity_minimum_order = #{quantityMinimumOrder,jdbcType=INTEGER},
      </if>
      <if test="quantityFinalAdvise != null">
        quantity_final_advise = #{quantityFinalAdvise,jdbcType=DECIMAL},
      </if>
      <if test="warehouseName != null">
        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
      </if>
      <if test="quantityPromotion != null">
        quantity_promotion = #{quantityPromotion,jdbcType=INTEGER},
      </if>
      <if test="quantityInventory != null">
        quantity_inventory = #{quantityInventory,jdbcType=INTEGER},
      </if>
      <if test="quantityTransfer != null">
        quantity_transfer = #{quantityTransfer,jdbcType=INTEGER},
      </if>
      <if test="quantityPurchase != null">
        quantity_purchase = #{quantityPurchase,jdbcType=INTEGER},
      </if>
      <if test="turnoverDays != null">
        turnover_days = #{turnoverDays,jdbcType=INTEGER},
      </if>
      <if test="quantitySafeInventory != null">
        quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=TINYINT},
      </if>
      <if test="quantityOutStock != null">
        quantity_out_stock = #{quantityOutStock,jdbcType=INTEGER},
      </if>
      <if test="skuTitle != null">
        sku_title = #{skuTitle,jdbcType=VARCHAR},
      </if>
      <if test="promotions != null">
        promotions = #{promotions,jdbcType=VARCHAR},
      </if>
      <if test="supplierDelivery != null">
        supplier_delivery = #{supplierDelivery,jdbcType=INTEGER},
      </if>
      <if test="inventoryAvailableDays != null">
        inventory_available_days = #{inventoryAvailableDays,jdbcType=INTEGER},
      </if>
      <if test="quantityInbound != null">
        quantity_inbound = #{quantityInbound,jdbcType=INTEGER},
      </if>
      <if test="forecastOnedaySales != null">
        forecast_oneday_sales = #{forecastOnedaySales,jdbcType=DECIMAL},
      </if>
      <if test="forecastSevendaySales != null">
        forecast_sevenday_sales = #{forecastSevendaySales,jdbcType=DECIMAL},
      </if>
      <if test="forecastFourteendaySales != null">
        forecast_fourteenday_sales = #{forecastFourteendaySales,jdbcType=DECIMAL},
      </if>
      <if test="inboundDetails != null">
        inbound_details = #{inboundDetails,jdbcType=VARCHAR},
      </if>
      <if test="inventoryDetails != null">
        inventory_details = #{inventoryDetails,jdbcType=VARCHAR},
      </if>
      <if test="advisedDetails != null">
        advised_details = #{advisedDetails,jdbcType=VARCHAR},
      </if>
      <if test="salesUpperLimit != null">
        sales_upper_limit = #{salesUpperLimit,jdbcType=DECIMAL},
      </if>
      <if test="averageOverdue != null">
        average_overdue = #{averageOverdue,jdbcType=DECIMAL},
      </if>
      <if test="averageSupplierDelivery != null">
        average_supplier_delivery = #{averageSupplierDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferConfigDelivery != null">
        transfer_config_delivery = #{transferConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferBaleConfigDelivery != null">
        transfer_bale_config_delivery = #{transferBaleConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="abroadInboundConfigDelivery != null">
        abroad_inbound_config_delivery = #{abroadInboundConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="inspectionConfigDelivery != null">
        inspection_config_delivery = #{inspectionConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="inspectionDelivery != null">
        inspection_delivery = #{inspectionDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferDelivery != null">
        transfer_delivery = #{transferDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferDeliverySource != null">
        transfer_delivery_source = #{transferDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="transferBaleDelivery != null">
        transfer_bale_delivery = #{transferBaleDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferBaleDeliverySource != null">
        transfer_bale_delivery_source = #{transferBaleDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="abroadInboundDelivery != null">
        abroad_inbound_delivery = #{abroadInboundDelivery,jdbcType=INTEGER},
      </if>
      <if test="abroadInboundDeliverySource != null">
        abroad_inbound_delivery_source = #{abroadInboundDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="supplementarySales != null">
        supplementary_sales = #{supplementarySales,jdbcType=DECIMAL},
      </if>
      <if test="turnoverSales != null">
        turnover_sales = #{turnoverSales,jdbcType=DECIMAL},
      </if>
      <if test="turnoverInbound != null">
        turnover_inbound = #{turnoverInbound,jdbcType=DECIMAL},
      </if>
      <if test="historySevendaySales != null">
        history_sevenday_sales = #{historySevendaySales,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySales != null">
        history_fourteenday_sales = #{historyFourteendaySales,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySales != null">
        history_thirtyday_sales = #{historyThirtydaySales,jdbcType=DECIMAL},
      </if>
      <if test="salesExplainDetails != null">
        sales_explain_details = #{salesExplainDetails,jdbcType=VARCHAR},
      </if>
      <if test="forecastTurnoverdaySales != null">
        forecast_turnoverday_sales = #{forecastTurnoverdaySales,jdbcType=DECIMAL},
      </if>
      <if test="stockUpSales != null">
        stock_up_sales = #{stockUpSales,jdbcType=DECIMAL},
      </if>
      <if test="quantityBeginAdvise != null">
        quantity_begin_advise = #{quantityBeginAdvise,jdbcType=DECIMAL},
      </if>
      <if test="stockUpDays != null">
        stock_up_days = #{stockUpDays,jdbcType=INTEGER},
      </if>
      <if test="paymentBeforeDelivery != null">
        payment_before_delivery = #{paymentBeforeDelivery,jdbcType=INTEGER},
      </if>
      <if test="productCode != null">
        product_code = #{productCode,jdbcType=VARCHAR},
      </if>
      <if test="productInnerCode != null">
        product_inner_code = #{productInnerCode,jdbcType=VARCHAR},
      </if>
      <if test="bailunCategoryId != null">
        bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
      </if>
      <if test="buyerName != null">
        buyer_name = #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="suppliersName != null">
        suppliers_name = #{suppliersName,jdbcType=VARCHAR},
      </if>
      <if test="historySevendaySalesEbay != null">
        history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesEbay != null">
        history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesEbay != null">
        history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historySevendaySalesAliexpress != null">
        history_sevenday_sales_aliexpress = #{historySevendaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesAliexpress != null">
        history_fourteenday_sales_aliexpress = #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesAliexpress != null">
        history_thirtyday_sales_aliexpress = #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="dailyWeightedSales != null">
        daily_weighted_sales = #{dailyWeightedSales,jdbcType=DECIMAL},
      </if>
      <if test="originalQuantityInitAdvise != null">
        original_quantity_init_advise = #{originalQuantityInitAdvise,jdbcType=INTEGER},
      </if>
      <if test="isModifyQuantityInitAdvise != null">
        is_modify_quantity_init_advise = #{isModifyQuantityInitAdvise,jdbcType=INTEGER},
      </if>
      <if test="tagId != null">
        tag_id = #{tagId,jdbcType=INTEGER},
      </if>
      <if test="hqType != null">
        hq_type = #{hqType,jdbcType=VARCHAR},
      </if>
      <if test="historySevendaySalesAmazon != null">
        history_sevenday_sales_amazon = #{historySevendaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesAmazon != null">
        history_fourteenday_sales_amazon = #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesAmazon != null">
        history_thirtyday_sales_amazon = #{historyThirtydaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="dcAutoSalesForecastConfigId != null">
        dc_auto_sales_forecast_config_id = #{dcAutoSalesForecastConfigId,jdbcType=INTEGER},
      </if>
      <if test="isOutStock != null">
        is_out_stock = #{isOutStock,jdbcType=INTEGER},
      </if>
      <if test="dcAutoSalesForecastStageConfigId != null">
        dc_auto_sales_forecast_stage_config_id = #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER},
      </if>
      <if test="dcAutoSalesForecastTitle != null">
        dc_auto_sales_forecast_title = #{dcAutoSalesForecastTitle,jdbcType=VARCHAR},
      </if>
      <if test="headTransportType != null">
        head_transport_type = #{headTransportType,jdbcType=VARCHAR},
      </if>
      <if test="headTransportLogisticsCode != null">
        head_transport_logistics_code = #{headTransportLogisticsCode,jdbcType=VARCHAR},
      </if>
      <if test="autoReplaceLogisticsTaskId != null">
        auto_replace_logistics_task_id = #{autoReplaceLogisticsTaskId,jdbcType=INTEGER},
      </if>
      <if test="salesDetails != null">
        sales_details = #{salesDetails,jdbcType=LONGVARCHAR},
      </if>
      <if test="shortSupplyDetails != null">
        short_supply_details = #{shortSupplyDetails,jdbcType=LONGVARCHAR},
      </if>
      <if test="salesDetailsFormula != null">
        sales_details_formula = #{salesDetailsFormula,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.bailuntec.domain.entity.DcAutoTurnoverWithBLOBs">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_auto_turnover
    set purchase_advice_id = #{purchaseAdviceId,jdbcType=VARCHAR},
      bailun_sku = #{bailunSku,jdbcType=VARCHAR},
      warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
      quantity_init_advise = #{quantityInitAdvise,jdbcType=DECIMAL},
      quantity_minimum_order = #{quantityMinimumOrder,jdbcType=INTEGER},
      quantity_final_advise = #{quantityFinalAdvise,jdbcType=DECIMAL},
      warehouse_name = #{warehouseName,jdbcType=VARCHAR},
      quantity_promotion = #{quantityPromotion,jdbcType=INTEGER},
      quantity_inventory = #{quantityInventory,jdbcType=INTEGER},
      quantity_transfer = #{quantityTransfer,jdbcType=INTEGER},
      quantity_purchase = #{quantityPurchase,jdbcType=INTEGER},
      turnover_days = #{turnoverDays,jdbcType=INTEGER},
      quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL},
      remark = #{remark,jdbcType=VARCHAR},
      gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      status = #{status,jdbcType=TINYINT},
      quantity_out_stock = #{quantityOutStock,jdbcType=INTEGER},
      sku_title = #{skuTitle,jdbcType=VARCHAR},
      promotions = #{promotions,jdbcType=VARCHAR},
      supplier_delivery = #{supplierDelivery,jdbcType=INTEGER},
      inventory_available_days = #{inventoryAvailableDays,jdbcType=INTEGER},
      quantity_inbound = #{quantityInbound,jdbcType=INTEGER},
      forecast_oneday_sales = #{forecastOnedaySales,jdbcType=DECIMAL},
      forecast_sevenday_sales = #{forecastSevendaySales,jdbcType=DECIMAL},
      forecast_fourteenday_sales = #{forecastFourteendaySales,jdbcType=DECIMAL},
      inbound_details = #{inboundDetails,jdbcType=VARCHAR},
      inventory_details = #{inventoryDetails,jdbcType=VARCHAR},
      advised_details = #{advisedDetails,jdbcType=VARCHAR},
      sales_upper_limit = #{salesUpperLimit,jdbcType=DECIMAL},
      average_overdue = #{averageOverdue,jdbcType=DECIMAL},
      average_supplier_delivery = #{averageSupplierDelivery,jdbcType=INTEGER},
      transfer_config_delivery = #{transferConfigDelivery,jdbcType=INTEGER},
      transfer_bale_config_delivery = #{transferBaleConfigDelivery,jdbcType=INTEGER},
      abroad_inbound_config_delivery = #{abroadInboundConfigDelivery,jdbcType=INTEGER},
      inspection_config_delivery = #{inspectionConfigDelivery,jdbcType=INTEGER},
      inspection_delivery = #{inspectionDelivery,jdbcType=INTEGER},
      transfer_delivery = #{transferDelivery,jdbcType=INTEGER},
      transfer_delivery_source = #{transferDeliverySource,jdbcType=VARCHAR},
      transfer_bale_delivery = #{transferBaleDelivery,jdbcType=INTEGER},
      transfer_bale_delivery_source = #{transferBaleDeliverySource,jdbcType=VARCHAR},
      abroad_inbound_delivery = #{abroadInboundDelivery,jdbcType=INTEGER},
      abroad_inbound_delivery_source = #{abroadInboundDeliverySource,jdbcType=VARCHAR},
      supplementary_sales = #{supplementarySales,jdbcType=DECIMAL},
      turnover_sales = #{turnoverSales,jdbcType=DECIMAL},
      turnover_inbound = #{turnoverInbound,jdbcType=DECIMAL},
      history_sevenday_sales = #{historySevendaySales,jdbcType=DECIMAL},
      history_fourteenday_sales = #{historyFourteendaySales,jdbcType=DECIMAL},
      history_thirtyday_sales = #{historyThirtydaySales,jdbcType=DECIMAL},
      sales_explain_details = #{salesExplainDetails,jdbcType=VARCHAR},
      forecast_turnoverday_sales = #{forecastTurnoverdaySales,jdbcType=DECIMAL},
      stock_up_sales = #{stockUpSales,jdbcType=DECIMAL},
      quantity_begin_advise = #{quantityBeginAdvise,jdbcType=DECIMAL},
      stock_up_days = #{stockUpDays,jdbcType=INTEGER},
      payment_before_delivery = #{paymentBeforeDelivery,jdbcType=INTEGER},
      product_code = #{productCode,jdbcType=VARCHAR},
      product_inner_code = #{productInnerCode,jdbcType=VARCHAR},
      bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
      buyer_name = #{buyerName,jdbcType=VARCHAR},
      suppliers_name = #{suppliersName,jdbcType=VARCHAR},
      history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
      history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
      history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
      history_sevenday_sales_aliexpress = #{historySevendaySalesAliexpress,jdbcType=DECIMAL},
      history_fourteenday_sales_aliexpress = #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL},
      history_thirtyday_sales_aliexpress = #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
      daily_weighted_sales = #{dailyWeightedSales,jdbcType=DECIMAL},
      original_quantity_init_advise = #{originalQuantityInitAdvise,jdbcType=INTEGER},
      is_modify_quantity_init_advise = #{isModifyQuantityInitAdvise,jdbcType=INTEGER},
      tag_id = #{tagId,jdbcType=INTEGER},
      hq_type = #{hqType,jdbcType=VARCHAR},
      history_sevenday_sales_amazon = #{historySevendaySalesAmazon,jdbcType=DECIMAL},
      history_fourteenday_sales_amazon = #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
      history_thirtyday_sales_amazon = #{historyThirtydaySalesAmazon,jdbcType=DECIMAL},
      dc_auto_sales_forecast_config_id = #{dcAutoSalesForecastConfigId,jdbcType=INTEGER},
      is_out_stock = #{isOutStock,jdbcType=INTEGER},
      dc_auto_sales_forecast_stage_config_id = #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER},
      dc_auto_sales_forecast_title = #{dcAutoSalesForecastTitle,jdbcType=VARCHAR},
      head_transport_type = #{headTransportType,jdbcType=VARCHAR},
      head_transport_logistics_code = #{headTransportLogisticsCode,jdbcType=VARCHAR},
      auto_replace_logistics_task_id = #{autoReplaceLogisticsTaskId,jdbcType=INTEGER},
      sales_details = #{salesDetails,jdbcType=LONGVARCHAR},
      short_supply_details = #{shortSupplyDetails,jdbcType=LONGVARCHAR},
      sales_details_formula = #{salesDetailsFormula,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcAutoTurnover">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_auto_turnover
    set purchase_advice_id = #{purchaseAdviceId,jdbcType=VARCHAR},
      bailun_sku = #{bailunSku,jdbcType=VARCHAR},
      warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
      quantity_init_advise = #{quantityInitAdvise,jdbcType=DECIMAL},
      quantity_minimum_order = #{quantityMinimumOrder,jdbcType=INTEGER},
      quantity_final_advise = #{quantityFinalAdvise,jdbcType=DECIMAL},
      warehouse_name = #{warehouseName,jdbcType=VARCHAR},
      quantity_promotion = #{quantityPromotion,jdbcType=INTEGER},
      quantity_inventory = #{quantityInventory,jdbcType=INTEGER},
      quantity_transfer = #{quantityTransfer,jdbcType=INTEGER},
      quantity_purchase = #{quantityPurchase,jdbcType=INTEGER},
      turnover_days = #{turnoverDays,jdbcType=INTEGER},
      quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL},
      remark = #{remark,jdbcType=VARCHAR},
      gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      status = #{status,jdbcType=TINYINT},
      quantity_out_stock = #{quantityOutStock,jdbcType=INTEGER},
      sku_title = #{skuTitle,jdbcType=VARCHAR},
      promotions = #{promotions,jdbcType=VARCHAR},
      supplier_delivery = #{supplierDelivery,jdbcType=INTEGER},
      inventory_available_days = #{inventoryAvailableDays,jdbcType=INTEGER},
      quantity_inbound = #{quantityInbound,jdbcType=INTEGER},
      forecast_oneday_sales = #{forecastOnedaySales,jdbcType=DECIMAL},
      forecast_sevenday_sales = #{forecastSevendaySales,jdbcType=DECIMAL},
      forecast_fourteenday_sales = #{forecastFourteendaySales,jdbcType=DECIMAL},
      inbound_details = #{inboundDetails,jdbcType=VARCHAR},
      inventory_details = #{inventoryDetails,jdbcType=VARCHAR},
      advised_details = #{advisedDetails,jdbcType=VARCHAR},
      sales_upper_limit = #{salesUpperLimit,jdbcType=DECIMAL},
      average_overdue = #{averageOverdue,jdbcType=DECIMAL},
      average_supplier_delivery = #{averageSupplierDelivery,jdbcType=INTEGER},
      transfer_config_delivery = #{transferConfigDelivery,jdbcType=INTEGER},
      transfer_bale_config_delivery = #{transferBaleConfigDelivery,jdbcType=INTEGER},
      abroad_inbound_config_delivery = #{abroadInboundConfigDelivery,jdbcType=INTEGER},
      inspection_config_delivery = #{inspectionConfigDelivery,jdbcType=INTEGER},
      inspection_delivery = #{inspectionDelivery,jdbcType=INTEGER},
      transfer_delivery = #{transferDelivery,jdbcType=INTEGER},
      transfer_delivery_source = #{transferDeliverySource,jdbcType=VARCHAR},
      transfer_bale_delivery = #{transferBaleDelivery,jdbcType=INTEGER},
      transfer_bale_delivery_source = #{transferBaleDeliverySource,jdbcType=VARCHAR},
      abroad_inbound_delivery = #{abroadInboundDelivery,jdbcType=INTEGER},
      abroad_inbound_delivery_source = #{abroadInboundDeliverySource,jdbcType=VARCHAR},
      supplementary_sales = #{supplementarySales,jdbcType=DECIMAL},
      turnover_sales = #{turnoverSales,jdbcType=DECIMAL},
      turnover_inbound = #{turnoverInbound,jdbcType=DECIMAL},
      history_sevenday_sales = #{historySevendaySales,jdbcType=DECIMAL},
      history_fourteenday_sales = #{historyFourteendaySales,jdbcType=DECIMAL},
      history_thirtyday_sales = #{historyThirtydaySales,jdbcType=DECIMAL},
      sales_explain_details = #{salesExplainDetails,jdbcType=VARCHAR},
      forecast_turnoverday_sales = #{forecastTurnoverdaySales,jdbcType=DECIMAL},
      stock_up_sales = #{stockUpSales,jdbcType=DECIMAL},
      quantity_begin_advise = #{quantityBeginAdvise,jdbcType=DECIMAL},
      stock_up_days = #{stockUpDays,jdbcType=INTEGER},
      payment_before_delivery = #{paymentBeforeDelivery,jdbcType=INTEGER},
      product_code = #{productCode,jdbcType=VARCHAR},
      product_inner_code = #{productInnerCode,jdbcType=VARCHAR},
      bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
      buyer_name = #{buyerName,jdbcType=VARCHAR},
      suppliers_name = #{suppliersName,jdbcType=VARCHAR},
      history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
      history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
      history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
      history_sevenday_sales_aliexpress = #{historySevendaySalesAliexpress,jdbcType=DECIMAL},
      history_fourteenday_sales_aliexpress = #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL},
      history_thirtyday_sales_aliexpress = #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
      daily_weighted_sales = #{dailyWeightedSales,jdbcType=DECIMAL},
      original_quantity_init_advise = #{originalQuantityInitAdvise,jdbcType=INTEGER},
      is_modify_quantity_init_advise = #{isModifyQuantityInitAdvise,jdbcType=INTEGER},
      tag_id = #{tagId,jdbcType=INTEGER},
      hq_type = #{hqType,jdbcType=VARCHAR},
      history_sevenday_sales_amazon = #{historySevendaySalesAmazon,jdbcType=DECIMAL},
      history_fourteenday_sales_amazon = #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
      history_thirtyday_sales_amazon = #{historyThirtydaySalesAmazon,jdbcType=DECIMAL},
      dc_auto_sales_forecast_config_id = #{dcAutoSalesForecastConfigId,jdbcType=INTEGER},
      is_out_stock = #{isOutStock,jdbcType=INTEGER},
      dc_auto_sales_forecast_stage_config_id = #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER},
      dc_auto_sales_forecast_title = #{dcAutoSalesForecastTitle,jdbcType=VARCHAR},
      head_transport_type = #{headTransportType,jdbcType=VARCHAR},
      head_transport_logistics_code = #{headTransportLogisticsCode,jdbcType=VARCHAR},
      auto_replace_logistics_task_id = #{autoReplaceLogisticsTaskId,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcAutoTurnoverWithBLOBs">
    <!--
      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_auto_turnover
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="purchaseAdviceId != null">
        purchase_advice_id,
      </if>
      <if test="bailunSku != null">
        bailun_sku,
      </if>
      <if test="warehouseCode != null">
        warehouse_code,
      </if>
      <if test="quantityInitAdvise != null">
        quantity_init_advise,
      </if>
      <if test="quantityMinimumOrder != null">
        quantity_minimum_order,
      </if>
      <if test="quantityFinalAdvise != null">
        quantity_final_advise,
      </if>
      <if test="warehouseName != null">
        warehouse_name,
      </if>
      <if test="quantityPromotion != null">
        quantity_promotion,
      </if>
      <if test="quantityInventory != null">
        quantity_inventory,
      </if>
      <if test="quantityTransfer != null">
        quantity_transfer,
      </if>
      <if test="quantityPurchase != null">
        quantity_purchase,
      </if>
      <if test="turnoverDays != null">
        turnover_days,
      </if>
      <if test="quantitySafeInventory != null">
        quantity_safe_inventory,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="quantityOutStock != null">
        quantity_out_stock,
      </if>
      <if test="skuTitle != null">
        sku_title,
      </if>
      <if test="promotions != null">
        promotions,
      </if>
      <if test="supplierDelivery != null">
        supplier_delivery,
      </if>
      <if test="inventoryAvailableDays != null">
        inventory_available_days,
      </if>
      <if test="quantityInbound != null">
        quantity_inbound,
      </if>
      <if test="forecastOnedaySales != null">
        forecast_oneday_sales,
      </if>
      <if test="forecastSevendaySales != null">
        forecast_sevenday_sales,
      </if>
      <if test="forecastFourteendaySales != null">
        forecast_fourteenday_sales,
      </if>
      <if test="inboundDetails != null">
        inbound_details,
      </if>
      <if test="inventoryDetails != null">
        inventory_details,
      </if>
      <if test="advisedDetails != null">
        advised_details,
      </if>
      <if test="salesUpperLimit != null">
        sales_upper_limit,
      </if>
      <if test="averageOverdue != null">
        average_overdue,
      </if>
      <if test="averageSupplierDelivery != null">
        average_supplier_delivery,
      </if>
      <if test="transferConfigDelivery != null">
        transfer_config_delivery,
      </if>
      <if test="transferBaleConfigDelivery != null">
        transfer_bale_config_delivery,
      </if>
      <if test="abroadInboundConfigDelivery != null">
        abroad_inbound_config_delivery,
      </if>
      <if test="inspectionConfigDelivery != null">
        inspection_config_delivery,
      </if>
      <if test="inspectionDelivery != null">
        inspection_delivery,
      </if>
      <if test="transferDelivery != null">
        transfer_delivery,
      </if>
      <if test="transferDeliverySource != null">
        transfer_delivery_source,
      </if>
      <if test="transferBaleDelivery != null">
        transfer_bale_delivery,
      </if>
      <if test="transferBaleDeliverySource != null">
        transfer_bale_delivery_source,
      </if>
      <if test="abroadInboundDelivery != null">
        abroad_inbound_delivery,
      </if>
      <if test="abroadInboundDeliverySource != null">
        abroad_inbound_delivery_source,
      </if>
      <if test="supplementarySales != null">
        supplementary_sales,
      </if>
      <if test="turnoverSales != null">
        turnover_sales,
      </if>
      <if test="turnoverInbound != null">
        turnover_inbound,
      </if>
      <if test="historySevendaySales != null">
        history_sevenday_sales,
      </if>
      <if test="historyFourteendaySales != null">
        history_fourteenday_sales,
      </if>
      <if test="historyThirtydaySales != null">
        history_thirtyday_sales,
      </if>
      <if test="salesExplainDetails != null">
        sales_explain_details,
      </if>
      <if test="forecastTurnoverdaySales != null">
        forecast_turnoverday_sales,
      </if>
      <if test="stockUpSales != null">
        stock_up_sales,
      </if>
      <if test="quantityBeginAdvise != null">
        quantity_begin_advise,
      </if>
      <if test="stockUpDays != null">
        stock_up_days,
      </if>
      <if test="paymentBeforeDelivery != null">
        payment_before_delivery,
      </if>
      <if test="productCode != null">
        product_code,
      </if>
      <if test="productInnerCode != null">
        product_inner_code,
      </if>
      <if test="bailunCategoryId != null">
        bailun_category_id,
      </if>
      <if test="buyerName != null">
        buyer_name,
      </if>
      <if test="suppliersName != null">
        suppliers_name,
      </if>
      <if test="historySevendaySalesEbay != null">
        history_sevenday_sales_ebay,
      </if>
      <if test="historyFourteendaySalesEbay != null">
        history_fourteenday_sales_ebay,
      </if>
      <if test="historyThirtydaySalesEbay != null">
        history_thirtyday_sales_ebay,
      </if>
      <if test="historySevendaySalesAliexpress != null">
        history_sevenday_sales_aliexpress,
      </if>
      <if test="historyFourteendaySalesAliexpress != null">
        history_fourteenday_sales_aliexpress,
      </if>
      <if test="historyThirtydaySalesAliexpress != null">
        history_thirtyday_sales_aliexpress,
      </if>
      <if test="dailyWeightedSales != null">
        daily_weighted_sales,
      </if>
      <if test="originalQuantityInitAdvise != null">
        original_quantity_init_advise,
      </if>
      <if test="isModifyQuantityInitAdvise != null">
        is_modify_quantity_init_advise,
      </if>
      <if test="tagId != null">
        tag_id,
      </if>
      <if test="hqType != null">
        hq_type,
      </if>
      <if test="historySevendaySalesAmazon != null">
        history_sevenday_sales_amazon,
      </if>
      <if test="historyFourteendaySalesAmazon != null">
        history_fourteenday_sales_amazon,
      </if>
      <if test="historyThirtydaySalesAmazon != null">
        history_thirtyday_sales_amazon,
      </if>
      <if test="dcAutoSalesForecastConfigId != null">
        dc_auto_sales_forecast_config_id,
      </if>
      <if test="isOutStock != null">
        is_out_stock,
      </if>
      <if test="dcAutoSalesForecastStageConfigId != null">
        dc_auto_sales_forecast_stage_config_id,
      </if>
      <if test="dcAutoSalesForecastTitle != null">
        dc_auto_sales_forecast_title,
      </if>
      <if test="headTransportType != null">
        head_transport_type,
      </if>
      <if test="headTransportLogisticsCode != null">
        head_transport_logistics_code,
      </if>
      <if test="autoReplaceLogisticsTaskId != null">
        auto_replace_logistics_task_id,
      </if>
      <if test="salesDetails != null">
        sales_details,
      </if>
      <if test="shortSupplyDetails != null">
        short_supply_details,
      </if>
      <if test="salesDetailsFormula != null">
        sales_details_formula,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="purchaseAdviceId != null">
        #{purchaseAdviceId,jdbcType=VARCHAR},
      </if>
      <if test="bailunSku != null">
        #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="warehouseCode != null">
        #{warehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="quantityInitAdvise != null">
        #{quantityInitAdvise,jdbcType=DECIMAL},
      </if>
      <if test="quantityMinimumOrder != null">
        #{quantityMinimumOrder,jdbcType=INTEGER},
      </if>
      <if test="quantityFinalAdvise != null">
        #{quantityFinalAdvise,jdbcType=DECIMAL},
      </if>
      <if test="warehouseName != null">
        #{warehouseName,jdbcType=VARCHAR},
      </if>
      <if test="quantityPromotion != null">
        #{quantityPromotion,jdbcType=INTEGER},
      </if>
      <if test="quantityInventory != null">
        #{quantityInventory,jdbcType=INTEGER},
      </if>
      <if test="quantityTransfer != null">
        #{quantityTransfer,jdbcType=INTEGER},
      </if>
      <if test="quantityPurchase != null">
        #{quantityPurchase,jdbcType=INTEGER},
      </if>
      <if test="turnoverDays != null">
        #{turnoverDays,jdbcType=INTEGER},
      </if>
      <if test="quantitySafeInventory != null">
        #{quantitySafeInventory,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        #{status,jdbcType=TINYINT},
      </if>
      <if test="quantityOutStock != null">
        #{quantityOutStock,jdbcType=INTEGER},
      </if>
      <if test="skuTitle != null">
        #{skuTitle,jdbcType=VARCHAR},
      </if>
      <if test="promotions != null">
        #{promotions,jdbcType=VARCHAR},
      </if>
      <if test="supplierDelivery != null">
        #{supplierDelivery,jdbcType=INTEGER},
      </if>
      <if test="inventoryAvailableDays != null">
        #{inventoryAvailableDays,jdbcType=INTEGER},
      </if>
      <if test="quantityInbound != null">
        #{quantityInbound,jdbcType=INTEGER},
      </if>
      <if test="forecastOnedaySales != null">
        #{forecastOnedaySales,jdbcType=DECIMAL},
      </if>
      <if test="forecastSevendaySales != null">
        #{forecastSevendaySales,jdbcType=DECIMAL},
      </if>
      <if test="forecastFourteendaySales != null">
        #{forecastFourteendaySales,jdbcType=DECIMAL},
      </if>
      <if test="inboundDetails != null">
        #{inboundDetails,jdbcType=VARCHAR},
      </if>
      <if test="inventoryDetails != null">
        #{inventoryDetails,jdbcType=VARCHAR},
      </if>
      <if test="advisedDetails != null">
        #{advisedDetails,jdbcType=VARCHAR},
      </if>
      <if test="salesUpperLimit != null">
        #{salesUpperLimit,jdbcType=DECIMAL},
      </if>
      <if test="averageOverdue != null">
        #{averageOverdue,jdbcType=DECIMAL},
      </if>
      <if test="averageSupplierDelivery != null">
        #{averageSupplierDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferConfigDelivery != null">
        #{transferConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferBaleConfigDelivery != null">
        #{transferBaleConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="abroadInboundConfigDelivery != null">
        #{abroadInboundConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="inspectionConfigDelivery != null">
        #{inspectionConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="inspectionDelivery != null">
        #{inspectionDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferDelivery != null">
        #{transferDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferDeliverySource != null">
        #{transferDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="transferBaleDelivery != null">
        #{transferBaleDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferBaleDeliverySource != null">
        #{transferBaleDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="abroadInboundDelivery != null">
        #{abroadInboundDelivery,jdbcType=INTEGER},
      </if>
      <if test="abroadInboundDeliverySource != null">
        #{abroadInboundDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="supplementarySales != null">
        #{supplementarySales,jdbcType=DECIMAL},
      </if>
      <if test="turnoverSales != null">
        #{turnoverSales,jdbcType=DECIMAL},
      </if>
      <if test="turnoverInbound != null">
        #{turnoverInbound,jdbcType=DECIMAL},
      </if>
      <if test="historySevendaySales != null">
        #{historySevendaySales,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySales != null">
        #{historyFourteendaySales,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySales != null">
        #{historyThirtydaySales,jdbcType=DECIMAL},
      </if>
      <if test="salesExplainDetails != null">
        #{salesExplainDetails,jdbcType=VARCHAR},
      </if>
      <if test="forecastTurnoverdaySales != null">
        #{forecastTurnoverdaySales,jdbcType=DECIMAL},
      </if>
      <if test="stockUpSales != null">
        #{stockUpSales,jdbcType=DECIMAL},
      </if>
      <if test="quantityBeginAdvise != null">
        #{quantityBeginAdvise,jdbcType=DECIMAL},
      </if>
      <if test="stockUpDays != null">
        #{stockUpDays,jdbcType=INTEGER},
      </if>
      <if test="paymentBeforeDelivery != null">
        #{paymentBeforeDelivery,jdbcType=INTEGER},
      </if>
      <if test="productCode != null">
        #{productCode,jdbcType=VARCHAR},
      </if>
      <if test="productInnerCode != null">
        #{productInnerCode,jdbcType=VARCHAR},
      </if>
      <if test="bailunCategoryId != null">
        #{bailunCategoryId,jdbcType=INTEGER},
      </if>
      <if test="buyerName != null">
        #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="suppliersName != null">
        #{suppliersName,jdbcType=VARCHAR},
      </if>
      <if test="historySevendaySalesEbay != null">
        #{historySevendaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesEbay != null">
        #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesEbay != null">
        #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historySevendaySalesAliexpress != null">
        #{historySevendaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesAliexpress != null">
        #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesAliexpress != null">
        #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="dailyWeightedSales != null">
        #{dailyWeightedSales,jdbcType=DECIMAL},
      </if>
      <if test="originalQuantityInitAdvise != null">
        #{originalQuantityInitAdvise,jdbcType=INTEGER},
      </if>
      <if test="isModifyQuantityInitAdvise != null">
        #{isModifyQuantityInitAdvise,jdbcType=INTEGER},
      </if>
      <if test="tagId != null">
        #{tagId,jdbcType=INTEGER},
      </if>
      <if test="hqType != null">
        #{hqType,jdbcType=VARCHAR},
      </if>
      <if test="historySevendaySalesAmazon != null">
        #{historySevendaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesAmazon != null">
        #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesAmazon != null">
        #{historyThirtydaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="dcAutoSalesForecastConfigId != null">
        #{dcAutoSalesForecastConfigId,jdbcType=INTEGER},
      </if>
      <if test="isOutStock != null">
        #{isOutStock,jdbcType=INTEGER},
      </if>
      <if test="dcAutoSalesForecastStageConfigId != null">
        #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER},
      </if>
      <if test="dcAutoSalesForecastTitle != null">
        #{dcAutoSalesForecastTitle,jdbcType=VARCHAR},
      </if>
      <if test="headTransportType != null">
        #{headTransportType,jdbcType=VARCHAR},
      </if>
      <if test="headTransportLogisticsCode != null">
        #{headTransportLogisticsCode,jdbcType=VARCHAR},
      </if>
      <if test="autoReplaceLogisticsTaskId != null">
        #{autoReplaceLogisticsTaskId,jdbcType=INTEGER},
      </if>
      <if test="salesDetails != null">
        #{salesDetails,jdbcType=LONGVARCHAR},
      </if>
      <if test="shortSupplyDetails != null">
        #{shortSupplyDetails,jdbcType=LONGVARCHAR},
      </if>
      <if test="salesDetailsFormula != null">
        #{salesDetailsFormula,jdbcType=LONGVARCHAR},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="purchaseAdviceId != null">
        purchase_advice_id = #{purchaseAdviceId,jdbcType=VARCHAR},
      </if>
      <if test="bailunSku != null">
        bailun_sku = #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="warehouseCode != null">
        warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="quantityInitAdvise != null">
        quantity_init_advise = #{quantityInitAdvise,jdbcType=DECIMAL},
      </if>
      <if test="quantityMinimumOrder != null">
        quantity_minimum_order = #{quantityMinimumOrder,jdbcType=INTEGER},
      </if>
      <if test="quantityFinalAdvise != null">
        quantity_final_advise = #{quantityFinalAdvise,jdbcType=DECIMAL},
      </if>
      <if test="warehouseName != null">
        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
      </if>
      <if test="quantityPromotion != null">
        quantity_promotion = #{quantityPromotion,jdbcType=INTEGER},
      </if>
      <if test="quantityInventory != null">
        quantity_inventory = #{quantityInventory,jdbcType=INTEGER},
      </if>
      <if test="quantityTransfer != null">
        quantity_transfer = #{quantityTransfer,jdbcType=INTEGER},
      </if>
      <if test="quantityPurchase != null">
        quantity_purchase = #{quantityPurchase,jdbcType=INTEGER},
      </if>
      <if test="turnoverDays != null">
        turnover_days = #{turnoverDays,jdbcType=INTEGER},
      </if>
      <if test="quantitySafeInventory != null">
        quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=TINYINT},
      </if>
      <if test="quantityOutStock != null">
        quantity_out_stock = #{quantityOutStock,jdbcType=INTEGER},
      </if>
      <if test="skuTitle != null">
        sku_title = #{skuTitle,jdbcType=VARCHAR},
      </if>
      <if test="promotions != null">
        promotions = #{promotions,jdbcType=VARCHAR},
      </if>
      <if test="supplierDelivery != null">
        supplier_delivery = #{supplierDelivery,jdbcType=INTEGER},
      </if>
      <if test="inventoryAvailableDays != null">
        inventory_available_days = #{inventoryAvailableDays,jdbcType=INTEGER},
      </if>
      <if test="quantityInbound != null">
        quantity_inbound = #{quantityInbound,jdbcType=INTEGER},
      </if>
      <if test="forecastOnedaySales != null">
        forecast_oneday_sales = #{forecastOnedaySales,jdbcType=DECIMAL},
      </if>
      <if test="forecastSevendaySales != null">
        forecast_sevenday_sales = #{forecastSevendaySales,jdbcType=DECIMAL},
      </if>
      <if test="forecastFourteendaySales != null">
        forecast_fourteenday_sales = #{forecastFourteendaySales,jdbcType=DECIMAL},
      </if>
      <if test="inboundDetails != null">
        inbound_details = #{inboundDetails,jdbcType=VARCHAR},
      </if>
      <if test="inventoryDetails != null">
        inventory_details = #{inventoryDetails,jdbcType=VARCHAR},
      </if>
      <if test="advisedDetails != null">
        advised_details = #{advisedDetails,jdbcType=VARCHAR},
      </if>
      <if test="salesUpperLimit != null">
        sales_upper_limit = #{salesUpperLimit,jdbcType=DECIMAL},
      </if>
      <if test="averageOverdue != null">
        average_overdue = #{averageOverdue,jdbcType=DECIMAL},
      </if>
      <if test="averageSupplierDelivery != null">
        average_supplier_delivery = #{averageSupplierDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferConfigDelivery != null">
        transfer_config_delivery = #{transferConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferBaleConfigDelivery != null">
        transfer_bale_config_delivery = #{transferBaleConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="abroadInboundConfigDelivery != null">
        abroad_inbound_config_delivery = #{abroadInboundConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="inspectionConfigDelivery != null">
        inspection_config_delivery = #{inspectionConfigDelivery,jdbcType=INTEGER},
      </if>
      <if test="inspectionDelivery != null">
        inspection_delivery = #{inspectionDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferDelivery != null">
        transfer_delivery = #{transferDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferDeliverySource != null">
        transfer_delivery_source = #{transferDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="transferBaleDelivery != null">
        transfer_bale_delivery = #{transferBaleDelivery,jdbcType=INTEGER},
      </if>
      <if test="transferBaleDeliverySource != null">
        transfer_bale_delivery_source = #{transferBaleDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="abroadInboundDelivery != null">
        abroad_inbound_delivery = #{abroadInboundDelivery,jdbcType=INTEGER},
      </if>
      <if test="abroadInboundDeliverySource != null">
        abroad_inbound_delivery_source = #{abroadInboundDeliverySource,jdbcType=VARCHAR},
      </if>
      <if test="supplementarySales != null">
        supplementary_sales = #{supplementarySales,jdbcType=DECIMAL},
      </if>
      <if test="turnoverSales != null">
        turnover_sales = #{turnoverSales,jdbcType=DECIMAL},
      </if>
      <if test="turnoverInbound != null">
        turnover_inbound = #{turnoverInbound,jdbcType=DECIMAL},
      </if>
      <if test="historySevendaySales != null">
        history_sevenday_sales = #{historySevendaySales,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySales != null">
        history_fourteenday_sales = #{historyFourteendaySales,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySales != null">
        history_thirtyday_sales = #{historyThirtydaySales,jdbcType=DECIMAL},
      </if>
      <if test="salesExplainDetails != null">
        sales_explain_details = #{salesExplainDetails,jdbcType=VARCHAR},
      </if>
      <if test="forecastTurnoverdaySales != null">
        forecast_turnoverday_sales = #{forecastTurnoverdaySales,jdbcType=DECIMAL},
      </if>
      <if test="stockUpSales != null">
        stock_up_sales = #{stockUpSales,jdbcType=DECIMAL},
      </if>
      <if test="quantityBeginAdvise != null">
        quantity_begin_advise = #{quantityBeginAdvise,jdbcType=DECIMAL},
      </if>
      <if test="stockUpDays != null">
        stock_up_days = #{stockUpDays,jdbcType=INTEGER},
      </if>
      <if test="paymentBeforeDelivery != null">
        payment_before_delivery = #{paymentBeforeDelivery,jdbcType=INTEGER},
      </if>
      <if test="productCode != null">
        product_code = #{productCode,jdbcType=VARCHAR},
      </if>
      <if test="productInnerCode != null">
        product_inner_code = #{productInnerCode,jdbcType=VARCHAR},
      </if>
      <if test="bailunCategoryId != null">
        bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
      </if>
      <if test="buyerName != null">
        buyer_name = #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="suppliersName != null">
        suppliers_name = #{suppliersName,jdbcType=VARCHAR},
      </if>
      <if test="historySevendaySalesEbay != null">
        history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesEbay != null">
        history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesEbay != null">
        history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
      </if>
      <if test="historySevendaySalesAliexpress != null">
        history_sevenday_sales_aliexpress = #{historySevendaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesAliexpress != null">
        history_fourteenday_sales_aliexpress = #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesAliexpress != null">
        history_thirtyday_sales_aliexpress = #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
      </if>
      <if test="dailyWeightedSales != null">
        daily_weighted_sales = #{dailyWeightedSales,jdbcType=DECIMAL},
      </if>
      <if test="originalQuantityInitAdvise != null">
        original_quantity_init_advise = #{originalQuantityInitAdvise,jdbcType=INTEGER},
      </if>
      <if test="isModifyQuantityInitAdvise != null">
        is_modify_quantity_init_advise = #{isModifyQuantityInitAdvise,jdbcType=INTEGER},
      </if>
      <if test="tagId != null">
        tag_id = #{tagId,jdbcType=INTEGER},
      </if>
      <if test="hqType != null">
        hq_type = #{hqType,jdbcType=VARCHAR},
      </if>
      <if test="historySevendaySalesAmazon != null">
        history_sevenday_sales_amazon = #{historySevendaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="historyFourteendaySalesAmazon != null">
        history_fourteenday_sales_amazon = #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="historyThirtydaySalesAmazon != null">
        history_thirtyday_sales_amazon = #{historyThirtydaySalesAmazon,jdbcType=DECIMAL},
      </if>
      <if test="dcAutoSalesForecastConfigId != null">
        dc_auto_sales_forecast_config_id = #{dcAutoSalesForecastConfigId,jdbcType=INTEGER},
      </if>
      <if test="isOutStock != null">
        is_out_stock = #{isOutStock,jdbcType=INTEGER},
      </if>
      <if test="dcAutoSalesForecastStageConfigId != null">
        dc_auto_sales_forecast_stage_config_id = #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER},
      </if>
      <if test="dcAutoSalesForecastTitle != null">
        dc_auto_sales_forecast_title = #{dcAutoSalesForecastTitle,jdbcType=VARCHAR},
      </if>
      <if test="headTransportType != null">
        head_transport_type = #{headTransportType,jdbcType=VARCHAR},
      </if>
      <if test="headTransportLogisticsCode != null">
        head_transport_logistics_code = #{headTransportLogisticsCode,jdbcType=VARCHAR},
      </if>
      <if test="autoReplaceLogisticsTaskId != null">
        auto_replace_logistics_task_id = #{autoReplaceLogisticsTaskId,jdbcType=INTEGER},
      </if>
      <if test="salesDetails != null">
        sales_details = #{salesDetails,jdbcType=LONGVARCHAR},
      </if>
      <if test="shortSupplyDetails != null">
        short_supply_details = #{shortSupplyDetails,jdbcType=LONGVARCHAR},
      </if>
      <if test="salesDetailsFormula != null">
        sales_details_formula = #{salesDetailsFormula,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAutoTurnover">
    <!--
      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_auto_turnover
    (id, purchase_advice_id, bailun_sku, warehouse_code, quantity_init_advise, quantity_minimum_order, 
      quantity_final_advise, warehouse_name, quantity_promotion, quantity_inventory, 
      quantity_transfer, quantity_purchase, turnover_days, quantity_safe_inventory, remark, 
      gmt_create, gmt_modified, status, quantity_out_stock, sku_title, promotions, supplier_delivery, 
      inventory_available_days, quantity_inbound, forecast_oneday_sales, forecast_sevenday_sales, 
      forecast_fourteenday_sales, inbound_details, inventory_details, advised_details, 
      sales_upper_limit, average_overdue, average_supplier_delivery, transfer_config_delivery, 
      transfer_bale_config_delivery, abroad_inbound_config_delivery, inspection_config_delivery, 
      inspection_delivery, transfer_delivery, transfer_delivery_source, transfer_bale_delivery, 
      transfer_bale_delivery_source, abroad_inbound_delivery, abroad_inbound_delivery_source, 
      supplementary_sales, turnover_sales, turnover_inbound, history_sevenday_sales, 
      history_fourteenday_sales, history_thirtyday_sales, sales_explain_details, forecast_turnoverday_sales, 
      stock_up_sales, quantity_begin_advise, stock_up_days, payment_before_delivery, 
      product_code, product_inner_code, bailun_category_id, buyer_name, suppliers_name, 
      history_sevenday_sales_ebay, history_fourteenday_sales_ebay, history_thirtyday_sales_ebay, 
      history_sevenday_sales_aliexpress, history_fourteenday_sales_aliexpress, history_thirtyday_sales_aliexpress, 
      daily_weighted_sales, original_quantity_init_advise, is_modify_quantity_init_advise, 
      tag_id, hq_type, history_sevenday_sales_amazon, history_fourteenday_sales_amazon, 
      history_thirtyday_sales_amazon, dc_auto_sales_forecast_config_id, is_out_stock, 
      dc_auto_sales_forecast_stage_config_id, dc_auto_sales_forecast_title, head_transport_type, 
      head_transport_logistics_code, auto_replace_logistics_task_id)
    values
    (#{id,jdbcType=INTEGER}, #{purchaseAdviceId,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR}, 
      #{warehouseCode,jdbcType=VARCHAR}, #{quantityInitAdvise,jdbcType=DECIMAL}, #{quantityMinimumOrder,jdbcType=INTEGER}, 
      #{quantityFinalAdvise,jdbcType=DECIMAL}, #{warehouseName,jdbcType=VARCHAR}, #{quantityPromotion,jdbcType=INTEGER}, 
      #{quantityInventory,jdbcType=INTEGER}, #{quantityTransfer,jdbcType=INTEGER}, #{quantityPurchase,jdbcType=INTEGER}, 
      #{turnoverDays,jdbcType=INTEGER}, #{quantitySafeInventory,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, 
      #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT}, 
      #{quantityOutStock,jdbcType=INTEGER}, #{skuTitle,jdbcType=VARCHAR}, #{promotions,jdbcType=VARCHAR}, 
      #{supplierDelivery,jdbcType=INTEGER}, #{inventoryAvailableDays,jdbcType=INTEGER}, 
      #{quantityInbound,jdbcType=INTEGER}, #{forecastOnedaySales,jdbcType=DECIMAL}, #{forecastSevendaySales,jdbcType=DECIMAL}, 
      #{forecastFourteendaySales,jdbcType=DECIMAL}, #{inboundDetails,jdbcType=VARCHAR}, 
      #{inventoryDetails,jdbcType=VARCHAR}, #{advisedDetails,jdbcType=VARCHAR}, #{salesUpperLimit,jdbcType=DECIMAL}, 
      #{averageOverdue,jdbcType=DECIMAL}, #{averageSupplierDelivery,jdbcType=INTEGER}, 
      #{transferConfigDelivery,jdbcType=INTEGER}, #{transferBaleConfigDelivery,jdbcType=INTEGER}, 
      #{abroadInboundConfigDelivery,jdbcType=INTEGER}, #{inspectionConfigDelivery,jdbcType=INTEGER}, 
      #{inspectionDelivery,jdbcType=INTEGER}, #{transferDelivery,jdbcType=INTEGER}, #{transferDeliverySource,jdbcType=VARCHAR}, 
      #{transferBaleDelivery,jdbcType=INTEGER}, #{transferBaleDeliverySource,jdbcType=VARCHAR}, 
      #{abroadInboundDelivery,jdbcType=INTEGER}, #{abroadInboundDeliverySource,jdbcType=VARCHAR}, 
      #{supplementarySales,jdbcType=DECIMAL}, #{turnoverSales,jdbcType=DECIMAL}, #{turnoverInbound,jdbcType=DECIMAL}, 
      #{historySevendaySales,jdbcType=DECIMAL}, #{historyFourteendaySales,jdbcType=DECIMAL}, 
      #{historyThirtydaySales,jdbcType=DECIMAL}, #{salesExplainDetails,jdbcType=VARCHAR}, 
      #{forecastTurnoverdaySales,jdbcType=DECIMAL}, #{stockUpSales,jdbcType=DECIMAL}, 
      #{quantityBeginAdvise,jdbcType=DECIMAL}, #{stockUpDays,jdbcType=INTEGER}, #{paymentBeforeDelivery,jdbcType=INTEGER}, 
      #{productCode,jdbcType=VARCHAR}, #{productInnerCode,jdbcType=VARCHAR}, #{bailunCategoryId,jdbcType=INTEGER}, 
      #{buyerName,jdbcType=VARCHAR}, #{suppliersName,jdbcType=VARCHAR}, #{historySevendaySalesEbay,jdbcType=DECIMAL}, 
      #{historyFourteendaySalesEbay,jdbcType=DECIMAL}, #{historyThirtydaySalesEbay,jdbcType=DECIMAL}, 
      #{historySevendaySalesAliexpress,jdbcType=DECIMAL}, #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL}, 
      #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL}, #{dailyWeightedSales,jdbcType=DECIMAL}, 
      #{originalQuantityInitAdvise,jdbcType=INTEGER}, #{isModifyQuantityInitAdvise,jdbcType=INTEGER}, 
      #{tagId,jdbcType=INTEGER}, #{hqType,jdbcType=VARCHAR}, #{historySevendaySalesAmazon,jdbcType=DECIMAL}, 
      #{historyFourteendaySalesAmazon,jdbcType=DECIMAL}, #{historyThirtydaySalesAmazon,jdbcType=DECIMAL}, 
      #{dcAutoSalesForecastConfigId,jdbcType=INTEGER}, #{isOutStock,jdbcType=INTEGER}, 
      #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER}, #{dcAutoSalesForecastTitle,jdbcType=VARCHAR}, 
      #{headTransportType,jdbcType=VARCHAR}, #{headTransportLogisticsCode,jdbcType=VARCHAR}, 
      #{autoReplaceLogisticsTaskId,jdbcType=INTEGER})
    on duplicate key update 
    id = #{id,jdbcType=INTEGER}, 
    purchase_advice_id = #{purchaseAdviceId,jdbcType=VARCHAR}, 
    bailun_sku = #{bailunSku,jdbcType=VARCHAR}, 
    warehouse_code = #{warehouseCode,jdbcType=VARCHAR}, 
    quantity_init_advise = #{quantityInitAdvise,jdbcType=DECIMAL}, 
    quantity_minimum_order = #{quantityMinimumOrder,jdbcType=INTEGER}, 
    quantity_final_advise = #{quantityFinalAdvise,jdbcType=DECIMAL}, 
    warehouse_name = #{warehouseName,jdbcType=VARCHAR}, 
    quantity_promotion = #{quantityPromotion,jdbcType=INTEGER}, 
    quantity_inventory = #{quantityInventory,jdbcType=INTEGER}, 
    quantity_transfer = #{quantityTransfer,jdbcType=INTEGER}, 
    quantity_purchase = #{quantityPurchase,jdbcType=INTEGER}, 
    turnover_days = #{turnoverDays,jdbcType=INTEGER}, 
    quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL}, 
    remark = #{remark,jdbcType=VARCHAR}, 
    gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, 
    gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, 
    status = #{status,jdbcType=TINYINT}, 
    quantity_out_stock = #{quantityOutStock,jdbcType=INTEGER}, 
    sku_title = #{skuTitle,jdbcType=VARCHAR}, 
    promotions = #{promotions,jdbcType=VARCHAR}, 
    supplier_delivery = #{supplierDelivery,jdbcType=INTEGER}, 
    inventory_available_days = #{inventoryAvailableDays,jdbcType=INTEGER}, 
    quantity_inbound = #{quantityInbound,jdbcType=INTEGER}, 
    forecast_oneday_sales = #{forecastOnedaySales,jdbcType=DECIMAL}, 
    forecast_sevenday_sales = #{forecastSevendaySales,jdbcType=DECIMAL}, 
    forecast_fourteenday_sales = #{forecastFourteendaySales,jdbcType=DECIMAL}, 
    inbound_details = #{inboundDetails,jdbcType=VARCHAR}, 
    inventory_details = #{inventoryDetails,jdbcType=VARCHAR}, 
    advised_details = #{advisedDetails,jdbcType=VARCHAR}, 
    sales_upper_limit = #{salesUpperLimit,jdbcType=DECIMAL}, 
    average_overdue = #{averageOverdue,jdbcType=DECIMAL}, 
    average_supplier_delivery = #{averageSupplierDelivery,jdbcType=INTEGER}, 
    transfer_config_delivery = #{transferConfigDelivery,jdbcType=INTEGER}, 
    transfer_bale_config_delivery = #{transferBaleConfigDelivery,jdbcType=INTEGER}, 
    abroad_inbound_config_delivery = #{abroadInboundConfigDelivery,jdbcType=INTEGER}, 
    inspection_config_delivery = #{inspectionConfigDelivery,jdbcType=INTEGER}, 
    inspection_delivery = #{inspectionDelivery,jdbcType=INTEGER}, 
    transfer_delivery = #{transferDelivery,jdbcType=INTEGER}, 
    transfer_delivery_source = #{transferDeliverySource,jdbcType=VARCHAR}, 
    transfer_bale_delivery = #{transferBaleDelivery,jdbcType=INTEGER}, 
    transfer_bale_delivery_source = #{transferBaleDeliverySource,jdbcType=VARCHAR}, 
    abroad_inbound_delivery = #{abroadInboundDelivery,jdbcType=INTEGER}, 
    abroad_inbound_delivery_source = #{abroadInboundDeliverySource,jdbcType=VARCHAR}, 
    supplementary_sales = #{supplementarySales,jdbcType=DECIMAL}, 
    turnover_sales = #{turnoverSales,jdbcType=DECIMAL}, 
    turnover_inbound = #{turnoverInbound,jdbcType=DECIMAL}, 
    history_sevenday_sales = #{historySevendaySales,jdbcType=DECIMAL}, 
    history_fourteenday_sales = #{historyFourteendaySales,jdbcType=DECIMAL}, 
    history_thirtyday_sales = #{historyThirtydaySales,jdbcType=DECIMAL}, 
    sales_explain_details = #{salesExplainDetails,jdbcType=VARCHAR}, 
    forecast_turnoverday_sales = #{forecastTurnoverdaySales,jdbcType=DECIMAL}, 
    stock_up_sales = #{stockUpSales,jdbcType=DECIMAL}, 
    quantity_begin_advise = #{quantityBeginAdvise,jdbcType=DECIMAL}, 
    stock_up_days = #{stockUpDays,jdbcType=INTEGER}, 
    payment_before_delivery = #{paymentBeforeDelivery,jdbcType=INTEGER}, 
    product_code = #{productCode,jdbcType=VARCHAR}, 
    product_inner_code = #{productInnerCode,jdbcType=VARCHAR}, 
    bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER}, 
    buyer_name = #{buyerName,jdbcType=VARCHAR}, 
    suppliers_name = #{suppliersName,jdbcType=VARCHAR}, 
    history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL}, 
    history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL}, 
    history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL}, 
    history_sevenday_sales_aliexpress = #{historySevendaySalesAliexpress,jdbcType=DECIMAL}, 
    history_fourteenday_sales_aliexpress = #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL}, 
    history_thirtyday_sales_aliexpress = #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL}, 
    daily_weighted_sales = #{dailyWeightedSales,jdbcType=DECIMAL}, 
    original_quantity_init_advise = #{originalQuantityInitAdvise,jdbcType=INTEGER}, 
    is_modify_quantity_init_advise = #{isModifyQuantityInitAdvise,jdbcType=INTEGER}, 
    tag_id = #{tagId,jdbcType=INTEGER}, 
    hq_type = #{hqType,jdbcType=VARCHAR}, 
    history_sevenday_sales_amazon = #{historySevendaySalesAmazon,jdbcType=DECIMAL}, 
    history_fourteenday_sales_amazon = #{historyFourteendaySalesAmazon,jdbcType=DECIMAL}, 
    history_thirtyday_sales_amazon = #{historyThirtydaySalesAmazon,jdbcType=DECIMAL}, 
    dc_auto_sales_forecast_config_id = #{dcAutoSalesForecastConfigId,jdbcType=INTEGER}, 
    is_out_stock = #{isOutStock,jdbcType=INTEGER}, 
    dc_auto_sales_forecast_stage_config_id = #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER}, 
    dc_auto_sales_forecast_title = #{dcAutoSalesForecastTitle,jdbcType=VARCHAR}, 
    head_transport_type = #{headTransportType,jdbcType=VARCHAR}, 
    head_transport_logistics_code = #{headTransportLogisticsCode,jdbcType=VARCHAR}, 
    auto_replace_logistics_task_id = #{autoReplaceLogisticsTaskId,jdbcType=INTEGER}
  </insert>
  <insert id="upsertWithBLOBs" parameterType="com.bailuntec.domain.entity.DcAutoTurnoverWithBLOBs">
    <!--
      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_auto_turnover
    (id, purchase_advice_id, bailun_sku, warehouse_code, quantity_init_advise, quantity_minimum_order, 
      quantity_final_advise, warehouse_name, quantity_promotion, quantity_inventory, 
      quantity_transfer, quantity_purchase, turnover_days, quantity_safe_inventory, remark, 
      gmt_create, gmt_modified, status, quantity_out_stock, sku_title, promotions, supplier_delivery, 
      inventory_available_days, quantity_inbound, forecast_oneday_sales, forecast_sevenday_sales, 
      forecast_fourteenday_sales, inbound_details, inventory_details, advised_details, 
      sales_upper_limit, average_overdue, average_supplier_delivery, transfer_config_delivery, 
      transfer_bale_config_delivery, abroad_inbound_config_delivery, inspection_config_delivery, 
      inspection_delivery, transfer_delivery, transfer_delivery_source, transfer_bale_delivery, 
      transfer_bale_delivery_source, abroad_inbound_delivery, abroad_inbound_delivery_source, 
      supplementary_sales, turnover_sales, turnover_inbound, history_sevenday_sales, 
      history_fourteenday_sales, history_thirtyday_sales, sales_explain_details, forecast_turnoverday_sales, 
      stock_up_sales, quantity_begin_advise, stock_up_days, payment_before_delivery, 
      product_code, product_inner_code, bailun_category_id, buyer_name, suppliers_name, 
      history_sevenday_sales_ebay, history_fourteenday_sales_ebay, history_thirtyday_sales_ebay, 
      history_sevenday_sales_aliexpress, history_fourteenday_sales_aliexpress, history_thirtyday_sales_aliexpress, 
      daily_weighted_sales, original_quantity_init_advise, is_modify_quantity_init_advise, 
      tag_id, hq_type, history_sevenday_sales_amazon, history_fourteenday_sales_amazon, 
      history_thirtyday_sales_amazon, dc_auto_sales_forecast_config_id, is_out_stock, 
      dc_auto_sales_forecast_stage_config_id, dc_auto_sales_forecast_title, head_transport_type, 
      head_transport_logistics_code, auto_replace_logistics_task_id, sales_details, short_supply_details, 
      sales_details_formula)
    values
    (#{id,jdbcType=INTEGER}, #{purchaseAdviceId,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR}, 
      #{warehouseCode,jdbcType=VARCHAR}, #{quantityInitAdvise,jdbcType=DECIMAL}, #{quantityMinimumOrder,jdbcType=INTEGER}, 
      #{quantityFinalAdvise,jdbcType=DECIMAL}, #{warehouseName,jdbcType=VARCHAR}, #{quantityPromotion,jdbcType=INTEGER}, 
      #{quantityInventory,jdbcType=INTEGER}, #{quantityTransfer,jdbcType=INTEGER}, #{quantityPurchase,jdbcType=INTEGER}, 
      #{turnoverDays,jdbcType=INTEGER}, #{quantitySafeInventory,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, 
      #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT}, 
      #{quantityOutStock,jdbcType=INTEGER}, #{skuTitle,jdbcType=VARCHAR}, #{promotions,jdbcType=VARCHAR}, 
      #{supplierDelivery,jdbcType=INTEGER}, #{inventoryAvailableDays,jdbcType=INTEGER}, 
      #{quantityInbound,jdbcType=INTEGER}, #{forecastOnedaySales,jdbcType=DECIMAL}, #{forecastSevendaySales,jdbcType=DECIMAL}, 
      #{forecastFourteendaySales,jdbcType=DECIMAL}, #{inboundDetails,jdbcType=VARCHAR}, 
      #{inventoryDetails,jdbcType=VARCHAR}, #{advisedDetails,jdbcType=VARCHAR}, #{salesUpperLimit,jdbcType=DECIMAL}, 
      #{averageOverdue,jdbcType=DECIMAL}, #{averageSupplierDelivery,jdbcType=INTEGER}, 
      #{transferConfigDelivery,jdbcType=INTEGER}, #{transferBaleConfigDelivery,jdbcType=INTEGER}, 
      #{abroadInboundConfigDelivery,jdbcType=INTEGER}, #{inspectionConfigDelivery,jdbcType=INTEGER}, 
      #{inspectionDelivery,jdbcType=INTEGER}, #{transferDelivery,jdbcType=INTEGER}, #{transferDeliverySource,jdbcType=VARCHAR}, 
      #{transferBaleDelivery,jdbcType=INTEGER}, #{transferBaleDeliverySource,jdbcType=VARCHAR}, 
      #{abroadInboundDelivery,jdbcType=INTEGER}, #{abroadInboundDeliverySource,jdbcType=VARCHAR}, 
      #{supplementarySales,jdbcType=DECIMAL}, #{turnoverSales,jdbcType=DECIMAL}, #{turnoverInbound,jdbcType=DECIMAL}, 
      #{historySevendaySales,jdbcType=DECIMAL}, #{historyFourteendaySales,jdbcType=DECIMAL}, 
      #{historyThirtydaySales,jdbcType=DECIMAL}, #{salesExplainDetails,jdbcType=VARCHAR}, 
      #{forecastTurnoverdaySales,jdbcType=DECIMAL}, #{stockUpSales,jdbcType=DECIMAL}, 
      #{quantityBeginAdvise,jdbcType=DECIMAL}, #{stockUpDays,jdbcType=INTEGER}, #{paymentBeforeDelivery,jdbcType=INTEGER}, 
      #{productCode,jdbcType=VARCHAR}, #{productInnerCode,jdbcType=VARCHAR}, #{bailunCategoryId,jdbcType=INTEGER}, 
      #{buyerName,jdbcType=VARCHAR}, #{suppliersName,jdbcType=VARCHAR}, #{historySevendaySalesEbay,jdbcType=DECIMAL}, 
      #{historyFourteendaySalesEbay,jdbcType=DECIMAL}, #{historyThirtydaySalesEbay,jdbcType=DECIMAL}, 
      #{historySevendaySalesAliexpress,jdbcType=DECIMAL}, #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL}, 
      #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL}, #{dailyWeightedSales,jdbcType=DECIMAL}, 
      #{originalQuantityInitAdvise,jdbcType=INTEGER}, #{isModifyQuantityInitAdvise,jdbcType=INTEGER}, 
      #{tagId,jdbcType=INTEGER}, #{hqType,jdbcType=VARCHAR}, #{historySevendaySalesAmazon,jdbcType=DECIMAL}, 
      #{historyFourteendaySalesAmazon,jdbcType=DECIMAL}, #{historyThirtydaySalesAmazon,jdbcType=DECIMAL}, 
      #{dcAutoSalesForecastConfigId,jdbcType=INTEGER}, #{isOutStock,jdbcType=INTEGER}, 
      #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER}, #{dcAutoSalesForecastTitle,jdbcType=VARCHAR}, 
      #{headTransportType,jdbcType=VARCHAR}, #{headTransportLogisticsCode,jdbcType=VARCHAR}, 
      #{autoReplaceLogisticsTaskId,jdbcType=INTEGER}, #{salesDetails,jdbcType=LONGVARCHAR}, 
      #{shortSupplyDetails,jdbcType=LONGVARCHAR}, #{salesDetailsFormula,jdbcType=LONGVARCHAR}
      )
    on duplicate key update 
    id = #{id,jdbcType=INTEGER}, 
    purchase_advice_id = #{purchaseAdviceId,jdbcType=VARCHAR}, 
    bailun_sku = #{bailunSku,jdbcType=VARCHAR}, 
    warehouse_code = #{warehouseCode,jdbcType=VARCHAR}, 
    quantity_init_advise = #{quantityInitAdvise,jdbcType=DECIMAL}, 
    quantity_minimum_order = #{quantityMinimumOrder,jdbcType=INTEGER}, 
    quantity_final_advise = #{quantityFinalAdvise,jdbcType=DECIMAL}, 
    warehouse_name = #{warehouseName,jdbcType=VARCHAR}, 
    quantity_promotion = #{quantityPromotion,jdbcType=INTEGER}, 
    quantity_inventory = #{quantityInventory,jdbcType=INTEGER}, 
    quantity_transfer = #{quantityTransfer,jdbcType=INTEGER}, 
    quantity_purchase = #{quantityPurchase,jdbcType=INTEGER}, 
    turnover_days = #{turnoverDays,jdbcType=INTEGER}, 
    quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL}, 
    remark = #{remark,jdbcType=VARCHAR}, 
    gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, 
    gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, 
    status = #{status,jdbcType=TINYINT}, 
    quantity_out_stock = #{quantityOutStock,jdbcType=INTEGER}, 
    sku_title = #{skuTitle,jdbcType=VARCHAR}, 
    promotions = #{promotions,jdbcType=VARCHAR}, 
    supplier_delivery = #{supplierDelivery,jdbcType=INTEGER}, 
    inventory_available_days = #{inventoryAvailableDays,jdbcType=INTEGER}, 
    quantity_inbound = #{quantityInbound,jdbcType=INTEGER}, 
    forecast_oneday_sales = #{forecastOnedaySales,jdbcType=DECIMAL}, 
    forecast_sevenday_sales = #{forecastSevendaySales,jdbcType=DECIMAL}, 
    forecast_fourteenday_sales = #{forecastFourteendaySales,jdbcType=DECIMAL}, 
    inbound_details = #{inboundDetails,jdbcType=VARCHAR}, 
    inventory_details = #{inventoryDetails,jdbcType=VARCHAR}, 
    advised_details = #{advisedDetails,jdbcType=VARCHAR}, 
    sales_upper_limit = #{salesUpperLimit,jdbcType=DECIMAL}, 
    average_overdue = #{averageOverdue,jdbcType=DECIMAL}, 
    average_supplier_delivery = #{averageSupplierDelivery,jdbcType=INTEGER}, 
    transfer_config_delivery = #{transferConfigDelivery,jdbcType=INTEGER}, 
    transfer_bale_config_delivery = #{transferBaleConfigDelivery,jdbcType=INTEGER}, 
    abroad_inbound_config_delivery = #{abroadInboundConfigDelivery,jdbcType=INTEGER}, 
    inspection_config_delivery = #{inspectionConfigDelivery,jdbcType=INTEGER}, 
    inspection_delivery = #{inspectionDelivery,jdbcType=INTEGER}, 
    transfer_delivery = #{transferDelivery,jdbcType=INTEGER}, 
    transfer_delivery_source = #{transferDeliverySource,jdbcType=VARCHAR}, 
    transfer_bale_delivery = #{transferBaleDelivery,jdbcType=INTEGER}, 
    transfer_bale_delivery_source = #{transferBaleDeliverySource,jdbcType=VARCHAR}, 
    abroad_inbound_delivery = #{abroadInboundDelivery,jdbcType=INTEGER}, 
    abroad_inbound_delivery_source = #{abroadInboundDeliverySource,jdbcType=VARCHAR}, 
    supplementary_sales = #{supplementarySales,jdbcType=DECIMAL}, 
    turnover_sales = #{turnoverSales,jdbcType=DECIMAL}, 
    turnover_inbound = #{turnoverInbound,jdbcType=DECIMAL}, 
    history_sevenday_sales = #{historySevendaySales,jdbcType=DECIMAL}, 
    history_fourteenday_sales = #{historyFourteendaySales,jdbcType=DECIMAL}, 
    history_thirtyday_sales = #{historyThirtydaySales,jdbcType=DECIMAL}, 
    sales_explain_details = #{salesExplainDetails,jdbcType=VARCHAR}, 
    forecast_turnoverday_sales = #{forecastTurnoverdaySales,jdbcType=DECIMAL}, 
    stock_up_sales = #{stockUpSales,jdbcType=DECIMAL}, 
    quantity_begin_advise = #{quantityBeginAdvise,jdbcType=DECIMAL}, 
    stock_up_days = #{stockUpDays,jdbcType=INTEGER}, 
    payment_before_delivery = #{paymentBeforeDelivery,jdbcType=INTEGER}, 
    product_code = #{productCode,jdbcType=VARCHAR}, 
    product_inner_code = #{productInnerCode,jdbcType=VARCHAR}, 
    bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER}, 
    buyer_name = #{buyerName,jdbcType=VARCHAR}, 
    suppliers_name = #{suppliersName,jdbcType=VARCHAR}, 
    history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL}, 
    history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL}, 
    history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL}, 
    history_sevenday_sales_aliexpress = #{historySevendaySalesAliexpress,jdbcType=DECIMAL}, 
    history_fourteenday_sales_aliexpress = #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL}, 
    history_thirtyday_sales_aliexpress = #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL}, 
    daily_weighted_sales = #{dailyWeightedSales,jdbcType=DECIMAL}, 
    original_quantity_init_advise = #{originalQuantityInitAdvise,jdbcType=INTEGER}, 
    is_modify_quantity_init_advise = #{isModifyQuantityInitAdvise,jdbcType=INTEGER}, 
    tag_id = #{tagId,jdbcType=INTEGER}, 
    hq_type = #{hqType,jdbcType=VARCHAR}, 
    history_sevenday_sales_amazon = #{historySevendaySalesAmazon,jdbcType=DECIMAL}, 
    history_fourteenday_sales_amazon = #{historyFourteendaySalesAmazon,jdbcType=DECIMAL}, 
    history_thirtyday_sales_amazon = #{historyThirtydaySalesAmazon,jdbcType=DECIMAL}, 
    dc_auto_sales_forecast_config_id = #{dcAutoSalesForecastConfigId,jdbcType=INTEGER}, 
    is_out_stock = #{isOutStock,jdbcType=INTEGER}, 
    dc_auto_sales_forecast_stage_config_id = #{dcAutoSalesForecastStageConfigId,jdbcType=INTEGER}, 
    dc_auto_sales_forecast_title = #{dcAutoSalesForecastTitle,jdbcType=VARCHAR}, 
    head_transport_type = #{headTransportType,jdbcType=VARCHAR}, 
    head_transport_logistics_code = #{headTransportLogisticsCode,jdbcType=VARCHAR}, 
    auto_replace_logistics_task_id = #{autoReplaceLogisticsTaskId,jdbcType=INTEGER}, 
    sales_details = #{salesDetails,jdbcType=LONGVARCHAR}, 
    short_supply_details = #{shortSupplyDetails,jdbcType=LONGVARCHAR}, 
    sales_details_formula = #{salesDetailsFormula,jdbcType=LONGVARCHAR}
  </insert>
  <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" 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_auto_turnover
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
  <select id="selectOneByExampleWithBLOBs" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" resultMap="ResultMapWithBLOBs">
    <!--
      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" />
    ,
    <include refid="Blob_Column_List" />
    from dc_auto_turnover
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>



  <delete id="truncateAutoInboundTable">
    TRUNCATE dc_auto_inbound
  </delete>
  <delete id="truncateAutoInventoryTable">
    TRUNCATE dc_auto_inventory
  </delete>
  <delete id="truncateAutoShortSupplyTable">
    TRUNCATE dc_auto_short_supply
  </delete>
  <delete id="truncateAutoTurnoverTable">
    TRUNCATE dc_auto_turnover
  </delete>
  <delete id="truncateAutoSalesTable">
    TRUNCATE dc_auto_sales
  </delete>
  <delete id="truncateAutoExceptionTable">
    TRUNCATE dc_auto_exception
  </delete>

  <select id="yesterdayStock" resultType="java.lang.Integer">
    select usable_stock from dc_daily_stock where bailun_sku=#{bailun_sku} and warehouse_code=#{warehouse_code} and record_time=DATE_SUB(curdate(),INTERVAL 2 DAY)
  </select>

</mapper>