<?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.DcAutoSalesMapper">
    <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcAutoSales">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="forecast_formula" jdbcType="VARCHAR" property="forecastFormula"/>
        <result column="bailun_sku" jdbcType="VARCHAR" property="bailunSku"/>
        <result column="title" jdbcType="VARCHAR" property="title"/>
        <result column="warehouse_code" jdbcType="VARCHAR" property="warehouseCode"/>
        <result column="category_id" jdbcType="INTEGER" property="categoryId"/>
        <result column="oneday_sales" jdbcType="INTEGER" property="onedaySales"/>
        <result column="twoday_sales" jdbcType="INTEGER" property="twodaySales"/>
        <result column="threeday_sales" jdbcType="INTEGER" property="threedaySales"/>
        <result column="fourthday_sales" jdbcType="INTEGER" property="fourthdaySales"/>
        <result column="fiveday_sales" jdbcType="INTEGER" property="fivedaySales"/>
        <result column="sixday_sales" jdbcType="INTEGER" property="sixdaySales"/>
        <result column="sevenday_sales" jdbcType="INTEGER" property="sevendaySales"/>
        <result column="eightday_sales" jdbcType="INTEGER" property="eightdaySales"/>
        <result column="nineday_sales" jdbcType="INTEGER" property="ninedaySales"/>
        <result column="tenday_sales" jdbcType="INTEGER" property="tendaySales"/>
        <result column="elevenday_sales" jdbcType="INTEGER" property="elevendaySales"/>
        <result column="twelveday_sales" jdbcType="INTEGER" property="twelvedaySales"/>
        <result column="thridteenday_sales" jdbcType="INTEGER" property="thridteendaySales"/>
        <result column="fourteenday_sales" jdbcType="INTEGER" property="fourteendaySales"/>
        <result column="fifteenday_sales" jdbcType="INTEGER" property="fifteendaySales"/>
        <result column="sixteenday_sales" jdbcType="INTEGER" property="sixteendaySales"/>
        <result column="seventeenday_sales" jdbcType="INTEGER" property="seventeendaySales"/>
        <result column="eighteenday_sales" jdbcType="INTEGER" property="eighteendaySales"/>
        <result column="nineteenday_sales" jdbcType="INTEGER" property="nineteendaySales"/>
        <result column="twentyday_sales" jdbcType="INTEGER" property="twentydaySales"/>
        <result column="twenty_oneday_sales" jdbcType="INTEGER" property="twentyOnedaySales"/>
        <result column="twenty_twoday_sales" jdbcType="INTEGER" property="twentyTwodaySales"/>
        <result column="twenty_threeday_sales" jdbcType="INTEGER" property="twentyThreedaySales"/>
        <result column="twenty_fourthday_sales" jdbcType="INTEGER" property="twentyFourthdaySales"/>
        <result column="twenty_fiveday_sales" jdbcType="INTEGER" property="twentyFivedaySales"/>
        <result column="twenty_sixday_sales" jdbcType="INTEGER" property="twentySixdaySales"/>
        <result column="twenty_seveneday_sales" jdbcType="INTEGER" property="twentySevenedaySales"/>
        <result column="twenty_eightday_sales" jdbcType="INTEGER" property="twentyEightdaySales"/>
        <result column="twenty_nineday_sales" jdbcType="INTEGER" property="twentyNinedaySales"/>
        <result column="thirtyday_sales" jdbcType="INTEGER" property="thirtydaySales"/>
        <result column="warehouse_name" jdbcType="VARCHAR" property="warehouseName"/>
        <result column="forecast_today_sales" jdbcType="DECIMAL" property="forecastTodaySales"/>
        <result column="forecast_oneday_sales" jdbcType="DECIMAL" property="forecastOnedaySales"/>
        <result column="forecast_twoday_sales" jdbcType="DECIMAL" property="forecastTwodaySales"/>
        <result column="forecast_threeday_sales" jdbcType="DECIMAL" property="forecastThreedaySales"/>
        <result column="forecast_fourthday_sales" jdbcType="DECIMAL" property="forecastFourthdaySales"/>
        <result column="forecast_fiveday_sales" jdbcType="DECIMAL" property="forecastFivedaySales"/>
        <result column="forecast_sixday_sales" jdbcType="DECIMAL" property="forecastSixdaySales"/>
        <result column="forecast_sevenday_sales" jdbcType="DECIMAL" property="forecastSevendaySales"/>
        <result column="forecast_eightday_sales" jdbcType="DECIMAL" property="forecastEightdaySales"/>
        <result column="forecast_nineday_sales" jdbcType="DECIMAL" property="forecastNinedaySales"/>
        <result column="forecast_tenday_sales" jdbcType="DECIMAL" property="forecastTendaySales"/>
        <result column="forecast_elevenday_sales" jdbcType="DECIMAL" property="forecastElevendaySales"/>
        <result column="forecast_twelveday_sales" jdbcType="DECIMAL" property="forecastTwelvedaySales"/>
        <result column="forecast_thridteenday_sales" jdbcType="DECIMAL" property="forecastThridteendaySales"/>
        <result column="forecast_fourteenday_sales" jdbcType="DECIMAL" property="forecastFourteendaySales"/>
        <result column="forecast_fifteenday_sales" jdbcType="DECIMAL" property="forecastFifteendaySales"/>
        <result column="forecast_sixteenday_sales" jdbcType="DECIMAL" property="forecastSixteendaySales"/>
        <result column="forecast_seventeenday_sales" jdbcType="DECIMAL" property="forecastSeventeendaySales"/>
        <result column="forecast_eighteenday_sales" jdbcType="DECIMAL" property="forecastEighteendaySales"/>
        <result column="forecast_nineteenday_sales" jdbcType="DECIMAL" property="forecastNineteendaySales"/>
        <result column="forecast_twentyday_sales" jdbcType="DECIMAL" property="forecastTwentydaySales"/>
        <result column="forecast_twenty_oneday_sales" jdbcType="DECIMAL" property="forecastTwentyOnedaySales"/>
        <result column="forecast_twenty_twoday_sales" jdbcType="DECIMAL" property="forecastTwentyTwodaySales"/>
        <result column="forecast_twenty_threeday_sales" jdbcType="DECIMAL" property="forecastTwentyThreedaySales"/>
        <result column="forecast_twenty_fourthday_sales" jdbcType="DECIMAL" property="forecastTwentyFourthdaySales"/>
        <result column="forecast_twenty_fiveday_sales" jdbcType="DECIMAL" property="forecastTwentyFivedaySales"/>
        <result column="forecast_twenty_sixday_sales" jdbcType="DECIMAL" property="forecastTwentySixdaySales"/>
        <result column="forecast_twenty_seveneday_sales" jdbcType="DECIMAL" property="forecastTwentySevenedaySales"/>
        <result column="forecast_twenty_eightday_sales" jdbcType="DECIMAL" property="forecastTwentyEightdaySales"/>
        <result column="forecast_twenty_nineday_sales" jdbcType="DECIMAL" property="forecastTwentyNinedaySales"/>
        <result column="forecast_thirtyday_sales" jdbcType="DECIMAL" property="forecastThirtydaySales"/>
        <result column="k_variable" jdbcType="DECIMAL" property="kVariable"/>
        <result column="b_variable" jdbcType="DECIMAL" property="bVariable"/>
        <result column="r_variable" jdbcType="DECIMAL" property="rVariable"/>
        <result column="average_sales" jdbcType="DECIMAL" property="averageSales"/>
        <result column="details" jdbcType="VARCHAR" property="details"/>
        <result column="fit_a_variable" jdbcType="DECIMAL" property="fitAVariable"/>
        <result column="fit_b_variable" jdbcType="DECIMAL" property="fitBVariable"/>
        <result column="fit_r_variable" jdbcType="DECIMAL" property="fitRVariable"/>
        <result column="fit_forecast_formula" jdbcType="VARCHAR" property="fitForecastFormula"/>
        <result column="history_sales_details" jdbcType="VARCHAR" property="historySalesDetails"/>
        <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>
        <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified"/>
    </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, forecast_formula, bailun_sku, title, warehouse_code, category_id, oneday_sales,
        twoday_sales, threeday_sales, fourthday_sales, fiveday_sales, sixday_sales, sevenday_sales,
        eightday_sales, nineday_sales, tenday_sales, elevenday_sales, twelveday_sales, thridteenday_sales,
        fourteenday_sales, fifteenday_sales, sixteenday_sales, seventeenday_sales, eighteenday_sales,
        nineteenday_sales, twentyday_sales, twenty_oneday_sales, twenty_twoday_sales, twenty_threeday_sales,
        twenty_fourthday_sales, twenty_fiveday_sales, twenty_sixday_sales, twenty_seveneday_sales,
        twenty_eightday_sales, twenty_nineday_sales, thirtyday_sales, warehouse_name, forecast_today_sales,
        forecast_oneday_sales, forecast_twoday_sales, forecast_threeday_sales, forecast_fourthday_sales,
        forecast_fiveday_sales, forecast_sixday_sales, forecast_sevenday_sales, forecast_eightday_sales,
        forecast_nineday_sales, forecast_tenday_sales, forecast_elevenday_sales, forecast_twelveday_sales,
        forecast_thridteenday_sales, forecast_fourteenday_sales, forecast_fifteenday_sales,
        forecast_sixteenday_sales, forecast_seventeenday_sales, forecast_eighteenday_sales,
        forecast_nineteenday_sales, forecast_twentyday_sales, forecast_twenty_oneday_sales,
        forecast_twenty_twoday_sales, forecast_twenty_threeday_sales, forecast_twenty_fourthday_sales,
        forecast_twenty_fiveday_sales, forecast_twenty_sixday_sales, forecast_twenty_seveneday_sales,
        forecast_twenty_eightday_sales, forecast_twenty_nineday_sales, forecast_thirtyday_sales,
        k_variable, b_variable, r_variable, average_sales, details, fit_a_variable, fit_b_variable,
        fit_r_variable, fit_forecast_formula, history_sales_details, gmt_create, gmt_modified
    </sql>
    <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAutoSalesExample"
            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_sales
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
        <if test="orderByClause != null">
            order by ${orderByClause}
        </if>
        <if test="rows != null">
            <if test="offset != null">
                limit ${offset}, ${rows}
            </if>
            <if test="offset == null">
                limit ${rows}
            </if>
        </if>
    </select>
    <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        select
        <include refid="Base_Column_List"/>
        from dc_auto_sales
        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_sales
        where id = #{id,jdbcType=INTEGER}
    </delete>
    <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcAutoSalesExample">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        delete from dc_auto_sales
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
    </delete>
    <insert id="insert" parameterType="com.bailuntec.domain.entity.DcAutoSales">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into dc_auto_sales (id, forecast_formula, bailun_sku,
        title, warehouse_code, category_id,
        oneday_sales, twoday_sales, threeday_sales,
        fourthday_sales, fiveday_sales, sixday_sales,
        sevenday_sales, eightday_sales, nineday_sales,
        tenday_sales, elevenday_sales, twelveday_sales,
        thridteenday_sales, fourteenday_sales, fifteenday_sales,
        sixteenday_sales, seventeenday_sales, eighteenday_sales,
        nineteenday_sales, twentyday_sales, twenty_oneday_sales,
        twenty_twoday_sales, twenty_threeday_sales,
        twenty_fourthday_sales, twenty_fiveday_sales,
        twenty_sixday_sales, twenty_seveneday_sales,
        twenty_eightday_sales, twenty_nineday_sales,
        thirtyday_sales, warehouse_name, forecast_today_sales,
        forecast_oneday_sales, forecast_twoday_sales,
        forecast_threeday_sales, forecast_fourthday_sales,
        forecast_fiveday_sales, forecast_sixday_sales,
        forecast_sevenday_sales, forecast_eightday_sales,
        forecast_nineday_sales, forecast_tenday_sales,
        forecast_elevenday_sales, forecast_twelveday_sales,
        forecast_thridteenday_sales, forecast_fourteenday_sales,
        forecast_fifteenday_sales, forecast_sixteenday_sales,
        forecast_seventeenday_sales, forecast_eighteenday_sales,
        forecast_nineteenday_sales, forecast_twentyday_sales,
        forecast_twenty_oneday_sales, forecast_twenty_twoday_sales,
        forecast_twenty_threeday_sales, forecast_twenty_fourthday_sales,
        forecast_twenty_fiveday_sales, forecast_twenty_sixday_sales,
        forecast_twenty_seveneday_sales, forecast_twenty_eightday_sales,
        forecast_twenty_nineday_sales, forecast_thirtyday_sales,
        k_variable, b_variable, r_variable,
        average_sales, details, fit_a_variable,
        fit_b_variable, fit_r_variable, fit_forecast_formula,
        history_sales_details, gmt_create, gmt_modified
        )
        values (#{id,jdbcType=INTEGER}, #{forecastFormula,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR},
        #{title,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR}, #{categoryId,jdbcType=INTEGER},
        #{onedaySales,jdbcType=INTEGER}, #{twodaySales,jdbcType=INTEGER}, #{threedaySales,jdbcType=INTEGER},
        #{fourthdaySales,jdbcType=INTEGER}, #{fivedaySales,jdbcType=INTEGER}, #{sixdaySales,jdbcType=INTEGER},
        #{sevendaySales,jdbcType=INTEGER}, #{eightdaySales,jdbcType=INTEGER}, #{ninedaySales,jdbcType=INTEGER},
        #{tendaySales,jdbcType=INTEGER}, #{elevendaySales,jdbcType=INTEGER}, #{twelvedaySales,jdbcType=INTEGER},
        #{thridteendaySales,jdbcType=INTEGER}, #{fourteendaySales,jdbcType=INTEGER},
        #{fifteendaySales,jdbcType=INTEGER},
        #{sixteendaySales,jdbcType=INTEGER}, #{seventeendaySales,jdbcType=INTEGER},
        #{eighteendaySales,jdbcType=INTEGER},
        #{nineteendaySales,jdbcType=INTEGER}, #{twentydaySales,jdbcType=INTEGER}, #{twentyOnedaySales,jdbcType=INTEGER},
        #{twentyTwodaySales,jdbcType=INTEGER}, #{twentyThreedaySales,jdbcType=INTEGER},
        #{twentyFourthdaySales,jdbcType=INTEGER}, #{twentyFivedaySales,jdbcType=INTEGER},
        #{twentySixdaySales,jdbcType=INTEGER}, #{twentySevenedaySales,jdbcType=INTEGER},
        #{twentyEightdaySales,jdbcType=INTEGER}, #{twentyNinedaySales,jdbcType=INTEGER},
        #{thirtydaySales,jdbcType=INTEGER}, #{warehouseName,jdbcType=VARCHAR}, #{forecastTodaySales,jdbcType=DECIMAL},
        #{forecastOnedaySales,jdbcType=DECIMAL}, #{forecastTwodaySales,jdbcType=DECIMAL},
        #{forecastThreedaySales,jdbcType=DECIMAL}, #{forecastFourthdaySales,jdbcType=DECIMAL},
        #{forecastFivedaySales,jdbcType=DECIMAL}, #{forecastSixdaySales,jdbcType=DECIMAL},
        #{forecastSevendaySales,jdbcType=DECIMAL}, #{forecastEightdaySales,jdbcType=DECIMAL},
        #{forecastNinedaySales,jdbcType=DECIMAL}, #{forecastTendaySales,jdbcType=DECIMAL},
        #{forecastElevendaySales,jdbcType=DECIMAL}, #{forecastTwelvedaySales,jdbcType=DECIMAL},
        #{forecastThridteendaySales,jdbcType=DECIMAL}, #{forecastFourteendaySales,jdbcType=DECIMAL},
        #{forecastFifteendaySales,jdbcType=DECIMAL}, #{forecastSixteendaySales,jdbcType=DECIMAL},
        #{forecastSeventeendaySales,jdbcType=DECIMAL}, #{forecastEighteendaySales,jdbcType=DECIMAL},
        #{forecastNineteendaySales,jdbcType=DECIMAL}, #{forecastTwentydaySales,jdbcType=DECIMAL},
        #{forecastTwentyOnedaySales,jdbcType=DECIMAL}, #{forecastTwentyTwodaySales,jdbcType=DECIMAL},
        #{forecastTwentyThreedaySales,jdbcType=DECIMAL}, #{forecastTwentyFourthdaySales,jdbcType=DECIMAL},
        #{forecastTwentyFivedaySales,jdbcType=DECIMAL}, #{forecastTwentySixdaySales,jdbcType=DECIMAL},
        #{forecastTwentySevenedaySales,jdbcType=DECIMAL}, #{forecastTwentyEightdaySales,jdbcType=DECIMAL},
        #{forecastTwentyNinedaySales,jdbcType=DECIMAL}, #{forecastThirtydaySales,jdbcType=DECIMAL},
        #{kVariable,jdbcType=DECIMAL}, #{bVariable,jdbcType=DECIMAL}, #{rVariable,jdbcType=DECIMAL},
        #{averageSales,jdbcType=DECIMAL}, #{details,jdbcType=VARCHAR}, #{fitAVariable,jdbcType=DECIMAL},
        #{fitBVariable,jdbcType=DECIMAL}, #{fitRVariable,jdbcType=DECIMAL}, #{fitForecastFormula,jdbcType=VARCHAR},
        #{historySalesDetails,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}
        )
    </insert>
    <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAutoSales">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into dc_auto_sales
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="forecastFormula != null">
                forecast_formula,
            </if>
            <if test="bailunSku != null">
                bailun_sku,
            </if>
            <if test="title != null">
                title,
            </if>
            <if test="warehouseCode != null">
                warehouse_code,
            </if>
            <if test="categoryId != null">
                category_id,
            </if>
            <if test="onedaySales != null">
                oneday_sales,
            </if>
            <if test="twodaySales != null">
                twoday_sales,
            </if>
            <if test="threedaySales != null">
                threeday_sales,
            </if>
            <if test="fourthdaySales != null">
                fourthday_sales,
            </if>
            <if test="fivedaySales != null">
                fiveday_sales,
            </if>
            <if test="sixdaySales != null">
                sixday_sales,
            </if>
            <if test="sevendaySales != null">
                sevenday_sales,
            </if>
            <if test="eightdaySales != null">
                eightday_sales,
            </if>
            <if test="ninedaySales != null">
                nineday_sales,
            </if>
            <if test="tendaySales != null">
                tenday_sales,
            </if>
            <if test="elevendaySales != null">
                elevenday_sales,
            </if>
            <if test="twelvedaySales != null">
                twelveday_sales,
            </if>
            <if test="thridteendaySales != null">
                thridteenday_sales,
            </if>
            <if test="fourteendaySales != null">
                fourteenday_sales,
            </if>
            <if test="fifteendaySales != null">
                fifteenday_sales,
            </if>
            <if test="sixteendaySales != null">
                sixteenday_sales,
            </if>
            <if test="seventeendaySales != null">
                seventeenday_sales,
            </if>
            <if test="eighteendaySales != null">
                eighteenday_sales,
            </if>
            <if test="nineteendaySales != null">
                nineteenday_sales,
            </if>
            <if test="twentydaySales != null">
                twentyday_sales,
            </if>
            <if test="twentyOnedaySales != null">
                twenty_oneday_sales,
            </if>
            <if test="twentyTwodaySales != null">
                twenty_twoday_sales,
            </if>
            <if test="twentyThreedaySales != null">
                twenty_threeday_sales,
            </if>
            <if test="twentyFourthdaySales != null">
                twenty_fourthday_sales,
            </if>
            <if test="twentyFivedaySales != null">
                twenty_fiveday_sales,
            </if>
            <if test="twentySixdaySales != null">
                twenty_sixday_sales,
            </if>
            <if test="twentySevenedaySales != null">
                twenty_seveneday_sales,
            </if>
            <if test="twentyEightdaySales != null">
                twenty_eightday_sales,
            </if>
            <if test="twentyNinedaySales != null">
                twenty_nineday_sales,
            </if>
            <if test="thirtydaySales != null">
                thirtyday_sales,
            </if>
            <if test="warehouseName != null">
                warehouse_name,
            </if>
            <if test="forecastTodaySales != null">
                forecast_today_sales,
            </if>
            <if test="forecastOnedaySales != null">
                forecast_oneday_sales,
            </if>
            <if test="forecastTwodaySales != null">
                forecast_twoday_sales,
            </if>
            <if test="forecastThreedaySales != null">
                forecast_threeday_sales,
            </if>
            <if test="forecastFourthdaySales != null">
                forecast_fourthday_sales,
            </if>
            <if test="forecastFivedaySales != null">
                forecast_fiveday_sales,
            </if>
            <if test="forecastSixdaySales != null">
                forecast_sixday_sales,
            </if>
            <if test="forecastSevendaySales != null">
                forecast_sevenday_sales,
            </if>
            <if test="forecastEightdaySales != null">
                forecast_eightday_sales,
            </if>
            <if test="forecastNinedaySales != null">
                forecast_nineday_sales,
            </if>
            <if test="forecastTendaySales != null">
                forecast_tenday_sales,
            </if>
            <if test="forecastElevendaySales != null">
                forecast_elevenday_sales,
            </if>
            <if test="forecastTwelvedaySales != null">
                forecast_twelveday_sales,
            </if>
            <if test="forecastThridteendaySales != null">
                forecast_thridteenday_sales,
            </if>
            <if test="forecastFourteendaySales != null">
                forecast_fourteenday_sales,
            </if>
            <if test="forecastFifteendaySales != null">
                forecast_fifteenday_sales,
            </if>
            <if test="forecastSixteendaySales != null">
                forecast_sixteenday_sales,
            </if>
            <if test="forecastSeventeendaySales != null">
                forecast_seventeenday_sales,
            </if>
            <if test="forecastEighteendaySales != null">
                forecast_eighteenday_sales,
            </if>
            <if test="forecastNineteendaySales != null">
                forecast_nineteenday_sales,
            </if>
            <if test="forecastTwentydaySales != null">
                forecast_twentyday_sales,
            </if>
            <if test="forecastTwentyOnedaySales != null">
                forecast_twenty_oneday_sales,
            </if>
            <if test="forecastTwentyTwodaySales != null">
                forecast_twenty_twoday_sales,
            </if>
            <if test="forecastTwentyThreedaySales != null">
                forecast_twenty_threeday_sales,
            </if>
            <if test="forecastTwentyFourthdaySales != null">
                forecast_twenty_fourthday_sales,
            </if>
            <if test="forecastTwentyFivedaySales != null">
                forecast_twenty_fiveday_sales,
            </if>
            <if test="forecastTwentySixdaySales != null">
                forecast_twenty_sixday_sales,
            </if>
            <if test="forecastTwentySevenedaySales != null">
                forecast_twenty_seveneday_sales,
            </if>
            <if test="forecastTwentyEightdaySales != null">
                forecast_twenty_eightday_sales,
            </if>
            <if test="forecastTwentyNinedaySales != null">
                forecast_twenty_nineday_sales,
            </if>
            <if test="forecastThirtydaySales != null">
                forecast_thirtyday_sales,
            </if>
            <if test="kVariable != null">
                k_variable,
            </if>
            <if test="bVariable != null">
                b_variable,
            </if>
            <if test="rVariable != null">
                r_variable,
            </if>
            <if test="averageSales != null">
                average_sales,
            </if>
            <if test="details != null">
                details,
            </if>
            <if test="fitAVariable != null">
                fit_a_variable,
            </if>
            <if test="fitBVariable != null">
                fit_b_variable,
            </if>
            <if test="fitRVariable != null">
                fit_r_variable,
            </if>
            <if test="fitForecastFormula != null">
                fit_forecast_formula,
            </if>
            <if test="historySalesDetails != null">
                history_sales_details,
            </if>
            <if test="gmtCreate != null">
                gmt_create,
            </if>
            <if test="gmtModified != null">
                gmt_modified,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=INTEGER},
            </if>
            <if test="forecastFormula != null">
                #{forecastFormula,jdbcType=VARCHAR},
            </if>
            <if test="bailunSku != null">
                #{bailunSku,jdbcType=VARCHAR},
            </if>
            <if test="title != null">
                #{title,jdbcType=VARCHAR},
            </if>
            <if test="warehouseCode != null">
                #{warehouseCode,jdbcType=VARCHAR},
            </if>
            <if test="categoryId != null">
                #{categoryId,jdbcType=INTEGER},
            </if>
            <if test="onedaySales != null">
                #{onedaySales,jdbcType=INTEGER},
            </if>
            <if test="twodaySales != null">
                #{twodaySales,jdbcType=INTEGER},
            </if>
            <if test="threedaySales != null">
                #{threedaySales,jdbcType=INTEGER},
            </if>
            <if test="fourthdaySales != null">
                #{fourthdaySales,jdbcType=INTEGER},
            </if>
            <if test="fivedaySales != null">
                #{fivedaySales,jdbcType=INTEGER},
            </if>
            <if test="sixdaySales != null">
                #{sixdaySales,jdbcType=INTEGER},
            </if>
            <if test="sevendaySales != null">
                #{sevendaySales,jdbcType=INTEGER},
            </if>
            <if test="eightdaySales != null">
                #{eightdaySales,jdbcType=INTEGER},
            </if>
            <if test="ninedaySales != null">
                #{ninedaySales,jdbcType=INTEGER},
            </if>
            <if test="tendaySales != null">
                #{tendaySales,jdbcType=INTEGER},
            </if>
            <if test="elevendaySales != null">
                #{elevendaySales,jdbcType=INTEGER},
            </if>
            <if test="twelvedaySales != null">
                #{twelvedaySales,jdbcType=INTEGER},
            </if>
            <if test="thridteendaySales != null">
                #{thridteendaySales,jdbcType=INTEGER},
            </if>
            <if test="fourteendaySales != null">
                #{fourteendaySales,jdbcType=INTEGER},
            </if>
            <if test="fifteendaySales != null">
                #{fifteendaySales,jdbcType=INTEGER},
            </if>
            <if test="sixteendaySales != null">
                #{sixteendaySales,jdbcType=INTEGER},
            </if>
            <if test="seventeendaySales != null">
                #{seventeendaySales,jdbcType=INTEGER},
            </if>
            <if test="eighteendaySales != null">
                #{eighteendaySales,jdbcType=INTEGER},
            </if>
            <if test="nineteendaySales != null">
                #{nineteendaySales,jdbcType=INTEGER},
            </if>
            <if test="twentydaySales != null">
                #{twentydaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyOnedaySales != null">
                #{twentyOnedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyTwodaySales != null">
                #{twentyTwodaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyThreedaySales != null">
                #{twentyThreedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyFourthdaySales != null">
                #{twentyFourthdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyFivedaySales != null">
                #{twentyFivedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentySixdaySales != null">
                #{twentySixdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentySevenedaySales != null">
                #{twentySevenedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyEightdaySales != null">
                #{twentyEightdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyNinedaySales != null">
                #{twentyNinedaySales,jdbcType=INTEGER},
            </if>
            <if test="thirtydaySales != null">
                #{thirtydaySales,jdbcType=INTEGER},
            </if>
            <if test="warehouseName != null">
                #{warehouseName,jdbcType=VARCHAR},
            </if>
            <if test="forecastTodaySales != null">
                #{forecastTodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastOnedaySales != null">
                #{forecastOnedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwodaySales != null">
                #{forecastTwodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThreedaySales != null">
                #{forecastThreedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFourthdaySales != null">
                #{forecastFourthdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFivedaySales != null">
                #{forecastFivedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSixdaySales != null">
                #{forecastSixdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSevendaySales != null">
                #{forecastSevendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastEightdaySales != null">
                #{forecastEightdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastNinedaySales != null">
                #{forecastNinedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTendaySales != null">
                #{forecastTendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastElevendaySales != null">
                #{forecastElevendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwelvedaySales != null">
                #{forecastTwelvedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThridteendaySales != null">
                #{forecastThridteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFourteendaySales != null">
                #{forecastFourteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFifteendaySales != null">
                #{forecastFifteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSixteendaySales != null">
                #{forecastSixteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSeventeendaySales != null">
                #{forecastSeventeendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastEighteendaySales != null">
                #{forecastEighteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastNineteendaySales != null">
                #{forecastNineteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentydaySales != null">
                #{forecastTwentydaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyOnedaySales != null">
                #{forecastTwentyOnedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyTwodaySales != null">
                #{forecastTwentyTwodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyThreedaySales != null">
                #{forecastTwentyThreedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyFourthdaySales != null">
                #{forecastTwentyFourthdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyFivedaySales != null">
                #{forecastTwentyFivedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentySixdaySales != null">
                #{forecastTwentySixdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentySevenedaySales != null">
                #{forecastTwentySevenedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyEightdaySales != null">
                #{forecastTwentyEightdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyNinedaySales != null">
                #{forecastTwentyNinedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThirtydaySales != null">
                #{forecastThirtydaySales,jdbcType=DECIMAL},
            </if>
            <if test="kVariable != null">
                #{kVariable,jdbcType=DECIMAL},
            </if>
            <if test="bVariable != null">
                #{bVariable,jdbcType=DECIMAL},
            </if>
            <if test="rVariable != null">
                #{rVariable,jdbcType=DECIMAL},
            </if>
            <if test="averageSales != null">
                #{averageSales,jdbcType=DECIMAL},
            </if>
            <if test="details != null">
                #{details,jdbcType=VARCHAR},
            </if>
            <if test="fitAVariable != null">
                #{fitAVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitBVariable != null">
                #{fitBVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitRVariable != null">
                #{fitRVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitForecastFormula != null">
                #{fitForecastFormula,jdbcType=VARCHAR},
            </if>
            <if test="historySalesDetails != null">
                #{historySalesDetails,jdbcType=VARCHAR},
            </if>
            <if test="gmtCreate != null">
                #{gmtCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="gmtModified != null">
                #{gmtModified,jdbcType=TIMESTAMP},
            </if>
        </trim>
    </insert>
    <select id="countByExample" parameterType="com.bailuntec.domain.example.DcAutoSalesExample"
            resultType="java.lang.Long">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        select count(*) from dc_auto_sales
        <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_sales
        <set>
            <if test="record.id != null">
                id = #{record.id,jdbcType=INTEGER},
            </if>
            <if test="record.forecastFormula != null">
                forecast_formula = #{record.forecastFormula,jdbcType=VARCHAR},
            </if>
            <if test="record.bailunSku != null">
                bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
            </if>
            <if test="record.title != null">
                title = #{record.title,jdbcType=VARCHAR},
            </if>
            <if test="record.warehouseCode != null">
                warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
            </if>
            <if test="record.categoryId != null">
                category_id = #{record.categoryId,jdbcType=INTEGER},
            </if>
            <if test="record.onedaySales != null">
                oneday_sales = #{record.onedaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twodaySales != null">
                twoday_sales = #{record.twodaySales,jdbcType=INTEGER},
            </if>
            <if test="record.threedaySales != null">
                threeday_sales = #{record.threedaySales,jdbcType=INTEGER},
            </if>
            <if test="record.fourthdaySales != null">
                fourthday_sales = #{record.fourthdaySales,jdbcType=INTEGER},
            </if>
            <if test="record.fivedaySales != null">
                fiveday_sales = #{record.fivedaySales,jdbcType=INTEGER},
            </if>
            <if test="record.sixdaySales != null">
                sixday_sales = #{record.sixdaySales,jdbcType=INTEGER},
            </if>
            <if test="record.sevendaySales != null">
                sevenday_sales = #{record.sevendaySales,jdbcType=INTEGER},
            </if>
            <if test="record.eightdaySales != null">
                eightday_sales = #{record.eightdaySales,jdbcType=INTEGER},
            </if>
            <if test="record.ninedaySales != null">
                nineday_sales = #{record.ninedaySales,jdbcType=INTEGER},
            </if>
            <if test="record.tendaySales != null">
                tenday_sales = #{record.tendaySales,jdbcType=INTEGER},
            </if>
            <if test="record.elevendaySales != null">
                elevenday_sales = #{record.elevendaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twelvedaySales != null">
                twelveday_sales = #{record.twelvedaySales,jdbcType=INTEGER},
            </if>
            <if test="record.thridteendaySales != null">
                thridteenday_sales = #{record.thridteendaySales,jdbcType=INTEGER},
            </if>
            <if test="record.fourteendaySales != null">
                fourteenday_sales = #{record.fourteendaySales,jdbcType=INTEGER},
            </if>
            <if test="record.fifteendaySales != null">
                fifteenday_sales = #{record.fifteendaySales,jdbcType=INTEGER},
            </if>
            <if test="record.sixteendaySales != null">
                sixteenday_sales = #{record.sixteendaySales,jdbcType=INTEGER},
            </if>
            <if test="record.seventeendaySales != null">
                seventeenday_sales = #{record.seventeendaySales,jdbcType=INTEGER},
            </if>
            <if test="record.eighteendaySales != null">
                eighteenday_sales = #{record.eighteendaySales,jdbcType=INTEGER},
            </if>
            <if test="record.nineteendaySales != null">
                nineteenday_sales = #{record.nineteendaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twentydaySales != null">
                twentyday_sales = #{record.twentydaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twentyOnedaySales != null">
                twenty_oneday_sales = #{record.twentyOnedaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twentyTwodaySales != null">
                twenty_twoday_sales = #{record.twentyTwodaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twentyThreedaySales != null">
                twenty_threeday_sales = #{record.twentyThreedaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twentyFourthdaySales != null">
                twenty_fourthday_sales = #{record.twentyFourthdaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twentyFivedaySales != null">
                twenty_fiveday_sales = #{record.twentyFivedaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twentySixdaySales != null">
                twenty_sixday_sales = #{record.twentySixdaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twentySevenedaySales != null">
                twenty_seveneday_sales = #{record.twentySevenedaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twentyEightdaySales != null">
                twenty_eightday_sales = #{record.twentyEightdaySales,jdbcType=INTEGER},
            </if>
            <if test="record.twentyNinedaySales != null">
                twenty_nineday_sales = #{record.twentyNinedaySales,jdbcType=INTEGER},
            </if>
            <if test="record.thirtydaySales != null">
                thirtyday_sales = #{record.thirtydaySales,jdbcType=INTEGER},
            </if>
            <if test="record.warehouseName != null">
                warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
            </if>
            <if test="record.forecastTodaySales != null">
                forecast_today_sales = #{record.forecastTodaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastOnedaySales != null">
                forecast_oneday_sales = #{record.forecastOnedaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwodaySales != null">
                forecast_twoday_sales = #{record.forecastTwodaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastThreedaySales != null">
                forecast_threeday_sales = #{record.forecastThreedaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastFourthdaySales != null">
                forecast_fourthday_sales = #{record.forecastFourthdaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastFivedaySales != null">
                forecast_fiveday_sales = #{record.forecastFivedaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastSixdaySales != null">
                forecast_sixday_sales = #{record.forecastSixdaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastSevendaySales != null">
                forecast_sevenday_sales = #{record.forecastSevendaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastEightdaySales != null">
                forecast_eightday_sales = #{record.forecastEightdaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastNinedaySales != null">
                forecast_nineday_sales = #{record.forecastNinedaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTendaySales != null">
                forecast_tenday_sales = #{record.forecastTendaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastElevendaySales != null">
                forecast_elevenday_sales = #{record.forecastElevendaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwelvedaySales != null">
                forecast_twelveday_sales = #{record.forecastTwelvedaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastThridteendaySales != null">
                forecast_thridteenday_sales = #{record.forecastThridteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastFourteendaySales != null">
                forecast_fourteenday_sales = #{record.forecastFourteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastFifteendaySales != null">
                forecast_fifteenday_sales = #{record.forecastFifteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastSixteendaySales != null">
                forecast_sixteenday_sales = #{record.forecastSixteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastSeventeendaySales != null">
                forecast_seventeenday_sales = #{record.forecastSeventeendaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastEighteendaySales != null">
                forecast_eighteenday_sales = #{record.forecastEighteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastNineteendaySales != null">
                forecast_nineteenday_sales = #{record.forecastNineteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwentydaySales != null">
                forecast_twentyday_sales = #{record.forecastTwentydaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwentyOnedaySales != null">
                forecast_twenty_oneday_sales = #{record.forecastTwentyOnedaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwentyTwodaySales != null">
                forecast_twenty_twoday_sales = #{record.forecastTwentyTwodaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwentyThreedaySales != null">
                forecast_twenty_threeday_sales = #{record.forecastTwentyThreedaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwentyFourthdaySales != null">
                forecast_twenty_fourthday_sales = #{record.forecastTwentyFourthdaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwentyFivedaySales != null">
                forecast_twenty_fiveday_sales = #{record.forecastTwentyFivedaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwentySixdaySales != null">
                forecast_twenty_sixday_sales = #{record.forecastTwentySixdaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwentySevenedaySales != null">
                forecast_twenty_seveneday_sales = #{record.forecastTwentySevenedaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwentyEightdaySales != null">
                forecast_twenty_eightday_sales = #{record.forecastTwentyEightdaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastTwentyNinedaySales != null">
                forecast_twenty_nineday_sales = #{record.forecastTwentyNinedaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.forecastThirtydaySales != null">
                forecast_thirtyday_sales = #{record.forecastThirtydaySales,jdbcType=DECIMAL},
            </if>
            <if test="record.kVariable != null">
                k_variable = #{record.kVariable,jdbcType=DECIMAL},
            </if>
            <if test="record.bVariable != null">
                b_variable = #{record.bVariable,jdbcType=DECIMAL},
            </if>
            <if test="record.rVariable != null">
                r_variable = #{record.rVariable,jdbcType=DECIMAL},
            </if>
            <if test="record.averageSales != null">
                average_sales = #{record.averageSales,jdbcType=DECIMAL},
            </if>
            <if test="record.details != null">
                details = #{record.details,jdbcType=VARCHAR},
            </if>
            <if test="record.fitAVariable != null">
                fit_a_variable = #{record.fitAVariable,jdbcType=DECIMAL},
            </if>
            <if test="record.fitBVariable != null">
                fit_b_variable = #{record.fitBVariable,jdbcType=DECIMAL},
            </if>
            <if test="record.fitRVariable != null">
                fit_r_variable = #{record.fitRVariable,jdbcType=DECIMAL},
            </if>
            <if test="record.fitForecastFormula != null">
                fit_forecast_formula = #{record.fitForecastFormula,jdbcType=VARCHAR},
            </if>
            <if test="record.historySalesDetails != null">
                history_sales_details = #{record.historySalesDetails,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>
        </set>
        <if test="_parameter != null">
            <include refid="Update_By_Example_Where_Clause"/>
        </if>
    </update>
    <update id="updateByExample" parameterType="map">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update dc_auto_sales
        set id = #{record.id,jdbcType=INTEGER},
        forecast_formula = #{record.forecastFormula,jdbcType=VARCHAR},
        bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
        title = #{record.title,jdbcType=VARCHAR},
        warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
        category_id = #{record.categoryId,jdbcType=INTEGER},
        oneday_sales = #{record.onedaySales,jdbcType=INTEGER},
        twoday_sales = #{record.twodaySales,jdbcType=INTEGER},
        threeday_sales = #{record.threedaySales,jdbcType=INTEGER},
        fourthday_sales = #{record.fourthdaySales,jdbcType=INTEGER},
        fiveday_sales = #{record.fivedaySales,jdbcType=INTEGER},
        sixday_sales = #{record.sixdaySales,jdbcType=INTEGER},
        sevenday_sales = #{record.sevendaySales,jdbcType=INTEGER},
        eightday_sales = #{record.eightdaySales,jdbcType=INTEGER},
        nineday_sales = #{record.ninedaySales,jdbcType=INTEGER},
        tenday_sales = #{record.tendaySales,jdbcType=INTEGER},
        elevenday_sales = #{record.elevendaySales,jdbcType=INTEGER},
        twelveday_sales = #{record.twelvedaySales,jdbcType=INTEGER},
        thridteenday_sales = #{record.thridteendaySales,jdbcType=INTEGER},
        fourteenday_sales = #{record.fourteendaySales,jdbcType=INTEGER},
        fifteenday_sales = #{record.fifteendaySales,jdbcType=INTEGER},
        sixteenday_sales = #{record.sixteendaySales,jdbcType=INTEGER},
        seventeenday_sales = #{record.seventeendaySales,jdbcType=INTEGER},
        eighteenday_sales = #{record.eighteendaySales,jdbcType=INTEGER},
        nineteenday_sales = #{record.nineteendaySales,jdbcType=INTEGER},
        twentyday_sales = #{record.twentydaySales,jdbcType=INTEGER},
        twenty_oneday_sales = #{record.twentyOnedaySales,jdbcType=INTEGER},
        twenty_twoday_sales = #{record.twentyTwodaySales,jdbcType=INTEGER},
        twenty_threeday_sales = #{record.twentyThreedaySales,jdbcType=INTEGER},
        twenty_fourthday_sales = #{record.twentyFourthdaySales,jdbcType=INTEGER},
        twenty_fiveday_sales = #{record.twentyFivedaySales,jdbcType=INTEGER},
        twenty_sixday_sales = #{record.twentySixdaySales,jdbcType=INTEGER},
        twenty_seveneday_sales = #{record.twentySevenedaySales,jdbcType=INTEGER},
        twenty_eightday_sales = #{record.twentyEightdaySales,jdbcType=INTEGER},
        twenty_nineday_sales = #{record.twentyNinedaySales,jdbcType=INTEGER},
        thirtyday_sales = #{record.thirtydaySales,jdbcType=INTEGER},
        warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
        forecast_today_sales = #{record.forecastTodaySales,jdbcType=DECIMAL},
        forecast_oneday_sales = #{record.forecastOnedaySales,jdbcType=DECIMAL},
        forecast_twoday_sales = #{record.forecastTwodaySales,jdbcType=DECIMAL},
        forecast_threeday_sales = #{record.forecastThreedaySales,jdbcType=DECIMAL},
        forecast_fourthday_sales = #{record.forecastFourthdaySales,jdbcType=DECIMAL},
        forecast_fiveday_sales = #{record.forecastFivedaySales,jdbcType=DECIMAL},
        forecast_sixday_sales = #{record.forecastSixdaySales,jdbcType=DECIMAL},
        forecast_sevenday_sales = #{record.forecastSevendaySales,jdbcType=DECIMAL},
        forecast_eightday_sales = #{record.forecastEightdaySales,jdbcType=DECIMAL},
        forecast_nineday_sales = #{record.forecastNinedaySales,jdbcType=DECIMAL},
        forecast_tenday_sales = #{record.forecastTendaySales,jdbcType=DECIMAL},
        forecast_elevenday_sales = #{record.forecastElevendaySales,jdbcType=DECIMAL},
        forecast_twelveday_sales = #{record.forecastTwelvedaySales,jdbcType=DECIMAL},
        forecast_thridteenday_sales = #{record.forecastThridteendaySales,jdbcType=DECIMAL},
        forecast_fourteenday_sales = #{record.forecastFourteendaySales,jdbcType=DECIMAL},
        forecast_fifteenday_sales = #{record.forecastFifteendaySales,jdbcType=DECIMAL},
        forecast_sixteenday_sales = #{record.forecastSixteendaySales,jdbcType=DECIMAL},
        forecast_seventeenday_sales = #{record.forecastSeventeendaySales,jdbcType=DECIMAL},
        forecast_eighteenday_sales = #{record.forecastEighteendaySales,jdbcType=DECIMAL},
        forecast_nineteenday_sales = #{record.forecastNineteendaySales,jdbcType=DECIMAL},
        forecast_twentyday_sales = #{record.forecastTwentydaySales,jdbcType=DECIMAL},
        forecast_twenty_oneday_sales = #{record.forecastTwentyOnedaySales,jdbcType=DECIMAL},
        forecast_twenty_twoday_sales = #{record.forecastTwentyTwodaySales,jdbcType=DECIMAL},
        forecast_twenty_threeday_sales = #{record.forecastTwentyThreedaySales,jdbcType=DECIMAL},
        forecast_twenty_fourthday_sales = #{record.forecastTwentyFourthdaySales,jdbcType=DECIMAL},
        forecast_twenty_fiveday_sales = #{record.forecastTwentyFivedaySales,jdbcType=DECIMAL},
        forecast_twenty_sixday_sales = #{record.forecastTwentySixdaySales,jdbcType=DECIMAL},
        forecast_twenty_seveneday_sales = #{record.forecastTwentySevenedaySales,jdbcType=DECIMAL},
        forecast_twenty_eightday_sales = #{record.forecastTwentyEightdaySales,jdbcType=DECIMAL},
        forecast_twenty_nineday_sales = #{record.forecastTwentyNinedaySales,jdbcType=DECIMAL},
        forecast_thirtyday_sales = #{record.forecastThirtydaySales,jdbcType=DECIMAL},
        k_variable = #{record.kVariable,jdbcType=DECIMAL},
        b_variable = #{record.bVariable,jdbcType=DECIMAL},
        r_variable = #{record.rVariable,jdbcType=DECIMAL},
        average_sales = #{record.averageSales,jdbcType=DECIMAL},
        details = #{record.details,jdbcType=VARCHAR},
        fit_a_variable = #{record.fitAVariable,jdbcType=DECIMAL},
        fit_b_variable = #{record.fitBVariable,jdbcType=DECIMAL},
        fit_r_variable = #{record.fitRVariable,jdbcType=DECIMAL},
        fit_forecast_formula = #{record.fitForecastFormula,jdbcType=VARCHAR},
        history_sales_details = #{record.historySalesDetails,jdbcType=VARCHAR},
        gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
        gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP}
        <if test="_parameter != null">
            <include refid="Update_By_Example_Where_Clause"/>
        </if>
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcAutoSales">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update dc_auto_sales
        <set>
            <if test="forecastFormula != null">
                forecast_formula = #{forecastFormula,jdbcType=VARCHAR},
            </if>
            <if test="bailunSku != null">
                bailun_sku = #{bailunSku,jdbcType=VARCHAR},
            </if>
            <if test="title != null">
                title = #{title,jdbcType=VARCHAR},
            </if>
            <if test="warehouseCode != null">
                warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
            </if>
            <if test="categoryId != null">
                category_id = #{categoryId,jdbcType=INTEGER},
            </if>
            <if test="onedaySales != null">
                oneday_sales = #{onedaySales,jdbcType=INTEGER},
            </if>
            <if test="twodaySales != null">
                twoday_sales = #{twodaySales,jdbcType=INTEGER},
            </if>
            <if test="threedaySales != null">
                threeday_sales = #{threedaySales,jdbcType=INTEGER},
            </if>
            <if test="fourthdaySales != null">
                fourthday_sales = #{fourthdaySales,jdbcType=INTEGER},
            </if>
            <if test="fivedaySales != null">
                fiveday_sales = #{fivedaySales,jdbcType=INTEGER},
            </if>
            <if test="sixdaySales != null">
                sixday_sales = #{sixdaySales,jdbcType=INTEGER},
            </if>
            <if test="sevendaySales != null">
                sevenday_sales = #{sevendaySales,jdbcType=INTEGER},
            </if>
            <if test="eightdaySales != null">
                eightday_sales = #{eightdaySales,jdbcType=INTEGER},
            </if>
            <if test="ninedaySales != null">
                nineday_sales = #{ninedaySales,jdbcType=INTEGER},
            </if>
            <if test="tendaySales != null">
                tenday_sales = #{tendaySales,jdbcType=INTEGER},
            </if>
            <if test="elevendaySales != null">
                elevenday_sales = #{elevendaySales,jdbcType=INTEGER},
            </if>
            <if test="twelvedaySales != null">
                twelveday_sales = #{twelvedaySales,jdbcType=INTEGER},
            </if>
            <if test="thridteendaySales != null">
                thridteenday_sales = #{thridteendaySales,jdbcType=INTEGER},
            </if>
            <if test="fourteendaySales != null">
                fourteenday_sales = #{fourteendaySales,jdbcType=INTEGER},
            </if>
            <if test="fifteendaySales != null">
                fifteenday_sales = #{fifteendaySales,jdbcType=INTEGER},
            </if>
            <if test="sixteendaySales != null">
                sixteenday_sales = #{sixteendaySales,jdbcType=INTEGER},
            </if>
            <if test="seventeendaySales != null">
                seventeenday_sales = #{seventeendaySales,jdbcType=INTEGER},
            </if>
            <if test="eighteendaySales != null">
                eighteenday_sales = #{eighteendaySales,jdbcType=INTEGER},
            </if>
            <if test="nineteendaySales != null">
                nineteenday_sales = #{nineteendaySales,jdbcType=INTEGER},
            </if>
            <if test="twentydaySales != null">
                twentyday_sales = #{twentydaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyOnedaySales != null">
                twenty_oneday_sales = #{twentyOnedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyTwodaySales != null">
                twenty_twoday_sales = #{twentyTwodaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyThreedaySales != null">
                twenty_threeday_sales = #{twentyThreedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyFourthdaySales != null">
                twenty_fourthday_sales = #{twentyFourthdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyFivedaySales != null">
                twenty_fiveday_sales = #{twentyFivedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentySixdaySales != null">
                twenty_sixday_sales = #{twentySixdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentySevenedaySales != null">
                twenty_seveneday_sales = #{twentySevenedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyEightdaySales != null">
                twenty_eightday_sales = #{twentyEightdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyNinedaySales != null">
                twenty_nineday_sales = #{twentyNinedaySales,jdbcType=INTEGER},
            </if>
            <if test="thirtydaySales != null">
                thirtyday_sales = #{thirtydaySales,jdbcType=INTEGER},
            </if>
            <if test="warehouseName != null">
                warehouse_name = #{warehouseName,jdbcType=VARCHAR},
            </if>
            <if test="forecastTodaySales != null">
                forecast_today_sales = #{forecastTodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastOnedaySales != null">
                forecast_oneday_sales = #{forecastOnedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwodaySales != null">
                forecast_twoday_sales = #{forecastTwodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThreedaySales != null">
                forecast_threeday_sales = #{forecastThreedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFourthdaySales != null">
                forecast_fourthday_sales = #{forecastFourthdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFivedaySales != null">
                forecast_fiveday_sales = #{forecastFivedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSixdaySales != null">
                forecast_sixday_sales = #{forecastSixdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSevendaySales != null">
                forecast_sevenday_sales = #{forecastSevendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastEightdaySales != null">
                forecast_eightday_sales = #{forecastEightdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastNinedaySales != null">
                forecast_nineday_sales = #{forecastNinedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTendaySales != null">
                forecast_tenday_sales = #{forecastTendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastElevendaySales != null">
                forecast_elevenday_sales = #{forecastElevendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwelvedaySales != null">
                forecast_twelveday_sales = #{forecastTwelvedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThridteendaySales != null">
                forecast_thridteenday_sales = #{forecastThridteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFourteendaySales != null">
                forecast_fourteenday_sales = #{forecastFourteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFifteendaySales != null">
                forecast_fifteenday_sales = #{forecastFifteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSixteendaySales != null">
                forecast_sixteenday_sales = #{forecastSixteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSeventeendaySales != null">
                forecast_seventeenday_sales = #{forecastSeventeendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastEighteendaySales != null">
                forecast_eighteenday_sales = #{forecastEighteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastNineteendaySales != null">
                forecast_nineteenday_sales = #{forecastNineteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentydaySales != null">
                forecast_twentyday_sales = #{forecastTwentydaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyOnedaySales != null">
                forecast_twenty_oneday_sales = #{forecastTwentyOnedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyTwodaySales != null">
                forecast_twenty_twoday_sales = #{forecastTwentyTwodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyThreedaySales != null">
                forecast_twenty_threeday_sales = #{forecastTwentyThreedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyFourthdaySales != null">
                forecast_twenty_fourthday_sales = #{forecastTwentyFourthdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyFivedaySales != null">
                forecast_twenty_fiveday_sales = #{forecastTwentyFivedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentySixdaySales != null">
                forecast_twenty_sixday_sales = #{forecastTwentySixdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentySevenedaySales != null">
                forecast_twenty_seveneday_sales = #{forecastTwentySevenedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyEightdaySales != null">
                forecast_twenty_eightday_sales = #{forecastTwentyEightdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyNinedaySales != null">
                forecast_twenty_nineday_sales = #{forecastTwentyNinedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThirtydaySales != null">
                forecast_thirtyday_sales = #{forecastThirtydaySales,jdbcType=DECIMAL},
            </if>
            <if test="kVariable != null">
                k_variable = #{kVariable,jdbcType=DECIMAL},
            </if>
            <if test="bVariable != null">
                b_variable = #{bVariable,jdbcType=DECIMAL},
            </if>
            <if test="rVariable != null">
                r_variable = #{rVariable,jdbcType=DECIMAL},
            </if>
            <if test="averageSales != null">
                average_sales = #{averageSales,jdbcType=DECIMAL},
            </if>
            <if test="details != null">
                details = #{details,jdbcType=VARCHAR},
            </if>
            <if test="fitAVariable != null">
                fit_a_variable = #{fitAVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitBVariable != null">
                fit_b_variable = #{fitBVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitRVariable != null">
                fit_r_variable = #{fitRVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitForecastFormula != null">
                fit_forecast_formula = #{fitForecastFormula,jdbcType=VARCHAR},
            </if>
            <if test="historySalesDetails != null">
                history_sales_details = #{historySalesDetails,jdbcType=VARCHAR},
            </if>
            <if test="gmtCreate != null">
                gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="gmtModified != null">
                gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
            </if>
        </set>
        where id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcAutoSales">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update dc_auto_sales
        set forecast_formula = #{forecastFormula,jdbcType=VARCHAR},
        bailun_sku = #{bailunSku,jdbcType=VARCHAR},
        title = #{title,jdbcType=VARCHAR},
        warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
        category_id = #{categoryId,jdbcType=INTEGER},
        oneday_sales = #{onedaySales,jdbcType=INTEGER},
        twoday_sales = #{twodaySales,jdbcType=INTEGER},
        threeday_sales = #{threedaySales,jdbcType=INTEGER},
        fourthday_sales = #{fourthdaySales,jdbcType=INTEGER},
        fiveday_sales = #{fivedaySales,jdbcType=INTEGER},
        sixday_sales = #{sixdaySales,jdbcType=INTEGER},
        sevenday_sales = #{sevendaySales,jdbcType=INTEGER},
        eightday_sales = #{eightdaySales,jdbcType=INTEGER},
        nineday_sales = #{ninedaySales,jdbcType=INTEGER},
        tenday_sales = #{tendaySales,jdbcType=INTEGER},
        elevenday_sales = #{elevendaySales,jdbcType=INTEGER},
        twelveday_sales = #{twelvedaySales,jdbcType=INTEGER},
        thridteenday_sales = #{thridteendaySales,jdbcType=INTEGER},
        fourteenday_sales = #{fourteendaySales,jdbcType=INTEGER},
        fifteenday_sales = #{fifteendaySales,jdbcType=INTEGER},
        sixteenday_sales = #{sixteendaySales,jdbcType=INTEGER},
        seventeenday_sales = #{seventeendaySales,jdbcType=INTEGER},
        eighteenday_sales = #{eighteendaySales,jdbcType=INTEGER},
        nineteenday_sales = #{nineteendaySales,jdbcType=INTEGER},
        twentyday_sales = #{twentydaySales,jdbcType=INTEGER},
        twenty_oneday_sales = #{twentyOnedaySales,jdbcType=INTEGER},
        twenty_twoday_sales = #{twentyTwodaySales,jdbcType=INTEGER},
        twenty_threeday_sales = #{twentyThreedaySales,jdbcType=INTEGER},
        twenty_fourthday_sales = #{twentyFourthdaySales,jdbcType=INTEGER},
        twenty_fiveday_sales = #{twentyFivedaySales,jdbcType=INTEGER},
        twenty_sixday_sales = #{twentySixdaySales,jdbcType=INTEGER},
        twenty_seveneday_sales = #{twentySevenedaySales,jdbcType=INTEGER},
        twenty_eightday_sales = #{twentyEightdaySales,jdbcType=INTEGER},
        twenty_nineday_sales = #{twentyNinedaySales,jdbcType=INTEGER},
        thirtyday_sales = #{thirtydaySales,jdbcType=INTEGER},
        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
        forecast_today_sales = #{forecastTodaySales,jdbcType=DECIMAL},
        forecast_oneday_sales = #{forecastOnedaySales,jdbcType=DECIMAL},
        forecast_twoday_sales = #{forecastTwodaySales,jdbcType=DECIMAL},
        forecast_threeday_sales = #{forecastThreedaySales,jdbcType=DECIMAL},
        forecast_fourthday_sales = #{forecastFourthdaySales,jdbcType=DECIMAL},
        forecast_fiveday_sales = #{forecastFivedaySales,jdbcType=DECIMAL},
        forecast_sixday_sales = #{forecastSixdaySales,jdbcType=DECIMAL},
        forecast_sevenday_sales = #{forecastSevendaySales,jdbcType=DECIMAL},
        forecast_eightday_sales = #{forecastEightdaySales,jdbcType=DECIMAL},
        forecast_nineday_sales = #{forecastNinedaySales,jdbcType=DECIMAL},
        forecast_tenday_sales = #{forecastTendaySales,jdbcType=DECIMAL},
        forecast_elevenday_sales = #{forecastElevendaySales,jdbcType=DECIMAL},
        forecast_twelveday_sales = #{forecastTwelvedaySales,jdbcType=DECIMAL},
        forecast_thridteenday_sales = #{forecastThridteendaySales,jdbcType=DECIMAL},
        forecast_fourteenday_sales = #{forecastFourteendaySales,jdbcType=DECIMAL},
        forecast_fifteenday_sales = #{forecastFifteendaySales,jdbcType=DECIMAL},
        forecast_sixteenday_sales = #{forecastSixteendaySales,jdbcType=DECIMAL},
        forecast_seventeenday_sales = #{forecastSeventeendaySales,jdbcType=DECIMAL},
        forecast_eighteenday_sales = #{forecastEighteendaySales,jdbcType=DECIMAL},
        forecast_nineteenday_sales = #{forecastNineteendaySales,jdbcType=DECIMAL},
        forecast_twentyday_sales = #{forecastTwentydaySales,jdbcType=DECIMAL},
        forecast_twenty_oneday_sales = #{forecastTwentyOnedaySales,jdbcType=DECIMAL},
        forecast_twenty_twoday_sales = #{forecastTwentyTwodaySales,jdbcType=DECIMAL},
        forecast_twenty_threeday_sales = #{forecastTwentyThreedaySales,jdbcType=DECIMAL},
        forecast_twenty_fourthday_sales = #{forecastTwentyFourthdaySales,jdbcType=DECIMAL},
        forecast_twenty_fiveday_sales = #{forecastTwentyFivedaySales,jdbcType=DECIMAL},
        forecast_twenty_sixday_sales = #{forecastTwentySixdaySales,jdbcType=DECIMAL},
        forecast_twenty_seveneday_sales = #{forecastTwentySevenedaySales,jdbcType=DECIMAL},
        forecast_twenty_eightday_sales = #{forecastTwentyEightdaySales,jdbcType=DECIMAL},
        forecast_twenty_nineday_sales = #{forecastTwentyNinedaySales,jdbcType=DECIMAL},
        forecast_thirtyday_sales = #{forecastThirtydaySales,jdbcType=DECIMAL},
        k_variable = #{kVariable,jdbcType=DECIMAL},
        b_variable = #{bVariable,jdbcType=DECIMAL},
        r_variable = #{rVariable,jdbcType=DECIMAL},
        average_sales = #{averageSales,jdbcType=DECIMAL},
        details = #{details,jdbcType=VARCHAR},
        fit_a_variable = #{fitAVariable,jdbcType=DECIMAL},
        fit_b_variable = #{fitBVariable,jdbcType=DECIMAL},
        fit_r_variable = #{fitRVariable,jdbcType=DECIMAL},
        fit_forecast_formula = #{fitForecastFormula,jdbcType=VARCHAR},
        history_sales_details = #{historySalesDetails,jdbcType=VARCHAR},
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
        where id = #{id,jdbcType=INTEGER}
    </update>
    <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcAutoSales">
        <!--
          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_sales
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="forecastFormula != null">
                forecast_formula,
            </if>
            <if test="bailunSku != null">
                bailun_sku,
            </if>
            <if test="title != null">
                title,
            </if>
            <if test="warehouseCode != null">
                warehouse_code,
            </if>
            <if test="categoryId != null">
                category_id,
            </if>
            <if test="onedaySales != null">
                oneday_sales,
            </if>
            <if test="twodaySales != null">
                twoday_sales,
            </if>
            <if test="threedaySales != null">
                threeday_sales,
            </if>
            <if test="fourthdaySales != null">
                fourthday_sales,
            </if>
            <if test="fivedaySales != null">
                fiveday_sales,
            </if>
            <if test="sixdaySales != null">
                sixday_sales,
            </if>
            <if test="sevendaySales != null">
                sevenday_sales,
            </if>
            <if test="eightdaySales != null">
                eightday_sales,
            </if>
            <if test="ninedaySales != null">
                nineday_sales,
            </if>
            <if test="tendaySales != null">
                tenday_sales,
            </if>
            <if test="elevendaySales != null">
                elevenday_sales,
            </if>
            <if test="twelvedaySales != null">
                twelveday_sales,
            </if>
            <if test="thridteendaySales != null">
                thridteenday_sales,
            </if>
            <if test="fourteendaySales != null">
                fourteenday_sales,
            </if>
            <if test="fifteendaySales != null">
                fifteenday_sales,
            </if>
            <if test="sixteendaySales != null">
                sixteenday_sales,
            </if>
            <if test="seventeendaySales != null">
                seventeenday_sales,
            </if>
            <if test="eighteendaySales != null">
                eighteenday_sales,
            </if>
            <if test="nineteendaySales != null">
                nineteenday_sales,
            </if>
            <if test="twentydaySales != null">
                twentyday_sales,
            </if>
            <if test="twentyOnedaySales != null">
                twenty_oneday_sales,
            </if>
            <if test="twentyTwodaySales != null">
                twenty_twoday_sales,
            </if>
            <if test="twentyThreedaySales != null">
                twenty_threeday_sales,
            </if>
            <if test="twentyFourthdaySales != null">
                twenty_fourthday_sales,
            </if>
            <if test="twentyFivedaySales != null">
                twenty_fiveday_sales,
            </if>
            <if test="twentySixdaySales != null">
                twenty_sixday_sales,
            </if>
            <if test="twentySevenedaySales != null">
                twenty_seveneday_sales,
            </if>
            <if test="twentyEightdaySales != null">
                twenty_eightday_sales,
            </if>
            <if test="twentyNinedaySales != null">
                twenty_nineday_sales,
            </if>
            <if test="thirtydaySales != null">
                thirtyday_sales,
            </if>
            <if test="warehouseName != null">
                warehouse_name,
            </if>
            <if test="forecastTodaySales != null">
                forecast_today_sales,
            </if>
            <if test="forecastOnedaySales != null">
                forecast_oneday_sales,
            </if>
            <if test="forecastTwodaySales != null">
                forecast_twoday_sales,
            </if>
            <if test="forecastThreedaySales != null">
                forecast_threeday_sales,
            </if>
            <if test="forecastFourthdaySales != null">
                forecast_fourthday_sales,
            </if>
            <if test="forecastFivedaySales != null">
                forecast_fiveday_sales,
            </if>
            <if test="forecastSixdaySales != null">
                forecast_sixday_sales,
            </if>
            <if test="forecastSevendaySales != null">
                forecast_sevenday_sales,
            </if>
            <if test="forecastEightdaySales != null">
                forecast_eightday_sales,
            </if>
            <if test="forecastNinedaySales != null">
                forecast_nineday_sales,
            </if>
            <if test="forecastTendaySales != null">
                forecast_tenday_sales,
            </if>
            <if test="forecastElevendaySales != null">
                forecast_elevenday_sales,
            </if>
            <if test="forecastTwelvedaySales != null">
                forecast_twelveday_sales,
            </if>
            <if test="forecastThridteendaySales != null">
                forecast_thridteenday_sales,
            </if>
            <if test="forecastFourteendaySales != null">
                forecast_fourteenday_sales,
            </if>
            <if test="forecastFifteendaySales != null">
                forecast_fifteenday_sales,
            </if>
            <if test="forecastSixteendaySales != null">
                forecast_sixteenday_sales,
            </if>
            <if test="forecastSeventeendaySales != null">
                forecast_seventeenday_sales,
            </if>
            <if test="forecastEighteendaySales != null">
                forecast_eighteenday_sales,
            </if>
            <if test="forecastNineteendaySales != null">
                forecast_nineteenday_sales,
            </if>
            <if test="forecastTwentydaySales != null">
                forecast_twentyday_sales,
            </if>
            <if test="forecastTwentyOnedaySales != null">
                forecast_twenty_oneday_sales,
            </if>
            <if test="forecastTwentyTwodaySales != null">
                forecast_twenty_twoday_sales,
            </if>
            <if test="forecastTwentyThreedaySales != null">
                forecast_twenty_threeday_sales,
            </if>
            <if test="forecastTwentyFourthdaySales != null">
                forecast_twenty_fourthday_sales,
            </if>
            <if test="forecastTwentyFivedaySales != null">
                forecast_twenty_fiveday_sales,
            </if>
            <if test="forecastTwentySixdaySales != null">
                forecast_twenty_sixday_sales,
            </if>
            <if test="forecastTwentySevenedaySales != null">
                forecast_twenty_seveneday_sales,
            </if>
            <if test="forecastTwentyEightdaySales != null">
                forecast_twenty_eightday_sales,
            </if>
            <if test="forecastTwentyNinedaySales != null">
                forecast_twenty_nineday_sales,
            </if>
            <if test="forecastThirtydaySales != null">
                forecast_thirtyday_sales,
            </if>
            <if test="kVariable != null">
                k_variable,
            </if>
            <if test="bVariable != null">
                b_variable,
            </if>
            <if test="rVariable != null">
                r_variable,
            </if>
            <if test="averageSales != null">
                average_sales,
            </if>
            <if test="details != null">
                details,
            </if>
            <if test="fitAVariable != null">
                fit_a_variable,
            </if>
            <if test="fitBVariable != null">
                fit_b_variable,
            </if>
            <if test="fitRVariable != null">
                fit_r_variable,
            </if>
            <if test="fitForecastFormula != null">
                fit_forecast_formula,
            </if>
            <if test="historySalesDetails != null">
                history_sales_details,
            </if>
            <if test="gmtCreate != null">
                gmt_create,
            </if>
            <if test="gmtModified != null">
                gmt_modified,
            </if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=INTEGER},
            </if>
            <if test="forecastFormula != null">
                #{forecastFormula,jdbcType=VARCHAR},
            </if>
            <if test="bailunSku != null">
                #{bailunSku,jdbcType=VARCHAR},
            </if>
            <if test="title != null">
                #{title,jdbcType=VARCHAR},
            </if>
            <if test="warehouseCode != null">
                #{warehouseCode,jdbcType=VARCHAR},
            </if>
            <if test="categoryId != null">
                #{categoryId,jdbcType=INTEGER},
            </if>
            <if test="onedaySales != null">
                #{onedaySales,jdbcType=INTEGER},
            </if>
            <if test="twodaySales != null">
                #{twodaySales,jdbcType=INTEGER},
            </if>
            <if test="threedaySales != null">
                #{threedaySales,jdbcType=INTEGER},
            </if>
            <if test="fourthdaySales != null">
                #{fourthdaySales,jdbcType=INTEGER},
            </if>
            <if test="fivedaySales != null">
                #{fivedaySales,jdbcType=INTEGER},
            </if>
            <if test="sixdaySales != null">
                #{sixdaySales,jdbcType=INTEGER},
            </if>
            <if test="sevendaySales != null">
                #{sevendaySales,jdbcType=INTEGER},
            </if>
            <if test="eightdaySales != null">
                #{eightdaySales,jdbcType=INTEGER},
            </if>
            <if test="ninedaySales != null">
                #{ninedaySales,jdbcType=INTEGER},
            </if>
            <if test="tendaySales != null">
                #{tendaySales,jdbcType=INTEGER},
            </if>
            <if test="elevendaySales != null">
                #{elevendaySales,jdbcType=INTEGER},
            </if>
            <if test="twelvedaySales != null">
                #{twelvedaySales,jdbcType=INTEGER},
            </if>
            <if test="thridteendaySales != null">
                #{thridteendaySales,jdbcType=INTEGER},
            </if>
            <if test="fourteendaySales != null">
                #{fourteendaySales,jdbcType=INTEGER},
            </if>
            <if test="fifteendaySales != null">
                #{fifteendaySales,jdbcType=INTEGER},
            </if>
            <if test="sixteendaySales != null">
                #{sixteendaySales,jdbcType=INTEGER},
            </if>
            <if test="seventeendaySales != null">
                #{seventeendaySales,jdbcType=INTEGER},
            </if>
            <if test="eighteendaySales != null">
                #{eighteendaySales,jdbcType=INTEGER},
            </if>
            <if test="nineteendaySales != null">
                #{nineteendaySales,jdbcType=INTEGER},
            </if>
            <if test="twentydaySales != null">
                #{twentydaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyOnedaySales != null">
                #{twentyOnedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyTwodaySales != null">
                #{twentyTwodaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyThreedaySales != null">
                #{twentyThreedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyFourthdaySales != null">
                #{twentyFourthdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyFivedaySales != null">
                #{twentyFivedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentySixdaySales != null">
                #{twentySixdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentySevenedaySales != null">
                #{twentySevenedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyEightdaySales != null">
                #{twentyEightdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyNinedaySales != null">
                #{twentyNinedaySales,jdbcType=INTEGER},
            </if>
            <if test="thirtydaySales != null">
                #{thirtydaySales,jdbcType=INTEGER},
            </if>
            <if test="warehouseName != null">
                #{warehouseName,jdbcType=VARCHAR},
            </if>
            <if test="forecastTodaySales != null">
                #{forecastTodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastOnedaySales != null">
                #{forecastOnedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwodaySales != null">
                #{forecastTwodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThreedaySales != null">
                #{forecastThreedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFourthdaySales != null">
                #{forecastFourthdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFivedaySales != null">
                #{forecastFivedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSixdaySales != null">
                #{forecastSixdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSevendaySales != null">
                #{forecastSevendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastEightdaySales != null">
                #{forecastEightdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastNinedaySales != null">
                #{forecastNinedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTendaySales != null">
                #{forecastTendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastElevendaySales != null">
                #{forecastElevendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwelvedaySales != null">
                #{forecastTwelvedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThridteendaySales != null">
                #{forecastThridteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFourteendaySales != null">
                #{forecastFourteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFifteendaySales != null">
                #{forecastFifteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSixteendaySales != null">
                #{forecastSixteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSeventeendaySales != null">
                #{forecastSeventeendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastEighteendaySales != null">
                #{forecastEighteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastNineteendaySales != null">
                #{forecastNineteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentydaySales != null">
                #{forecastTwentydaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyOnedaySales != null">
                #{forecastTwentyOnedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyTwodaySales != null">
                #{forecastTwentyTwodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyThreedaySales != null">
                #{forecastTwentyThreedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyFourthdaySales != null">
                #{forecastTwentyFourthdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyFivedaySales != null">
                #{forecastTwentyFivedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentySixdaySales != null">
                #{forecastTwentySixdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentySevenedaySales != null">
                #{forecastTwentySevenedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyEightdaySales != null">
                #{forecastTwentyEightdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyNinedaySales != null">
                #{forecastTwentyNinedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThirtydaySales != null">
                #{forecastThirtydaySales,jdbcType=DECIMAL},
            </if>
            <if test="kVariable != null">
                #{kVariable,jdbcType=DECIMAL},
            </if>
            <if test="bVariable != null">
                #{bVariable,jdbcType=DECIMAL},
            </if>
            <if test="rVariable != null">
                #{rVariable,jdbcType=DECIMAL},
            </if>
            <if test="averageSales != null">
                #{averageSales,jdbcType=DECIMAL},
            </if>
            <if test="details != null">
                #{details,jdbcType=VARCHAR},
            </if>
            <if test="fitAVariable != null">
                #{fitAVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitBVariable != null">
                #{fitBVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitRVariable != null">
                #{fitRVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitForecastFormula != null">
                #{fitForecastFormula,jdbcType=VARCHAR},
            </if>
            <if test="historySalesDetails != null">
                #{historySalesDetails,jdbcType=VARCHAR},
            </if>
            <if test="gmtCreate != null">
                #{gmtCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="gmtModified != null">
                #{gmtModified,jdbcType=TIMESTAMP},
            </if>
        </trim>
        on duplicate key update
        <trim suffixOverrides=",">
            <if test="id != null">
                id = #{id,jdbcType=INTEGER},
            </if>
            <if test="forecastFormula != null">
                forecast_formula = #{forecastFormula,jdbcType=VARCHAR},
            </if>
            <if test="bailunSku != null">
                bailun_sku = #{bailunSku,jdbcType=VARCHAR},
            </if>
            <if test="title != null">
                title = #{title,jdbcType=VARCHAR},
            </if>
            <if test="warehouseCode != null">
                warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
            </if>
            <if test="categoryId != null">
                category_id = #{categoryId,jdbcType=INTEGER},
            </if>
            <if test="onedaySales != null">
                oneday_sales = #{onedaySales,jdbcType=INTEGER},
            </if>
            <if test="twodaySales != null">
                twoday_sales = #{twodaySales,jdbcType=INTEGER},
            </if>
            <if test="threedaySales != null">
                threeday_sales = #{threedaySales,jdbcType=INTEGER},
            </if>
            <if test="fourthdaySales != null">
                fourthday_sales = #{fourthdaySales,jdbcType=INTEGER},
            </if>
            <if test="fivedaySales != null">
                fiveday_sales = #{fivedaySales,jdbcType=INTEGER},
            </if>
            <if test="sixdaySales != null">
                sixday_sales = #{sixdaySales,jdbcType=INTEGER},
            </if>
            <if test="sevendaySales != null">
                sevenday_sales = #{sevendaySales,jdbcType=INTEGER},
            </if>
            <if test="eightdaySales != null">
                eightday_sales = #{eightdaySales,jdbcType=INTEGER},
            </if>
            <if test="ninedaySales != null">
                nineday_sales = #{ninedaySales,jdbcType=INTEGER},
            </if>
            <if test="tendaySales != null">
                tenday_sales = #{tendaySales,jdbcType=INTEGER},
            </if>
            <if test="elevendaySales != null">
                elevenday_sales = #{elevendaySales,jdbcType=INTEGER},
            </if>
            <if test="twelvedaySales != null">
                twelveday_sales = #{twelvedaySales,jdbcType=INTEGER},
            </if>
            <if test="thridteendaySales != null">
                thridteenday_sales = #{thridteendaySales,jdbcType=INTEGER},
            </if>
            <if test="fourteendaySales != null">
                fourteenday_sales = #{fourteendaySales,jdbcType=INTEGER},
            </if>
            <if test="fifteendaySales != null">
                fifteenday_sales = #{fifteendaySales,jdbcType=INTEGER},
            </if>
            <if test="sixteendaySales != null">
                sixteenday_sales = #{sixteendaySales,jdbcType=INTEGER},
            </if>
            <if test="seventeendaySales != null">
                seventeenday_sales = #{seventeendaySales,jdbcType=INTEGER},
            </if>
            <if test="eighteendaySales != null">
                eighteenday_sales = #{eighteendaySales,jdbcType=INTEGER},
            </if>
            <if test="nineteendaySales != null">
                nineteenday_sales = #{nineteendaySales,jdbcType=INTEGER},
            </if>
            <if test="twentydaySales != null">
                twentyday_sales = #{twentydaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyOnedaySales != null">
                twenty_oneday_sales = #{twentyOnedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyTwodaySales != null">
                twenty_twoday_sales = #{twentyTwodaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyThreedaySales != null">
                twenty_threeday_sales = #{twentyThreedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyFourthdaySales != null">
                twenty_fourthday_sales = #{twentyFourthdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyFivedaySales != null">
                twenty_fiveday_sales = #{twentyFivedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentySixdaySales != null">
                twenty_sixday_sales = #{twentySixdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentySevenedaySales != null">
                twenty_seveneday_sales = #{twentySevenedaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyEightdaySales != null">
                twenty_eightday_sales = #{twentyEightdaySales,jdbcType=INTEGER},
            </if>
            <if test="twentyNinedaySales != null">
                twenty_nineday_sales = #{twentyNinedaySales,jdbcType=INTEGER},
            </if>
            <if test="thirtydaySales != null">
                thirtyday_sales = #{thirtydaySales,jdbcType=INTEGER},
            </if>
            <if test="warehouseName != null">
                warehouse_name = #{warehouseName,jdbcType=VARCHAR},
            </if>
            <if test="forecastTodaySales != null">
                forecast_today_sales = #{forecastTodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastOnedaySales != null">
                forecast_oneday_sales = #{forecastOnedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwodaySales != null">
                forecast_twoday_sales = #{forecastTwodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThreedaySales != null">
                forecast_threeday_sales = #{forecastThreedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFourthdaySales != null">
                forecast_fourthday_sales = #{forecastFourthdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFivedaySales != null">
                forecast_fiveday_sales = #{forecastFivedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSixdaySales != null">
                forecast_sixday_sales = #{forecastSixdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSevendaySales != null">
                forecast_sevenday_sales = #{forecastSevendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastEightdaySales != null">
                forecast_eightday_sales = #{forecastEightdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastNinedaySales != null">
                forecast_nineday_sales = #{forecastNinedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTendaySales != null">
                forecast_tenday_sales = #{forecastTendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastElevendaySales != null">
                forecast_elevenday_sales = #{forecastElevendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwelvedaySales != null">
                forecast_twelveday_sales = #{forecastTwelvedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThridteendaySales != null">
                forecast_thridteenday_sales = #{forecastThridteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFourteendaySales != null">
                forecast_fourteenday_sales = #{forecastFourteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastFifteendaySales != null">
                forecast_fifteenday_sales = #{forecastFifteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSixteendaySales != null">
                forecast_sixteenday_sales = #{forecastSixteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastSeventeendaySales != null">
                forecast_seventeenday_sales = #{forecastSeventeendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastEighteendaySales != null">
                forecast_eighteenday_sales = #{forecastEighteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastNineteendaySales != null">
                forecast_nineteenday_sales = #{forecastNineteendaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentydaySales != null">
                forecast_twentyday_sales = #{forecastTwentydaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyOnedaySales != null">
                forecast_twenty_oneday_sales = #{forecastTwentyOnedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyTwodaySales != null">
                forecast_twenty_twoday_sales = #{forecastTwentyTwodaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyThreedaySales != null">
                forecast_twenty_threeday_sales = #{forecastTwentyThreedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyFourthdaySales != null">
                forecast_twenty_fourthday_sales = #{forecastTwentyFourthdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyFivedaySales != null">
                forecast_twenty_fiveday_sales = #{forecastTwentyFivedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentySixdaySales != null">
                forecast_twenty_sixday_sales = #{forecastTwentySixdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentySevenedaySales != null">
                forecast_twenty_seveneday_sales = #{forecastTwentySevenedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyEightdaySales != null">
                forecast_twenty_eightday_sales = #{forecastTwentyEightdaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastTwentyNinedaySales != null">
                forecast_twenty_nineday_sales = #{forecastTwentyNinedaySales,jdbcType=DECIMAL},
            </if>
            <if test="forecastThirtydaySales != null">
                forecast_thirtyday_sales = #{forecastThirtydaySales,jdbcType=DECIMAL},
            </if>
            <if test="kVariable != null">
                k_variable = #{kVariable,jdbcType=DECIMAL},
            </if>
            <if test="bVariable != null">
                b_variable = #{bVariable,jdbcType=DECIMAL},
            </if>
            <if test="rVariable != null">
                r_variable = #{rVariable,jdbcType=DECIMAL},
            </if>
            <if test="averageSales != null">
                average_sales = #{averageSales,jdbcType=DECIMAL},
            </if>
            <if test="details != null">
                details = #{details,jdbcType=VARCHAR},
            </if>
            <if test="fitAVariable != null">
                fit_a_variable = #{fitAVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitBVariable != null">
                fit_b_variable = #{fitBVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitRVariable != null">
                fit_r_variable = #{fitRVariable,jdbcType=DECIMAL},
            </if>
            <if test="fitForecastFormula != null">
                fit_forecast_formula = #{fitForecastFormula,jdbcType=VARCHAR},
            </if>
            <if test="historySalesDetails != null">
                history_sales_details = #{historySalesDetails,jdbcType=VARCHAR},
            </if>
            <if test="gmtCreate != null">
                gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="gmtModified != null">
                gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
            </if>
        </trim>
    </insert>
    <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAutoSales">
        <!--
          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_sales
        (id, forecast_formula, bailun_sku, title, warehouse_code, category_id, oneday_sales,
        twoday_sales, threeday_sales, fourthday_sales, fiveday_sales, sixday_sales, sevenday_sales,
        eightday_sales, nineday_sales, tenday_sales, elevenday_sales, twelveday_sales,
        thridteenday_sales, fourteenday_sales, fifteenday_sales, sixteenday_sales, seventeenday_sales,
        eighteenday_sales, nineteenday_sales, twentyday_sales, twenty_oneday_sales, twenty_twoday_sales,
        twenty_threeday_sales, twenty_fourthday_sales, twenty_fiveday_sales, twenty_sixday_sales,
        twenty_seveneday_sales, twenty_eightday_sales, twenty_nineday_sales, thirtyday_sales,
        warehouse_name, forecast_today_sales, forecast_oneday_sales, forecast_twoday_sales,
        forecast_threeday_sales, forecast_fourthday_sales, forecast_fiveday_sales, forecast_sixday_sales,
        forecast_sevenday_sales, forecast_eightday_sales, forecast_nineday_sales, forecast_tenday_sales,
        forecast_elevenday_sales, forecast_twelveday_sales, forecast_thridteenday_sales,
        forecast_fourteenday_sales, forecast_fifteenday_sales, forecast_sixteenday_sales,
        forecast_seventeenday_sales, forecast_eighteenday_sales, forecast_nineteenday_sales,
        forecast_twentyday_sales, forecast_twenty_oneday_sales, forecast_twenty_twoday_sales,
        forecast_twenty_threeday_sales, forecast_twenty_fourthday_sales, forecast_twenty_fiveday_sales,
        forecast_twenty_sixday_sales, forecast_twenty_seveneday_sales, forecast_twenty_eightday_sales,
        forecast_twenty_nineday_sales, forecast_thirtyday_sales, k_variable, b_variable,
        r_variable, average_sales, details, fit_a_variable, fit_b_variable, fit_r_variable,
        fit_forecast_formula, history_sales_details, gmt_create, gmt_modified)
        values
        (#{id,jdbcType=INTEGER}, #{forecastFormula,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR},
        #{title,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR}, #{categoryId,jdbcType=INTEGER},
        #{onedaySales,jdbcType=INTEGER}, #{twodaySales,jdbcType=INTEGER}, #{threedaySales,jdbcType=INTEGER},
        #{fourthdaySales,jdbcType=INTEGER}, #{fivedaySales,jdbcType=INTEGER}, #{sixdaySales,jdbcType=INTEGER},
        #{sevendaySales,jdbcType=INTEGER}, #{eightdaySales,jdbcType=INTEGER}, #{ninedaySales,jdbcType=INTEGER},
        #{tendaySales,jdbcType=INTEGER}, #{elevendaySales,jdbcType=INTEGER}, #{twelvedaySales,jdbcType=INTEGER},
        #{thridteendaySales,jdbcType=INTEGER}, #{fourteendaySales,jdbcType=INTEGER},
        #{fifteendaySales,jdbcType=INTEGER},
        #{sixteendaySales,jdbcType=INTEGER}, #{seventeendaySales,jdbcType=INTEGER},
        #{eighteendaySales,jdbcType=INTEGER},
        #{nineteendaySales,jdbcType=INTEGER}, #{twentydaySales,jdbcType=INTEGER}, #{twentyOnedaySales,jdbcType=INTEGER},
        #{twentyTwodaySales,jdbcType=INTEGER}, #{twentyThreedaySales,jdbcType=INTEGER},
        #{twentyFourthdaySales,jdbcType=INTEGER}, #{twentyFivedaySales,jdbcType=INTEGER},
        #{twentySixdaySales,jdbcType=INTEGER}, #{twentySevenedaySales,jdbcType=INTEGER},
        #{twentyEightdaySales,jdbcType=INTEGER}, #{twentyNinedaySales,jdbcType=INTEGER},
        #{thirtydaySales,jdbcType=INTEGER}, #{warehouseName,jdbcType=VARCHAR}, #{forecastTodaySales,jdbcType=DECIMAL},
        #{forecastOnedaySales,jdbcType=DECIMAL}, #{forecastTwodaySales,jdbcType=DECIMAL},
        #{forecastThreedaySales,jdbcType=DECIMAL}, #{forecastFourthdaySales,jdbcType=DECIMAL},
        #{forecastFivedaySales,jdbcType=DECIMAL}, #{forecastSixdaySales,jdbcType=DECIMAL},
        #{forecastSevendaySales,jdbcType=DECIMAL}, #{forecastEightdaySales,jdbcType=DECIMAL},
        #{forecastNinedaySales,jdbcType=DECIMAL}, #{forecastTendaySales,jdbcType=DECIMAL},
        #{forecastElevendaySales,jdbcType=DECIMAL}, #{forecastTwelvedaySales,jdbcType=DECIMAL},
        #{forecastThridteendaySales,jdbcType=DECIMAL}, #{forecastFourteendaySales,jdbcType=DECIMAL},
        #{forecastFifteendaySales,jdbcType=DECIMAL}, #{forecastSixteendaySales,jdbcType=DECIMAL},
        #{forecastSeventeendaySales,jdbcType=DECIMAL}, #{forecastEighteendaySales,jdbcType=DECIMAL},
        #{forecastNineteendaySales,jdbcType=DECIMAL}, #{forecastTwentydaySales,jdbcType=DECIMAL},
        #{forecastTwentyOnedaySales,jdbcType=DECIMAL}, #{forecastTwentyTwodaySales,jdbcType=DECIMAL},
        #{forecastTwentyThreedaySales,jdbcType=DECIMAL}, #{forecastTwentyFourthdaySales,jdbcType=DECIMAL},
        #{forecastTwentyFivedaySales,jdbcType=DECIMAL}, #{forecastTwentySixdaySales,jdbcType=DECIMAL},
        #{forecastTwentySevenedaySales,jdbcType=DECIMAL}, #{forecastTwentyEightdaySales,jdbcType=DECIMAL},
        #{forecastTwentyNinedaySales,jdbcType=DECIMAL}, #{forecastThirtydaySales,jdbcType=DECIMAL},
        #{kVariable,jdbcType=DECIMAL}, #{bVariable,jdbcType=DECIMAL}, #{rVariable,jdbcType=DECIMAL},
        #{averageSales,jdbcType=DECIMAL}, #{details,jdbcType=VARCHAR}, #{fitAVariable,jdbcType=DECIMAL},
        #{fitBVariable,jdbcType=DECIMAL}, #{fitRVariable,jdbcType=DECIMAL}, #{fitForecastFormula,jdbcType=VARCHAR},
        #{historySalesDetails,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}
        )
        on duplicate key update
        id = #{id,jdbcType=INTEGER},
        forecast_formula = #{forecastFormula,jdbcType=VARCHAR},
        bailun_sku = #{bailunSku,jdbcType=VARCHAR},
        title = #{title,jdbcType=VARCHAR},
        warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
        category_id = #{categoryId,jdbcType=INTEGER},
        oneday_sales = #{onedaySales,jdbcType=INTEGER},
        twoday_sales = #{twodaySales,jdbcType=INTEGER},
        threeday_sales = #{threedaySales,jdbcType=INTEGER},
        fourthday_sales = #{fourthdaySales,jdbcType=INTEGER},
        fiveday_sales = #{fivedaySales,jdbcType=INTEGER},
        sixday_sales = #{sixdaySales,jdbcType=INTEGER},
        sevenday_sales = #{sevendaySales,jdbcType=INTEGER},
        eightday_sales = #{eightdaySales,jdbcType=INTEGER},
        nineday_sales = #{ninedaySales,jdbcType=INTEGER},
        tenday_sales = #{tendaySales,jdbcType=INTEGER},
        elevenday_sales = #{elevendaySales,jdbcType=INTEGER},
        twelveday_sales = #{twelvedaySales,jdbcType=INTEGER},
        thridteenday_sales = #{thridteendaySales,jdbcType=INTEGER},
        fourteenday_sales = #{fourteendaySales,jdbcType=INTEGER},
        fifteenday_sales = #{fifteendaySales,jdbcType=INTEGER},
        sixteenday_sales = #{sixteendaySales,jdbcType=INTEGER},
        seventeenday_sales = #{seventeendaySales,jdbcType=INTEGER},
        eighteenday_sales = #{eighteendaySales,jdbcType=INTEGER},
        nineteenday_sales = #{nineteendaySales,jdbcType=INTEGER},
        twentyday_sales = #{twentydaySales,jdbcType=INTEGER},
        twenty_oneday_sales = #{twentyOnedaySales,jdbcType=INTEGER},
        twenty_twoday_sales = #{twentyTwodaySales,jdbcType=INTEGER},
        twenty_threeday_sales = #{twentyThreedaySales,jdbcType=INTEGER},
        twenty_fourthday_sales = #{twentyFourthdaySales,jdbcType=INTEGER},
        twenty_fiveday_sales = #{twentyFivedaySales,jdbcType=INTEGER},
        twenty_sixday_sales = #{twentySixdaySales,jdbcType=INTEGER},
        twenty_seveneday_sales = #{twentySevenedaySales,jdbcType=INTEGER},
        twenty_eightday_sales = #{twentyEightdaySales,jdbcType=INTEGER},
        twenty_nineday_sales = #{twentyNinedaySales,jdbcType=INTEGER},
        thirtyday_sales = #{thirtydaySales,jdbcType=INTEGER},
        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
        forecast_today_sales = #{forecastTodaySales,jdbcType=DECIMAL},
        forecast_oneday_sales = #{forecastOnedaySales,jdbcType=DECIMAL},
        forecast_twoday_sales = #{forecastTwodaySales,jdbcType=DECIMAL},
        forecast_threeday_sales = #{forecastThreedaySales,jdbcType=DECIMAL},
        forecast_fourthday_sales = #{forecastFourthdaySales,jdbcType=DECIMAL},
        forecast_fiveday_sales = #{forecastFivedaySales,jdbcType=DECIMAL},
        forecast_sixday_sales = #{forecastSixdaySales,jdbcType=DECIMAL},
        forecast_sevenday_sales = #{forecastSevendaySales,jdbcType=DECIMAL},
        forecast_eightday_sales = #{forecastEightdaySales,jdbcType=DECIMAL},
        forecast_nineday_sales = #{forecastNinedaySales,jdbcType=DECIMAL},
        forecast_tenday_sales = #{forecastTendaySales,jdbcType=DECIMAL},
        forecast_elevenday_sales = #{forecastElevendaySales,jdbcType=DECIMAL},
        forecast_twelveday_sales = #{forecastTwelvedaySales,jdbcType=DECIMAL},
        forecast_thridteenday_sales = #{forecastThridteendaySales,jdbcType=DECIMAL},
        forecast_fourteenday_sales = #{forecastFourteendaySales,jdbcType=DECIMAL},
        forecast_fifteenday_sales = #{forecastFifteendaySales,jdbcType=DECIMAL},
        forecast_sixteenday_sales = #{forecastSixteendaySales,jdbcType=DECIMAL},
        forecast_seventeenday_sales = #{forecastSeventeendaySales,jdbcType=DECIMAL},
        forecast_eighteenday_sales = #{forecastEighteendaySales,jdbcType=DECIMAL},
        forecast_nineteenday_sales = #{forecastNineteendaySales,jdbcType=DECIMAL},
        forecast_twentyday_sales = #{forecastTwentydaySales,jdbcType=DECIMAL},
        forecast_twenty_oneday_sales = #{forecastTwentyOnedaySales,jdbcType=DECIMAL},
        forecast_twenty_twoday_sales = #{forecastTwentyTwodaySales,jdbcType=DECIMAL},
        forecast_twenty_threeday_sales = #{forecastTwentyThreedaySales,jdbcType=DECIMAL},
        forecast_twenty_fourthday_sales = #{forecastTwentyFourthdaySales,jdbcType=DECIMAL},
        forecast_twenty_fiveday_sales = #{forecastTwentyFivedaySales,jdbcType=DECIMAL},
        forecast_twenty_sixday_sales = #{forecastTwentySixdaySales,jdbcType=DECIMAL},
        forecast_twenty_seveneday_sales = #{forecastTwentySevenedaySales,jdbcType=DECIMAL},
        forecast_twenty_eightday_sales = #{forecastTwentyEightdaySales,jdbcType=DECIMAL},
        forecast_twenty_nineday_sales = #{forecastTwentyNinedaySales,jdbcType=DECIMAL},
        forecast_thirtyday_sales = #{forecastThirtydaySales,jdbcType=DECIMAL},
        k_variable = #{kVariable,jdbcType=DECIMAL},
        b_variable = #{bVariable,jdbcType=DECIMAL},
        r_variable = #{rVariable,jdbcType=DECIMAL},
        average_sales = #{averageSales,jdbcType=DECIMAL},
        details = #{details,jdbcType=VARCHAR},
        fit_a_variable = #{fitAVariable,jdbcType=DECIMAL},
        fit_b_variable = #{fitBVariable,jdbcType=DECIMAL},
        fit_r_variable = #{fitRVariable,jdbcType=DECIMAL},
        fit_forecast_formula = #{fitForecastFormula,jdbcType=VARCHAR},
        history_sales_details = #{historySalesDetails,jdbcType=VARCHAR},
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
    </insert>
    <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAutoSalesExample"
            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_sales
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
        <if test="orderByClause != null">
            order by ${orderByClause}
        </if>
        limit 1
    </select>

    <select id="getSalesVolumeDTO" resultType="com.bailuntec.domain.dto.SalesVolumeDTO">
        SELECT  bailun_sku, warehouse_code,warehouse_name,title, bailun_category_id as category_id,
        thirtyday_sales,twenty_nineday_sales,twenty_eightday_sales,twenty_seveneday_sales,twenty_sixday_sales,twenty_fiveday_sales,twenty_fourthday_sales,twenty_threeday_sales,twenty_twoday_sales,twenty_oneday_sales
        ,twentyday_sales,nineteenday_sales,eighteenday_sales,seventeenday_sales,sixteenday_sales,fifteenday_sales,fourteenday_sales,thridteenday_sales,twelveday_sales,elevenday_sales
        ,tenday_sales,nineday_sales,eightday_sales,sevenday_sales,sixday_sales,fiveday_sales,fourthday_sales,threeday_sales,twoday_sales,oneday_sales,
        CONCAT_WS(',', thirtyday_sales,twenty_nineday_sales,twenty_eightday_sales,twenty_seveneday_sales,twenty_sixday_sales,twenty_fiveday_sales,twenty_fourthday_sales,twenty_threeday_sales,twenty_twoday_sales,twenty_oneday_sales
        ,twentyday_sales,nineteenday_sales,eighteenday_sales,seventeenday_sales,sixteenday_sales,fifteenday_sales,fourteenday_sales,thridteenday_sales,twelveday_sales,elevenday_sales
        ,tenday_sales,nineday_sales,eightday_sales,sevenday_sales,sixday_sales,fiveday_sales,fourthday_sales,threeday_sales,twoday_sales,oneday_sales) as 'history_sales'
        from
        (SELECT  bailun_sku, warehouse_code,warehouse_name,bailun_sku_title_cn title, bailun_category_id,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 1 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'oneday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 2 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twoday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 3 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'threeday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 4 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'fourthday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 5 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'fiveday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 6 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'sixday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 7 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'sevenday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 8 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'eightday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 9 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'nineday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 10 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'tenday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 11 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'elevenday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 12 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twelveday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 13 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'thridteenday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 14 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'fourteenday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 15 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'fifteenday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 16 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'sixteenday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 17 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'seventeenday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 18 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'eighteenday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 19 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'nineteenday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 20 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twentyday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 21 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twenty_oneday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 22 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twenty_twoday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 23 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twenty_threeday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 24 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twenty_fourthday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 25 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twenty_fiveday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 26 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twenty_sixday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 27 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twenty_seveneday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 28 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twenty_eightday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 29 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'twenty_nineday_sales' ,
        sum(case when (DATE_SUB(#{queryTime}, INTERVAL 30 DAY) = DATE_FORMAT(paid_time,'%Y-%m-%d')) then bailun_sku_quantity_ordered else 0 end) as 'thirtyday_sales'
        FROM `dc_base_oms_sku`  where paid_time >= DATE_SUB(#{queryTime}, INTERVAL 30 DAY) and  paid_time &lt; #{queryTime} and has_cancle = 0   and  bailun_sku = #{bailunSku} and warehouse_code = #{warehouseCode}) sales_table
    </select>
</mapper>