<?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.DcBaseSkuMappingMapper">
    <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcBaseSkuMapping">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="unicode_id" jdbcType="INTEGER" property="unicodeId"/>
        <result column="bailun_sku" jdbcType="VARCHAR" property="bailunSku"/>
        <result column="platform_sku" jdbcType="VARCHAR" property="platformSku"/>
        <result column="platform" jdbcType="VARCHAR" property="platform"/>
        <result column="platform_id" jdbcType="INTEGER" property="platformId"/>
        <result column="site" jdbcType="VARCHAR" property="site"/>
        <result column="account" jdbcType="VARCHAR" property="account"/>
        <result column="login_account" jdbcType="VARCHAR" property="loginAccount"/>
        <result column="sale_name" jdbcType="VARCHAR" property="saleName"/>
        <result column="site_id" jdbcType="INTEGER" property="siteId"/>
        <result column="account_id" jdbcType="INTEGER" property="accountId"/>
        <result column="product_id" jdbcType="INTEGER" property="productId"/>
        <result column="sku_id" jdbcType="INTEGER" property="skuId"/>
        <result column="count" jdbcType="INTEGER" property="count"/>
        <result column="title" jdbcType="VARCHAR" property="title"/>
        <result column="item_id" jdbcType="VARCHAR" property="itemId"/>
        <result column="creation_time" jdbcType="TIMESTAMP" property="creationTime"/>
        <result column="last_modification_time" jdbcType="TIMESTAMP" property="lastModificationTime"/>
        <result column="create_user_name" jdbcType="VARCHAR" property="createUserName"/>
        <result column="has_deleted" jdbcType="BIT" property="hasDeleted"/>
        <result column="company_id" jdbcType="INTEGER" property="companyId"/>
        <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, unicode_id, bailun_sku, platform_sku, platform, platform_id, site, account, login_account,
        sale_name, site_id, account_id, product_id, sku_id, count, title, item_id, creation_time,
        last_modification_time, create_user_name, has_deleted, company_id, gmt_create, gmt_modified
    </sql>
    <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseSkuMappingExample"
            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_base_sku_mapping
        <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_base_sku_mapping
        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_base_sku_mapping
        where id = #{id,jdbcType=INTEGER}
    </delete>
    <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcBaseSkuMappingExample">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        delete from dc_base_sku_mapping
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
    </delete>
    <insert id="insert" parameterType="com.bailuntec.domain.entity.DcBaseSkuMapping">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into dc_base_sku_mapping (id, unicode_id, bailun_sku,
        platform_sku, platform, platform_id,
        site, account, login_account,
        sale_name, site_id, account_id,
        product_id, sku_id, count,
        title, item_id, creation_time,
        last_modification_time, create_user_name,
        has_deleted, company_id, gmt_create,
        gmt_modified)
        values (#{id,jdbcType=INTEGER}, #{unicodeId,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR},
        #{platformSku,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, #{platformId,jdbcType=INTEGER},
        #{site,jdbcType=VARCHAR}, #{account,jdbcType=VARCHAR}, #{loginAccount,jdbcType=VARCHAR},
        #{saleName,jdbcType=VARCHAR}, #{siteId,jdbcType=INTEGER}, #{accountId,jdbcType=INTEGER},
        #{productId,jdbcType=INTEGER}, #{skuId,jdbcType=INTEGER}, #{count,jdbcType=INTEGER},
        #{title,jdbcType=VARCHAR}, #{itemId,jdbcType=VARCHAR}, #{creationTime,jdbcType=TIMESTAMP},
        #{lastModificationTime,jdbcType=TIMESTAMP}, #{createUserName,jdbcType=VARCHAR},
        #{hasDeleted,jdbcType=BIT}, #{companyId,jdbcType=INTEGER}, #{gmtCreate,jdbcType=TIMESTAMP},
        #{gmtModified,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseSkuMapping">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into dc_base_sku_mapping
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="unicodeId != null">
                unicode_id,
            </if>
            <if test="bailunSku != null">
                bailun_sku,
            </if>
            <if test="platformSku != null">
                platform_sku,
            </if>
            <if test="platform != null">
                platform,
            </if>
            <if test="platformId != null">
                platform_id,
            </if>
            <if test="site != null">
                site,
            </if>
            <if test="account != null">
                account,
            </if>
            <if test="loginAccount != null">
                login_account,
            </if>
            <if test="saleName != null">
                sale_name,
            </if>
            <if test="siteId != null">
                site_id,
            </if>
            <if test="accountId != null">
                account_id,
            </if>
            <if test="productId != null">
                product_id,
            </if>
            <if test="skuId != null">
                sku_id,
            </if>
            <if test="count != null">
                count,
            </if>
            <if test="title != null">
                title,
            </if>
            <if test="itemId != null">
                item_id,
            </if>
            <if test="creationTime != null">
                creation_time,
            </if>
            <if test="lastModificationTime != null">
                last_modification_time,
            </if>
            <if test="createUserName != null">
                create_user_name,
            </if>
            <if test="hasDeleted != null">
                has_deleted,
            </if>
            <if test="companyId != null">
                company_id,
            </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="unicodeId != null">
                #{unicodeId,jdbcType=INTEGER},
            </if>
            <if test="bailunSku != null">
                #{bailunSku,jdbcType=VARCHAR},
            </if>
            <if test="platformSku != null">
                #{platformSku,jdbcType=VARCHAR},
            </if>
            <if test="platform != null">
                #{platform,jdbcType=VARCHAR},
            </if>
            <if test="platformId != null">
                #{platformId,jdbcType=INTEGER},
            </if>
            <if test="site != null">
                #{site,jdbcType=VARCHAR},
            </if>
            <if test="account != null">
                #{account,jdbcType=VARCHAR},
            </if>
            <if test="loginAccount != null">
                #{loginAccount,jdbcType=VARCHAR},
            </if>
            <if test="saleName != null">
                #{saleName,jdbcType=VARCHAR},
            </if>
            <if test="siteId != null">
                #{siteId,jdbcType=INTEGER},
            </if>
            <if test="accountId != null">
                #{accountId,jdbcType=INTEGER},
            </if>
            <if test="productId != null">
                #{productId,jdbcType=INTEGER},
            </if>
            <if test="skuId != null">
                #{skuId,jdbcType=INTEGER},
            </if>
            <if test="count != null">
                #{count,jdbcType=INTEGER},
            </if>
            <if test="title != null">
                #{title,jdbcType=VARCHAR},
            </if>
            <if test="itemId != null">
                #{itemId,jdbcType=VARCHAR},
            </if>
            <if test="creationTime != null">
                #{creationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="lastModificationTime != null">
                #{lastModificationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="createUserName != null">
                #{createUserName,jdbcType=VARCHAR},
            </if>
            <if test="hasDeleted != null">
                #{hasDeleted,jdbcType=BIT},
            </if>
            <if test="companyId != null">
                #{companyId,jdbcType=INTEGER},
            </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.DcBaseSkuMappingExample"
            resultType="java.lang.Long">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        select count(*) from dc_base_sku_mapping
        <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_base_sku_mapping
        <set>
            <if test="record.id != null">
                id = #{record.id,jdbcType=INTEGER},
            </if>
            <if test="record.unicodeId != null">
                unicode_id = #{record.unicodeId,jdbcType=INTEGER},
            </if>
            <if test="record.bailunSku != null">
                bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
            </if>
            <if test="record.platformSku != null">
                platform_sku = #{record.platformSku,jdbcType=VARCHAR},
            </if>
            <if test="record.platform != null">
                platform = #{record.platform,jdbcType=VARCHAR},
            </if>
            <if test="record.platformId != null">
                platform_id = #{record.platformId,jdbcType=INTEGER},
            </if>
            <if test="record.site != null">
                site = #{record.site,jdbcType=VARCHAR},
            </if>
            <if test="record.account != null">
                account = #{record.account,jdbcType=VARCHAR},
            </if>
            <if test="record.loginAccount != null">
                login_account = #{record.loginAccount,jdbcType=VARCHAR},
            </if>
            <if test="record.saleName != null">
                sale_name = #{record.saleName,jdbcType=VARCHAR},
            </if>
            <if test="record.siteId != null">
                site_id = #{record.siteId,jdbcType=INTEGER},
            </if>
            <if test="record.accountId != null">
                account_id = #{record.accountId,jdbcType=INTEGER},
            </if>
            <if test="record.productId != null">
                product_id = #{record.productId,jdbcType=INTEGER},
            </if>
            <if test="record.skuId != null">
                sku_id = #{record.skuId,jdbcType=INTEGER},
            </if>
            <if test="record.count != null">
                count = #{record.count,jdbcType=INTEGER},
            </if>
            <if test="record.title != null">
                title = #{record.title,jdbcType=VARCHAR},
            </if>
            <if test="record.itemId != null">
                item_id = #{record.itemId,jdbcType=VARCHAR},
            </if>
            <if test="record.creationTime != null">
                creation_time = #{record.creationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="record.lastModificationTime != null">
                last_modification_time = #{record.lastModificationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="record.createUserName != null">
                create_user_name = #{record.createUserName,jdbcType=VARCHAR},
            </if>
            <if test="record.hasDeleted != null">
                has_deleted = #{record.hasDeleted,jdbcType=BIT},
            </if>
            <if test="record.companyId != null">
                company_id = #{record.companyId,jdbcType=INTEGER},
            </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_base_sku_mapping
        set id = #{record.id,jdbcType=INTEGER},
        unicode_id = #{record.unicodeId,jdbcType=INTEGER},
        bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
        platform_sku = #{record.platformSku,jdbcType=VARCHAR},
        platform = #{record.platform,jdbcType=VARCHAR},
        platform_id = #{record.platformId,jdbcType=INTEGER},
        site = #{record.site,jdbcType=VARCHAR},
        account = #{record.account,jdbcType=VARCHAR},
        login_account = #{record.loginAccount,jdbcType=VARCHAR},
        sale_name = #{record.saleName,jdbcType=VARCHAR},
        site_id = #{record.siteId,jdbcType=INTEGER},
        account_id = #{record.accountId,jdbcType=INTEGER},
        product_id = #{record.productId,jdbcType=INTEGER},
        sku_id = #{record.skuId,jdbcType=INTEGER},
        count = #{record.count,jdbcType=INTEGER},
        title = #{record.title,jdbcType=VARCHAR},
        item_id = #{record.itemId,jdbcType=VARCHAR},
        creation_time = #{record.creationTime,jdbcType=TIMESTAMP},
        last_modification_time = #{record.lastModificationTime,jdbcType=TIMESTAMP},
        create_user_name = #{record.createUserName,jdbcType=VARCHAR},
        has_deleted = #{record.hasDeleted,jdbcType=BIT},
        company_id = #{record.companyId,jdbcType=INTEGER},
        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.DcBaseSkuMapping">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update dc_base_sku_mapping
        <set>
            <if test="unicodeId != null">
                unicode_id = #{unicodeId,jdbcType=INTEGER},
            </if>
            <if test="bailunSku != null">
                bailun_sku = #{bailunSku,jdbcType=VARCHAR},
            </if>
            <if test="platformSku != null">
                platform_sku = #{platformSku,jdbcType=VARCHAR},
            </if>
            <if test="platform != null">
                platform = #{platform,jdbcType=VARCHAR},
            </if>
            <if test="platformId != null">
                platform_id = #{platformId,jdbcType=INTEGER},
            </if>
            <if test="site != null">
                site = #{site,jdbcType=VARCHAR},
            </if>
            <if test="account != null">
                account = #{account,jdbcType=VARCHAR},
            </if>
            <if test="loginAccount != null">
                login_account = #{loginAccount,jdbcType=VARCHAR},
            </if>
            <if test="saleName != null">
                sale_name = #{saleName,jdbcType=VARCHAR},
            </if>
            <if test="siteId != null">
                site_id = #{siteId,jdbcType=INTEGER},
            </if>
            <if test="accountId != null">
                account_id = #{accountId,jdbcType=INTEGER},
            </if>
            <if test="productId != null">
                product_id = #{productId,jdbcType=INTEGER},
            </if>
            <if test="skuId != null">
                sku_id = #{skuId,jdbcType=INTEGER},
            </if>
            <if test="count != null">
                count = #{count,jdbcType=INTEGER},
            </if>
            <if test="title != null">
                title = #{title,jdbcType=VARCHAR},
            </if>
            <if test="itemId != null">
                item_id = #{itemId,jdbcType=VARCHAR},
            </if>
            <if test="creationTime != null">
                creation_time = #{creationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="lastModificationTime != null">
                last_modification_time = #{lastModificationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="createUserName != null">
                create_user_name = #{createUserName,jdbcType=VARCHAR},
            </if>
            <if test="hasDeleted != null">
                has_deleted = #{hasDeleted,jdbcType=BIT},
            </if>
            <if test="companyId != null">
                company_id = #{companyId,jdbcType=INTEGER},
            </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.DcBaseSkuMapping">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update dc_base_sku_mapping
        set unicode_id = #{unicodeId,jdbcType=INTEGER},
        bailun_sku = #{bailunSku,jdbcType=VARCHAR},
        platform_sku = #{platformSku,jdbcType=VARCHAR},
        platform = #{platform,jdbcType=VARCHAR},
        platform_id = #{platformId,jdbcType=INTEGER},
        site = #{site,jdbcType=VARCHAR},
        account = #{account,jdbcType=VARCHAR},
        login_account = #{loginAccount,jdbcType=VARCHAR},
        sale_name = #{saleName,jdbcType=VARCHAR},
        site_id = #{siteId,jdbcType=INTEGER},
        account_id = #{accountId,jdbcType=INTEGER},
        product_id = #{productId,jdbcType=INTEGER},
        sku_id = #{skuId,jdbcType=INTEGER},
        count = #{count,jdbcType=INTEGER},
        title = #{title,jdbcType=VARCHAR},
        item_id = #{itemId,jdbcType=VARCHAR},
        creation_time = #{creationTime,jdbcType=TIMESTAMP},
        last_modification_time = #{lastModificationTime,jdbcType=TIMESTAMP},
        create_user_name = #{createUserName,jdbcType=VARCHAR},
        has_deleted = #{hasDeleted,jdbcType=BIT},
        company_id = #{companyId,jdbcType=INTEGER},
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
        where id = #{id,jdbcType=INTEGER}
    </update>
    <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseSkuMapping">
        <!--
          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_base_sku_mapping
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="unicodeId != null">
                unicode_id,
            </if>
            <if test="bailunSku != null">
                bailun_sku,
            </if>
            <if test="platformSku != null">
                platform_sku,
            </if>
            <if test="platform != null">
                platform,
            </if>
            <if test="platformId != null">
                platform_id,
            </if>
            <if test="site != null">
                site,
            </if>
            <if test="account != null">
                account,
            </if>
            <if test="loginAccount != null">
                login_account,
            </if>
            <if test="saleName != null">
                sale_name,
            </if>
            <if test="siteId != null">
                site_id,
            </if>
            <if test="accountId != null">
                account_id,
            </if>
            <if test="productId != null">
                product_id,
            </if>
            <if test="skuId != null">
                sku_id,
            </if>
            <if test="count != null">
                count,
            </if>
            <if test="title != null">
                title,
            </if>
            <if test="itemId != null">
                item_id,
            </if>
            <if test="creationTime != null">
                creation_time,
            </if>
            <if test="lastModificationTime != null">
                last_modification_time,
            </if>
            <if test="createUserName != null">
                create_user_name,
            </if>
            <if test="hasDeleted != null">
                has_deleted,
            </if>
            <if test="companyId != null">
                company_id,
            </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="unicodeId != null">
                #{unicodeId,jdbcType=INTEGER},
            </if>
            <if test="bailunSku != null">
                #{bailunSku,jdbcType=VARCHAR},
            </if>
            <if test="platformSku != null">
                #{platformSku,jdbcType=VARCHAR},
            </if>
            <if test="platform != null">
                #{platform,jdbcType=VARCHAR},
            </if>
            <if test="platformId != null">
                #{platformId,jdbcType=INTEGER},
            </if>
            <if test="site != null">
                #{site,jdbcType=VARCHAR},
            </if>
            <if test="account != null">
                #{account,jdbcType=VARCHAR},
            </if>
            <if test="loginAccount != null">
                #{loginAccount,jdbcType=VARCHAR},
            </if>
            <if test="saleName != null">
                #{saleName,jdbcType=VARCHAR},
            </if>
            <if test="siteId != null">
                #{siteId,jdbcType=INTEGER},
            </if>
            <if test="accountId != null">
                #{accountId,jdbcType=INTEGER},
            </if>
            <if test="productId != null">
                #{productId,jdbcType=INTEGER},
            </if>
            <if test="skuId != null">
                #{skuId,jdbcType=INTEGER},
            </if>
            <if test="count != null">
                #{count,jdbcType=INTEGER},
            </if>
            <if test="title != null">
                #{title,jdbcType=VARCHAR},
            </if>
            <if test="itemId != null">
                #{itemId,jdbcType=VARCHAR},
            </if>
            <if test="creationTime != null">
                #{creationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="lastModificationTime != null">
                #{lastModificationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="createUserName != null">
                #{createUserName,jdbcType=VARCHAR},
            </if>
            <if test="hasDeleted != null">
                #{hasDeleted,jdbcType=BIT},
            </if>
            <if test="companyId != null">
                #{companyId,jdbcType=INTEGER},
            </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="unicodeId != null">
                unicode_id = #{unicodeId,jdbcType=INTEGER},
            </if>
            <if test="bailunSku != null">
                bailun_sku = #{bailunSku,jdbcType=VARCHAR},
            </if>
            <if test="platformSku != null">
                platform_sku = #{platformSku,jdbcType=VARCHAR},
            </if>
            <if test="platform != null">
                platform = #{platform,jdbcType=VARCHAR},
            </if>
            <if test="platformId != null">
                platform_id = #{platformId,jdbcType=INTEGER},
            </if>
            <if test="site != null">
                site = #{site,jdbcType=VARCHAR},
            </if>
            <if test="account != null">
                account = #{account,jdbcType=VARCHAR},
            </if>
            <if test="loginAccount != null">
                login_account = #{loginAccount,jdbcType=VARCHAR},
            </if>
            <if test="saleName != null">
                sale_name = #{saleName,jdbcType=VARCHAR},
            </if>
            <if test="siteId != null">
                site_id = #{siteId,jdbcType=INTEGER},
            </if>
            <if test="accountId != null">
                account_id = #{accountId,jdbcType=INTEGER},
            </if>
            <if test="productId != null">
                product_id = #{productId,jdbcType=INTEGER},
            </if>
            <if test="skuId != null">
                sku_id = #{skuId,jdbcType=INTEGER},
            </if>
            <if test="count != null">
                count = #{count,jdbcType=INTEGER},
            </if>
            <if test="title != null">
                title = #{title,jdbcType=VARCHAR},
            </if>
            <if test="itemId != null">
                item_id = #{itemId,jdbcType=VARCHAR},
            </if>
            <if test="creationTime != null">
                creation_time = #{creationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="lastModificationTime != null">
                last_modification_time = #{lastModificationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="createUserName != null">
                create_user_name = #{createUserName,jdbcType=VARCHAR},
            </if>
            <if test="hasDeleted != null">
                has_deleted = #{hasDeleted,jdbcType=BIT},
            </if>
            <if test="companyId != null">
                company_id = #{companyId,jdbcType=INTEGER},
            </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.DcBaseSkuMapping">
        <!--
          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_base_sku_mapping
        (id, unicode_id, bailun_sku, platform_sku, platform, platform_id, site, account,
        login_account, sale_name, site_id, account_id, product_id, sku_id, count, title,
        item_id, creation_time, last_modification_time, create_user_name, has_deleted,
        company_id, gmt_create, gmt_modified)
        values
        (#{id,jdbcType=INTEGER}, #{unicodeId,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR},
        #{platformSku,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, #{platformId,jdbcType=INTEGER},
        #{site,jdbcType=VARCHAR}, #{account,jdbcType=VARCHAR}, #{loginAccount,jdbcType=VARCHAR},
        #{saleName,jdbcType=VARCHAR}, #{siteId,jdbcType=INTEGER}, #{accountId,jdbcType=INTEGER},
        #{productId,jdbcType=INTEGER}, #{skuId,jdbcType=INTEGER}, #{count,jdbcType=INTEGER},
        #{title,jdbcType=VARCHAR}, #{itemId,jdbcType=VARCHAR}, #{creationTime,jdbcType=TIMESTAMP},
        #{lastModificationTime,jdbcType=TIMESTAMP}, #{createUserName,jdbcType=VARCHAR},
        #{hasDeleted,jdbcType=BIT}, #{companyId,jdbcType=INTEGER}, #{gmtCreate,jdbcType=TIMESTAMP},
        #{gmtModified,jdbcType=TIMESTAMP})
        on duplicate key update
        id = #{id,jdbcType=INTEGER},
        unicode_id = #{unicodeId,jdbcType=INTEGER},
        bailun_sku = #{bailunSku,jdbcType=VARCHAR},
        platform_sku = #{platformSku,jdbcType=VARCHAR},
        platform = #{platform,jdbcType=VARCHAR},
        platform_id = #{platformId,jdbcType=INTEGER},
        site = #{site,jdbcType=VARCHAR},
        account = #{account,jdbcType=VARCHAR},
        login_account = #{loginAccount,jdbcType=VARCHAR},
        sale_name = #{saleName,jdbcType=VARCHAR},
        site_id = #{siteId,jdbcType=INTEGER},
        account_id = #{accountId,jdbcType=INTEGER},
        product_id = #{productId,jdbcType=INTEGER},
        sku_id = #{skuId,jdbcType=INTEGER},
        count = #{count,jdbcType=INTEGER},
        title = #{title,jdbcType=VARCHAR},
        item_id = #{itemId,jdbcType=VARCHAR},
        creation_time = #{creationTime,jdbcType=TIMESTAMP},
        last_modification_time = #{lastModificationTime,jdbcType=TIMESTAMP},
        create_user_name = #{createUserName,jdbcType=VARCHAR},
        has_deleted = #{hasDeleted,jdbcType=BIT},
        company_id = #{companyId,jdbcType=INTEGER},
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
    </insert>
    <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseSkuMappingExample"
            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_base_sku_mapping
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
        <if test="orderByClause != null">
            order by ${orderByClause}
        </if>
        limit 1
    </select>

    <select id="selectShortSiteEn" resultType="java.lang.String">
        SELECT t2.site_en
        from (select site_en, site_cn from dc_base_company_account n group by site_en order by site_cn) t1
                 LEFT JOIN (select *
                            from (select site_en, site_cn
                                  from dc_base_company_account
                                  order by site_en) t
                            group by site_cn) t2 on t1.site_cn = t2.site_cn
        where t1.site_en = #{site}

    </select>
</mapper>
