<?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.DcBaseCompanyAccountMapper">
    <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcBaseCompanyAccount">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="company_id" jdbcType="INTEGER" property="companyId"/>
        <result column="account_id" jdbcType="INTEGER" property="accountId"/>
        <result column="account_name" jdbcType="VARCHAR" property="accountName"/>
        <result column="account_email" jdbcType="VARCHAR" property="accountEmail"/>
        <result column="oms_code" jdbcType="VARCHAR" property="omsCode"/>
        <result column="oms_account" jdbcType="VARCHAR" property="omsAccount"/>
        <result column="platform_id" jdbcType="INTEGER" property="platformId"/>
        <result column="platform_cn" jdbcType="VARCHAR" property="platformCn"/>
        <result column="platform_en" jdbcType="VARCHAR" property="platformEn"/>
        <result column="site_id" jdbcType="INTEGER" property="siteId"/>
        <result column="site_cn" jdbcType="VARCHAR" property="siteCn"/>
        <result column="site_en" jdbcType="VARCHAR" property="siteEn"/>
        <result column="auth_json" jdbcType="VARCHAR" property="authJson"/>
        <result column="status" jdbcType="BIT" property="status"/>
        <result column="status_cn" jdbcType="VARCHAR" property="statusCn"/>
        <result column="soap_auth_token" jdbcType="VARCHAR" property="soapAuthToken"/>
        <result column="soap_auth_status" jdbcType="TINYINT" property="soapAuthStatus"/>
        <result column="auth_status" jdbcType="TINYINT" property="authStatus"/>
        <result column="extension_info" jdbcType="VARCHAR" property="extensionInfo"/>
        <result column="developer_json" jdbcType="VARCHAR" property="developerJson"/>
        <result column="manager" jdbcType="VARCHAR" property="manager"/>
        <result column="seller_id" jdbcType="VARCHAR" property="sellerId"/>
        <result column="ebay_ad_auth_json" jdbcType="VARCHAR" property="ebayAdAuthJson"/>
        <result column="bj_create" jdbcType="TIMESTAMP" property="bjCreate"/>
        <result column="bj_modified" jdbcType="TIMESTAMP" property="bjModified"/>
        <result column="amazon_ad_auth_json" jdbcType="VARCHAR" property="amazonAdAuthJson"/>
    </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, company_id, account_id, account_name, account_email, oms_code, oms_account, platform_id,
        platform_cn, platform_en, site_id, site_cn, site_en, auth_json, status, status_cn,
        soap_auth_token, soap_auth_status, auth_status, extension_info, developer_json, manager,
        seller_id, ebay_ad_auth_json, bj_create, bj_modified, amazon_ad_auth_json
    </sql>
    <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseCompanyAccountExample"
            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_company_account
        <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_company_account
        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_company_account
        where id = #{id,jdbcType=INTEGER}
    </delete>
    <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcBaseCompanyAccountExample">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        delete from dc_base_company_account
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
    </delete>
    <insert id="insert" parameterType="com.bailuntec.domain.entity.DcBaseCompanyAccount">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into dc_base_company_account (id, company_id, account_id,
        account_name, account_email, oms_code,
        oms_account, platform_id, platform_cn,
        platform_en, site_id, site_cn,
        site_en, auth_json, status,
        status_cn, soap_auth_token, soap_auth_status,
        auth_status, extension_info, developer_json,
        manager, seller_id, ebay_ad_auth_json,
        bj_create, bj_modified, amazon_ad_auth_json
        )
        values (#{id,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{accountId,jdbcType=INTEGER},
        #{accountName,jdbcType=VARCHAR}, #{accountEmail,jdbcType=VARCHAR}, #{omsCode,jdbcType=VARCHAR},
        #{omsAccount,jdbcType=VARCHAR}, #{platformId,jdbcType=INTEGER}, #{platformCn,jdbcType=VARCHAR},
        #{platformEn,jdbcType=VARCHAR}, #{siteId,jdbcType=INTEGER}, #{siteCn,jdbcType=VARCHAR},
        #{siteEn,jdbcType=VARCHAR}, #{authJson,jdbcType=VARCHAR}, #{status,jdbcType=BIT},
        #{statusCn,jdbcType=VARCHAR}, #{soapAuthToken,jdbcType=VARCHAR}, #{soapAuthStatus,jdbcType=TINYINT},
        #{authStatus,jdbcType=TINYINT}, #{extensionInfo,jdbcType=VARCHAR}, #{developerJson,jdbcType=VARCHAR},
        #{manager,jdbcType=VARCHAR}, #{sellerId,jdbcType=VARCHAR}, #{ebayAdAuthJson,jdbcType=VARCHAR},
        #{bjCreate,jdbcType=TIMESTAMP}, #{bjModified,jdbcType=TIMESTAMP}, #{amazonAdAuthJson,jdbcType=VARCHAR}
        )
    </insert>
    <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseCompanyAccount">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into dc_base_company_account
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="companyId != null">
                company_id,
            </if>
            <if test="accountId != null">
                account_id,
            </if>
            <if test="accountName != null">
                account_name,
            </if>
            <if test="accountEmail != null">
                account_email,
            </if>
            <if test="omsCode != null">
                oms_code,
            </if>
            <if test="omsAccount != null">
                oms_account,
            </if>
            <if test="platformId != null">
                platform_id,
            </if>
            <if test="platformCn != null">
                platform_cn,
            </if>
            <if test="platformEn != null">
                platform_en,
            </if>
            <if test="siteId != null">
                site_id,
            </if>
            <if test="siteCn != null">
                site_cn,
            </if>
            <if test="siteEn != null">
                site_en,
            </if>
            <if test="authJson != null">
                auth_json,
            </if>
            <if test="status != null">
                status,
            </if>
            <if test="statusCn != null">
                status_cn,
            </if>
            <if test="soapAuthToken != null">
                soap_auth_token,
            </if>
            <if test="soapAuthStatus != null">
                soap_auth_status,
            </if>
            <if test="authStatus != null">
                auth_status,
            </if>
            <if test="extensionInfo != null">
                extension_info,
            </if>
            <if test="developerJson != null">
                developer_json,
            </if>
            <if test="manager != null">
                manager,
            </if>
            <if test="sellerId != null">
                seller_id,
            </if>
            <if test="ebayAdAuthJson != null">
                ebay_ad_auth_json,
            </if>
            <if test="bjCreate != null">
                bj_create,
            </if>
            <if test="bjModified != null">
                bj_modified,
            </if>
            <if test="amazonAdAuthJson != null">
                amazon_ad_auth_json,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=INTEGER},
            </if>
            <if test="companyId != null">
                #{companyId,jdbcType=INTEGER},
            </if>
            <if test="accountId != null">
                #{accountId,jdbcType=INTEGER},
            </if>
            <if test="accountName != null">
                #{accountName,jdbcType=VARCHAR},
            </if>
            <if test="accountEmail != null">
                #{accountEmail,jdbcType=VARCHAR},
            </if>
            <if test="omsCode != null">
                #{omsCode,jdbcType=VARCHAR},
            </if>
            <if test="omsAccount != null">
                #{omsAccount,jdbcType=VARCHAR},
            </if>
            <if test="platformId != null">
                #{platformId,jdbcType=INTEGER},
            </if>
            <if test="platformCn != null">
                #{platformCn,jdbcType=VARCHAR},
            </if>
            <if test="platformEn != null">
                #{platformEn,jdbcType=VARCHAR},
            </if>
            <if test="siteId != null">
                #{siteId,jdbcType=INTEGER},
            </if>
            <if test="siteCn != null">
                #{siteCn,jdbcType=VARCHAR},
            </if>
            <if test="siteEn != null">
                #{siteEn,jdbcType=VARCHAR},
            </if>
            <if test="authJson != null">
                #{authJson,jdbcType=VARCHAR},
            </if>
            <if test="status != null">
                #{status,jdbcType=BIT},
            </if>
            <if test="statusCn != null">
                #{statusCn,jdbcType=VARCHAR},
            </if>
            <if test="soapAuthToken != null">
                #{soapAuthToken,jdbcType=VARCHAR},
            </if>
            <if test="soapAuthStatus != null">
                #{soapAuthStatus,jdbcType=TINYINT},
            </if>
            <if test="authStatus != null">
                #{authStatus,jdbcType=TINYINT},
            </if>
            <if test="extensionInfo != null">
                #{extensionInfo,jdbcType=VARCHAR},
            </if>
            <if test="developerJson != null">
                #{developerJson,jdbcType=VARCHAR},
            </if>
            <if test="manager != null">
                #{manager,jdbcType=VARCHAR},
            </if>
            <if test="sellerId != null">
                #{sellerId,jdbcType=VARCHAR},
            </if>
            <if test="ebayAdAuthJson != null">
                #{ebayAdAuthJson,jdbcType=VARCHAR},
            </if>
            <if test="bjCreate != null">
                #{bjCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjModified != null">
                #{bjModified,jdbcType=TIMESTAMP},
            </if>
            <if test="amazonAdAuthJson != null">
                #{amazonAdAuthJson,jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>
    <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseCompanyAccountExample"
            resultType="java.lang.Long">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        select count(*) from dc_base_company_account
        <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_company_account
        <set>
            <if test="record.id != null">
                id = #{record.id,jdbcType=INTEGER},
            </if>
            <if test="record.companyId != null">
                company_id = #{record.companyId,jdbcType=INTEGER},
            </if>
            <if test="record.accountId != null">
                account_id = #{record.accountId,jdbcType=INTEGER},
            </if>
            <if test="record.accountName != null">
                account_name = #{record.accountName,jdbcType=VARCHAR},
            </if>
            <if test="record.accountEmail != null">
                account_email = #{record.accountEmail,jdbcType=VARCHAR},
            </if>
            <if test="record.omsCode != null">
                oms_code = #{record.omsCode,jdbcType=VARCHAR},
            </if>
            <if test="record.omsAccount != null">
                oms_account = #{record.omsAccount,jdbcType=VARCHAR},
            </if>
            <if test="record.platformId != null">
                platform_id = #{record.platformId,jdbcType=INTEGER},
            </if>
            <if test="record.platformCn != null">
                platform_cn = #{record.platformCn,jdbcType=VARCHAR},
            </if>
            <if test="record.platformEn != null">
                platform_en = #{record.platformEn,jdbcType=VARCHAR},
            </if>
            <if test="record.siteId != null">
                site_id = #{record.siteId,jdbcType=INTEGER},
            </if>
            <if test="record.siteCn != null">
                site_cn = #{record.siteCn,jdbcType=VARCHAR},
            </if>
            <if test="record.siteEn != null">
                site_en = #{record.siteEn,jdbcType=VARCHAR},
            </if>
            <if test="record.authJson != null">
                auth_json = #{record.authJson,jdbcType=VARCHAR},
            </if>
            <if test="record.status != null">
                status = #{record.status,jdbcType=BIT},
            </if>
            <if test="record.statusCn != null">
                status_cn = #{record.statusCn,jdbcType=VARCHAR},
            </if>
            <if test="record.soapAuthToken != null">
                soap_auth_token = #{record.soapAuthToken,jdbcType=VARCHAR},
            </if>
            <if test="record.soapAuthStatus != null">
                soap_auth_status = #{record.soapAuthStatus,jdbcType=TINYINT},
            </if>
            <if test="record.authStatus != null">
                auth_status = #{record.authStatus,jdbcType=TINYINT},
            </if>
            <if test="record.extensionInfo != null">
                extension_info = #{record.extensionInfo,jdbcType=VARCHAR},
            </if>
            <if test="record.developerJson != null">
                developer_json = #{record.developerJson,jdbcType=VARCHAR},
            </if>
            <if test="record.manager != null">
                manager = #{record.manager,jdbcType=VARCHAR},
            </if>
            <if test="record.sellerId != null">
                seller_id = #{record.sellerId,jdbcType=VARCHAR},
            </if>
            <if test="record.ebayAdAuthJson != null">
                ebay_ad_auth_json = #{record.ebayAdAuthJson,jdbcType=VARCHAR},
            </if>
            <if test="record.bjCreate != null">
                bj_create = #{record.bjCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="record.bjModified != null">
                bj_modified = #{record.bjModified,jdbcType=TIMESTAMP},
            </if>
            <if test="record.amazonAdAuthJson != null">
                amazon_ad_auth_json = #{record.amazonAdAuthJson,jdbcType=VARCHAR},
            </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_company_account
        set id = #{record.id,jdbcType=INTEGER},
        company_id = #{record.companyId,jdbcType=INTEGER},
        account_id = #{record.accountId,jdbcType=INTEGER},
        account_name = #{record.accountName,jdbcType=VARCHAR},
        account_email = #{record.accountEmail,jdbcType=VARCHAR},
        oms_code = #{record.omsCode,jdbcType=VARCHAR},
        oms_account = #{record.omsAccount,jdbcType=VARCHAR},
        platform_id = #{record.platformId,jdbcType=INTEGER},
        platform_cn = #{record.platformCn,jdbcType=VARCHAR},
        platform_en = #{record.platformEn,jdbcType=VARCHAR},
        site_id = #{record.siteId,jdbcType=INTEGER},
        site_cn = #{record.siteCn,jdbcType=VARCHAR},
        site_en = #{record.siteEn,jdbcType=VARCHAR},
        auth_json = #{record.authJson,jdbcType=VARCHAR},
        status = #{record.status,jdbcType=BIT},
        status_cn = #{record.statusCn,jdbcType=VARCHAR},
        soap_auth_token = #{record.soapAuthToken,jdbcType=VARCHAR},
        soap_auth_status = #{record.soapAuthStatus,jdbcType=TINYINT},
        auth_status = #{record.authStatus,jdbcType=TINYINT},
        extension_info = #{record.extensionInfo,jdbcType=VARCHAR},
        developer_json = #{record.developerJson,jdbcType=VARCHAR},
        manager = #{record.manager,jdbcType=VARCHAR},
        seller_id = #{record.sellerId,jdbcType=VARCHAR},
        ebay_ad_auth_json = #{record.ebayAdAuthJson,jdbcType=VARCHAR},
        bj_create = #{record.bjCreate,jdbcType=TIMESTAMP},
        bj_modified = #{record.bjModified,jdbcType=TIMESTAMP},
        amazon_ad_auth_json = #{record.amazonAdAuthJson,jdbcType=VARCHAR}
        <if test="_parameter != null">
            <include refid="Update_By_Example_Where_Clause"/>
        </if>
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcBaseCompanyAccount">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update dc_base_company_account
        <set>
            <if test="companyId != null">
                company_id = #{companyId,jdbcType=INTEGER},
            </if>
            <if test="accountId != null">
                account_id = #{accountId,jdbcType=INTEGER},
            </if>
            <if test="accountName != null">
                account_name = #{accountName,jdbcType=VARCHAR},
            </if>
            <if test="accountEmail != null">
                account_email = #{accountEmail,jdbcType=VARCHAR},
            </if>
            <if test="omsCode != null">
                oms_code = #{omsCode,jdbcType=VARCHAR},
            </if>
            <if test="omsAccount != null">
                oms_account = #{omsAccount,jdbcType=VARCHAR},
            </if>
            <if test="platformId != null">
                platform_id = #{platformId,jdbcType=INTEGER},
            </if>
            <if test="platformCn != null">
                platform_cn = #{platformCn,jdbcType=VARCHAR},
            </if>
            <if test="platformEn != null">
                platform_en = #{platformEn,jdbcType=VARCHAR},
            </if>
            <if test="siteId != null">
                site_id = #{siteId,jdbcType=INTEGER},
            </if>
            <if test="siteCn != null">
                site_cn = #{siteCn,jdbcType=VARCHAR},
            </if>
            <if test="siteEn != null">
                site_en = #{siteEn,jdbcType=VARCHAR},
            </if>
            <if test="authJson != null">
                auth_json = #{authJson,jdbcType=VARCHAR},
            </if>
            <if test="status != null">
                status = #{status,jdbcType=BIT},
            </if>
            <if test="statusCn != null">
                status_cn = #{statusCn,jdbcType=VARCHAR},
            </if>
            <if test="soapAuthToken != null">
                soap_auth_token = #{soapAuthToken,jdbcType=VARCHAR},
            </if>
            <if test="soapAuthStatus != null">
                soap_auth_status = #{soapAuthStatus,jdbcType=TINYINT},
            </if>
            <if test="authStatus != null">
                auth_status = #{authStatus,jdbcType=TINYINT},
            </if>
            <if test="extensionInfo != null">
                extension_info = #{extensionInfo,jdbcType=VARCHAR},
            </if>
            <if test="developerJson != null">
                developer_json = #{developerJson,jdbcType=VARCHAR},
            </if>
            <if test="manager != null">
                manager = #{manager,jdbcType=VARCHAR},
            </if>
            <if test="sellerId != null">
                seller_id = #{sellerId,jdbcType=VARCHAR},
            </if>
            <if test="ebayAdAuthJson != null">
                ebay_ad_auth_json = #{ebayAdAuthJson,jdbcType=VARCHAR},
            </if>
            <if test="bjCreate != null">
                bj_create = #{bjCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjModified != null">
                bj_modified = #{bjModified,jdbcType=TIMESTAMP},
            </if>
            <if test="amazonAdAuthJson != null">
                amazon_ad_auth_json = #{amazonAdAuthJson,jdbcType=VARCHAR},
            </if>
        </set>
        where id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcBaseCompanyAccount">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update dc_base_company_account
        set company_id = #{companyId,jdbcType=INTEGER},
        account_id = #{accountId,jdbcType=INTEGER},
        account_name = #{accountName,jdbcType=VARCHAR},
        account_email = #{accountEmail,jdbcType=VARCHAR},
        oms_code = #{omsCode,jdbcType=VARCHAR},
        oms_account = #{omsAccount,jdbcType=VARCHAR},
        platform_id = #{platformId,jdbcType=INTEGER},
        platform_cn = #{platformCn,jdbcType=VARCHAR},
        platform_en = #{platformEn,jdbcType=VARCHAR},
        site_id = #{siteId,jdbcType=INTEGER},
        site_cn = #{siteCn,jdbcType=VARCHAR},
        site_en = #{siteEn,jdbcType=VARCHAR},
        auth_json = #{authJson,jdbcType=VARCHAR},
        status = #{status,jdbcType=BIT},
        status_cn = #{statusCn,jdbcType=VARCHAR},
        soap_auth_token = #{soapAuthToken,jdbcType=VARCHAR},
        soap_auth_status = #{soapAuthStatus,jdbcType=TINYINT},
        auth_status = #{authStatus,jdbcType=TINYINT},
        extension_info = #{extensionInfo,jdbcType=VARCHAR},
        developer_json = #{developerJson,jdbcType=VARCHAR},
        manager = #{manager,jdbcType=VARCHAR},
        seller_id = #{sellerId,jdbcType=VARCHAR},
        ebay_ad_auth_json = #{ebayAdAuthJson,jdbcType=VARCHAR},
        bj_create = #{bjCreate,jdbcType=TIMESTAMP},
        bj_modified = #{bjModified,jdbcType=TIMESTAMP},
        amazon_ad_auth_json = #{amazonAdAuthJson,jdbcType=VARCHAR}
        where id = #{id,jdbcType=INTEGER}
    </update>
    <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseCompanyAccount">
        <!--
          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_company_account
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="companyId != null">
                company_id,
            </if>
            <if test="accountId != null">
                account_id,
            </if>
            <if test="accountName != null">
                account_name,
            </if>
            <if test="accountEmail != null">
                account_email,
            </if>
            <if test="omsCode != null">
                oms_code,
            </if>
            <if test="omsAccount != null">
                oms_account,
            </if>
            <if test="platformId != null">
                platform_id,
            </if>
            <if test="platformCn != null">
                platform_cn,
            </if>
            <if test="platformEn != null">
                platform_en,
            </if>
            <if test="siteId != null">
                site_id,
            </if>
            <if test="siteCn != null">
                site_cn,
            </if>
            <if test="siteEn != null">
                site_en,
            </if>
            <if test="authJson != null">
                auth_json,
            </if>
            <if test="status != null">
                status,
            </if>
            <if test="statusCn != null">
                status_cn,
            </if>
            <if test="soapAuthToken != null">
                soap_auth_token,
            </if>
            <if test="soapAuthStatus != null">
                soap_auth_status,
            </if>
            <if test="authStatus != null">
                auth_status,
            </if>
            <if test="extensionInfo != null">
                extension_info,
            </if>
            <if test="developerJson != null">
                developer_json,
            </if>
            <if test="manager != null">
                manager,
            </if>
            <if test="sellerId != null">
                seller_id,
            </if>
            <if test="ebayAdAuthJson != null">
                ebay_ad_auth_json,
            </if>
            <if test="bjCreate != null">
                bj_create,
            </if>
            <if test="bjModified != null">
                bj_modified,
            </if>
            <if test="amazonAdAuthJson != null">
                amazon_ad_auth_json,
            </if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=INTEGER},
            </if>
            <if test="companyId != null">
                #{companyId,jdbcType=INTEGER},
            </if>
            <if test="accountId != null">
                #{accountId,jdbcType=INTEGER},
            </if>
            <if test="accountName != null">
                #{accountName,jdbcType=VARCHAR},
            </if>
            <if test="accountEmail != null">
                #{accountEmail,jdbcType=VARCHAR},
            </if>
            <if test="omsCode != null">
                #{omsCode,jdbcType=VARCHAR},
            </if>
            <if test="omsAccount != null">
                #{omsAccount,jdbcType=VARCHAR},
            </if>
            <if test="platformId != null">
                #{platformId,jdbcType=INTEGER},
            </if>
            <if test="platformCn != null">
                #{platformCn,jdbcType=VARCHAR},
            </if>
            <if test="platformEn != null">
                #{platformEn,jdbcType=VARCHAR},
            </if>
            <if test="siteId != null">
                #{siteId,jdbcType=INTEGER},
            </if>
            <if test="siteCn != null">
                #{siteCn,jdbcType=VARCHAR},
            </if>
            <if test="siteEn != null">
                #{siteEn,jdbcType=VARCHAR},
            </if>
            <if test="authJson != null">
                #{authJson,jdbcType=VARCHAR},
            </if>
            <if test="status != null">
                #{status,jdbcType=BIT},
            </if>
            <if test="statusCn != null">
                #{statusCn,jdbcType=VARCHAR},
            </if>
            <if test="soapAuthToken != null">
                #{soapAuthToken,jdbcType=VARCHAR},
            </if>
            <if test="soapAuthStatus != null">
                #{soapAuthStatus,jdbcType=TINYINT},
            </if>
            <if test="authStatus != null">
                #{authStatus,jdbcType=TINYINT},
            </if>
            <if test="extensionInfo != null">
                #{extensionInfo,jdbcType=VARCHAR},
            </if>
            <if test="developerJson != null">
                #{developerJson,jdbcType=VARCHAR},
            </if>
            <if test="manager != null">
                #{manager,jdbcType=VARCHAR},
            </if>
            <if test="sellerId != null">
                #{sellerId,jdbcType=VARCHAR},
            </if>
            <if test="ebayAdAuthJson != null">
                #{ebayAdAuthJson,jdbcType=VARCHAR},
            </if>
            <if test="bjCreate != null">
                #{bjCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjModified != null">
                #{bjModified,jdbcType=TIMESTAMP},
            </if>
            <if test="amazonAdAuthJson != null">
                #{amazonAdAuthJson,jdbcType=VARCHAR},
            </if>
        </trim>
        on duplicate key update
        <trim suffixOverrides=",">
            <if test="id != null">
                id = #{id,jdbcType=INTEGER},
            </if>
            <if test="companyId != null">
                company_id = #{companyId,jdbcType=INTEGER},
            </if>
            <if test="accountId != null">
                account_id = #{accountId,jdbcType=INTEGER},
            </if>
            <if test="accountName != null">
                account_name = #{accountName,jdbcType=VARCHAR},
            </if>
            <if test="accountEmail != null">
                account_email = #{accountEmail,jdbcType=VARCHAR},
            </if>
            <if test="omsCode != null">
                oms_code = #{omsCode,jdbcType=VARCHAR},
            </if>
            <if test="omsAccount != null">
                oms_account = #{omsAccount,jdbcType=VARCHAR},
            </if>
            <if test="platformId != null">
                platform_id = #{platformId,jdbcType=INTEGER},
            </if>
            <if test="platformCn != null">
                platform_cn = #{platformCn,jdbcType=VARCHAR},
            </if>
            <if test="platformEn != null">
                platform_en = #{platformEn,jdbcType=VARCHAR},
            </if>
            <if test="siteId != null">
                site_id = #{siteId,jdbcType=INTEGER},
            </if>
            <if test="siteCn != null">
                site_cn = #{siteCn,jdbcType=VARCHAR},
            </if>
            <if test="siteEn != null">
                site_en = #{siteEn,jdbcType=VARCHAR},
            </if>
            <if test="authJson != null">
                auth_json = #{authJson,jdbcType=VARCHAR},
            </if>
            <if test="status != null">
                status = #{status,jdbcType=BIT},
            </if>
            <if test="statusCn != null">
                status_cn = #{statusCn,jdbcType=VARCHAR},
            </if>
            <if test="soapAuthToken != null">
                soap_auth_token = #{soapAuthToken,jdbcType=VARCHAR},
            </if>
            <if test="soapAuthStatus != null">
                soap_auth_status = #{soapAuthStatus,jdbcType=TINYINT},
            </if>
            <if test="authStatus != null">
                auth_status = #{authStatus,jdbcType=TINYINT},
            </if>
            <if test="extensionInfo != null">
                extension_info = #{extensionInfo,jdbcType=VARCHAR},
            </if>
            <if test="developerJson != null">
                developer_json = #{developerJson,jdbcType=VARCHAR},
            </if>
            <if test="manager != null">
                manager = #{manager,jdbcType=VARCHAR},
            </if>
            <if test="sellerId != null">
                seller_id = #{sellerId,jdbcType=VARCHAR},
            </if>
            <if test="ebayAdAuthJson != null">
                ebay_ad_auth_json = #{ebayAdAuthJson,jdbcType=VARCHAR},
            </if>
            <if test="bjCreate != null">
                bj_create = #{bjCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjModified != null">
                bj_modified = #{bjModified,jdbcType=TIMESTAMP},
            </if>
            <if test="amazonAdAuthJson != null">
                amazon_ad_auth_json = #{amazonAdAuthJson,jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>
    <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseCompanyAccount">
        <!--
          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_company_account
        (id, company_id, account_id, account_name, account_email, oms_code, oms_account,
        platform_id, platform_cn, platform_en, site_id, site_cn, site_en, auth_json, status,
        status_cn, soap_auth_token, soap_auth_status, auth_status, extension_info, developer_json,
        manager, seller_id, ebay_ad_auth_json, bj_create, bj_modified, amazon_ad_auth_json
        )
        values
        (#{id,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{accountId,jdbcType=INTEGER},
        #{accountName,jdbcType=VARCHAR}, #{accountEmail,jdbcType=VARCHAR}, #{omsCode,jdbcType=VARCHAR},
        #{omsAccount,jdbcType=VARCHAR}, #{platformId,jdbcType=INTEGER}, #{platformCn,jdbcType=VARCHAR},
        #{platformEn,jdbcType=VARCHAR}, #{siteId,jdbcType=INTEGER}, #{siteCn,jdbcType=VARCHAR},
        #{siteEn,jdbcType=VARCHAR}, #{authJson,jdbcType=VARCHAR}, #{status,jdbcType=BIT},
        #{statusCn,jdbcType=VARCHAR}, #{soapAuthToken,jdbcType=VARCHAR}, #{soapAuthStatus,jdbcType=TINYINT},
        #{authStatus,jdbcType=TINYINT}, #{extensionInfo,jdbcType=VARCHAR}, #{developerJson,jdbcType=VARCHAR},
        #{manager,jdbcType=VARCHAR}, #{sellerId,jdbcType=VARCHAR}, #{ebayAdAuthJson,jdbcType=VARCHAR},
        #{bjCreate,jdbcType=TIMESTAMP}, #{bjModified,jdbcType=TIMESTAMP}, #{amazonAdAuthJson,jdbcType=VARCHAR}
        )
        on duplicate key update
        id = #{id,jdbcType=INTEGER},
        company_id = #{companyId,jdbcType=INTEGER},
        account_id = #{accountId,jdbcType=INTEGER},
        account_name = #{accountName,jdbcType=VARCHAR},
        account_email = #{accountEmail,jdbcType=VARCHAR},
        oms_code = #{omsCode,jdbcType=VARCHAR},
        oms_account = #{omsAccount,jdbcType=VARCHAR},
        platform_id = #{platformId,jdbcType=INTEGER},
        platform_cn = #{platformCn,jdbcType=VARCHAR},
        platform_en = #{platformEn,jdbcType=VARCHAR},
        site_id = #{siteId,jdbcType=INTEGER},
        site_cn = #{siteCn,jdbcType=VARCHAR},
        site_en = #{siteEn,jdbcType=VARCHAR},
        auth_json = #{authJson,jdbcType=VARCHAR},
        status = #{status,jdbcType=BIT},
        status_cn = #{statusCn,jdbcType=VARCHAR},
        soap_auth_token = #{soapAuthToken,jdbcType=VARCHAR},
        soap_auth_status = #{soapAuthStatus,jdbcType=TINYINT},
        auth_status = #{authStatus,jdbcType=TINYINT},
        extension_info = #{extensionInfo,jdbcType=VARCHAR},
        developer_json = #{developerJson,jdbcType=VARCHAR},
        manager = #{manager,jdbcType=VARCHAR},
        seller_id = #{sellerId,jdbcType=VARCHAR},
        ebay_ad_auth_json = #{ebayAdAuthJson,jdbcType=VARCHAR},
        bj_create = #{bjCreate,jdbcType=TIMESTAMP},
        bj_modified = #{bjModified,jdbcType=TIMESTAMP},
        amazon_ad_auth_json = #{amazonAdAuthJson,jdbcType=VARCHAR}
    </insert>
    <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseCompanyAccountExample"
            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_company_account
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
        <if test="orderByClause != null">
            order by ${orderByClause}
        </if>
        limit 1
    </select>

    <update id="updateSetStatusOff">
        update dc_base_company_account
        set status=0,
            status_cn='禁用'
        where true
    </update>
</mapper>
