<?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.DcBaseOmsOrderMapper">
  <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcBaseOmsOrder">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="origin_order_id" jdbcType="VARCHAR" property="originOrderId" />
    <result column="platform_type" jdbcType="VARCHAR" property="platformType" />
    <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
    <result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
    <result column="pay_method" jdbcType="VARCHAR" property="payMethod" />
    <result column="pay_account" jdbcType="VARCHAR" property="payAccount" />
    <result column="pay_status" jdbcType="VARCHAR" property="payStatus" />
    <result column="collection_account" jdbcType="VARCHAR" property="collectionAccount" />
    <result column="platform_order_type" jdbcType="VARCHAR" property="platformOrderType" />
    <result column="website" jdbcType="VARCHAR" property="website" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="paid_time" jdbcType="TIMESTAMP" property="paidTime" />
    <result column="refund_time" jdbcType="TIMESTAMP" property="refundTime" />
    <result column="seller_id" jdbcType="VARCHAR" property="sellerId" />
    <result column="bailun_account_id" jdbcType="INTEGER" property="bailunAccountId" />
    <result column="hq_account" jdbcType="VARCHAR" property="hqAccount" />
    <result column="seller_account" jdbcType="VARCHAR" property="sellerAccount" />
    <result column="seller_order_id" jdbcType="VARCHAR" property="sellerOrderId" />
    <result column="seller_email" jdbcType="VARCHAR" property="sellerEmail" />
    <result column="order_update_time" jdbcType="TIMESTAMP" property="orderUpdateTime" />
    <result column="bailun_order_id" jdbcType="VARCHAR" property="bailunOrderId" />
    <result column="platform_order_status" jdbcType="VARCHAR" property="platformOrderStatus" />
    <result column="bailun_order_status" jdbcType="VARCHAR" property="bailunOrderStatus" />
    <result column="bailun_payment_status" jdbcType="VARCHAR" property="bailunPaymentStatus" />
    <result column="bailun_merge_status" jdbcType="VARCHAR" property="bailunMergeStatus" />
    <result column="bailun_interception_status" jdbcType="VARCHAR" property="bailunInterceptionStatus" />
    <result column="bailun_shipping_status" jdbcType="VARCHAR" property="bailunShippingStatus" />
    <result column="seller_order_exchange_rate" jdbcType="DECIMAL" property="sellerOrderExchangeRate" />
    <result column="seller_other_exchange_rate" jdbcType="DECIMAL" property="sellerOtherExchangeRate" />
    <result column="finance_order_exchange_rate" jdbcType="DECIMAL" property="financeOrderExchangeRate" />
    <result column="finance_other_exchange_rate" jdbcType="DECIMAL" property="financeOtherExchangeRate" />
    <result column="cny_to_usd_exchange_rate" jdbcType="DECIMAL" property="cnyToUsdExchangeRate" />
    <result column="order_to_usd_exchange_rate" jdbcType="DECIMAL" property="orderToUsdExchangeRate" />
    <result column="other_to_usd_exchange_rate" jdbcType="DECIMAL" property="otherToUsdExchangeRate" />
    <result column="order_currency" jdbcType="VARCHAR" property="orderCurrency" />
    <result column="other_currency" jdbcType="VARCHAR" property="otherCurrency" />
    <result column="amount_sales" jdbcType="DECIMAL" property="amountSales" />
    <result column="amount_total" jdbcType="DECIMAL" property="amountTotal" />
    <result column="amount_shipping" jdbcType="DECIMAL" property="amountShipping" />
    <result column="amount_product" jdbcType="DECIMAL" property="amountProduct" />
    <result column="amount_tax" jdbcType="DECIMAL" property="amountTax" />
    <result column="amount_adjustment" jdbcType="DECIMAL" property="amountAdjustment" />
    <result column="amount_gift_wrap" jdbcType="DECIMAL" property="amountGiftWrap" />
    <result column="amount_refund" jdbcType="DECIMAL" property="amountRefund" />
    <result column="amount_prepaid" jdbcType="DECIMAL" property="amountPrepaid" />
    <result column="cost_total" jdbcType="DECIMAL" property="costTotal" />
    <result column="cost_promotion" jdbcType="DECIMAL" property="costPromotion" />
    <result column="cost_platform_fee" jdbcType="DECIMAL" property="costPlatformFee" />
    <result column="cost_product" jdbcType="DECIMAL" property="costProduct" />
    <result column="cost_shipping" jdbcType="DECIMAL" property="costShipping" />
    <result column="cost_package" jdbcType="DECIMAL" property="costPackage" />
    <result column="cost_fba_fee" jdbcType="DECIMAL" property="costFbaFee" />
    <result column="cost_paypal_fee" jdbcType="DECIMAL" property="costPaypalFee" />
    <result column="cost_refund_commisson" jdbcType="DECIMAL" property="costRefundCommisson" />
    <result column="cost_handle_bailun" jdbcType="DECIMAL" property="costHandleBailun" />
    <result column="cost_handle_platform" jdbcType="DECIMAL" property="costHandlePlatform" />
    <result column="cost_tail" jdbcType="DECIMAL" property="costTail" />
    <result column="cost_first" jdbcType="DECIMAL" property="costFirst" />
    <result column="cost_logistics" jdbcType="DECIMAL" property="costLogistics" />
    <result column="profit_total" jdbcType="DECIMAL" property="profitTotal" />
    <result column="profit_rate" jdbcType="DECIMAL" property="profitRate" />
    <result column="receipt_country" jdbcType="VARCHAR" property="receiptCountry" />
    <result column="receipt_city" jdbcType="VARCHAR" property="receiptCity" />
    <result column="receipt_area" jdbcType="VARCHAR" property="receiptArea" />
    <result column="receipt_address" jdbcType="VARCHAR" property="receiptAddress" />
    <result column="receipt_address_2" jdbcType="VARCHAR" property="receiptAddress2" />
    <result column="receipt_postal_code" jdbcType="VARCHAR" property="receiptPostalCode" />
    <result column="receiver" jdbcType="VARCHAR" property="receiver" />
    <result column="receiver_phone" jdbcType="VARCHAR" property="receiverPhone" />
    <result column="buyer_id" jdbcType="VARCHAR" property="buyerId" />
    <result column="buyer_name" jdbcType="VARCHAR" property="buyerName" />
    <result column="buyer_email" jdbcType="VARCHAR" property="buyerEmail" />
    <result column="has_fba_exception" jdbcType="BIT" property="hasFbaException" />
    <result column="has_platform_exception" jdbcType="BIT" property="hasPlatformException" />
    <result column="has_cancle" jdbcType="BIT" property="hasCancle" />
    <result column="area_id" jdbcType="INTEGER" property="areaId" />
    <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
    <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
    <result column="quantity_bailun_sku" jdbcType="INTEGER" property="quantityBailunSku" />
    <result column="logistics_warehouse_code" jdbcType="VARCHAR" property="logisticsWarehouseCode" />
    <result column="logistics_warehouse_name" jdbcType="VARCHAR" property="logisticsWarehouseName" />
    <result column="logistics_method_code" jdbcType="VARCHAR" property="logisticsMethodCode" />
    <result column="logistics_method_name" jdbcType="VARCHAR" property="logisticsMethodName" />
    <result column="bailun_picking_status" jdbcType="VARCHAR" property="bailunPickingStatus" />
    <result column="bailun_require_logistics" jdbcType="VARCHAR" property="bailunRequireLogistics" />
    <result column="has_scalp" jdbcType="BIT" property="hasScalp" />
    <result column="has_innersale" jdbcType="BIT" property="hasInnersale" />
  </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, origin_order_id, platform_type, transaction_id, pay_time, pay_method, pay_account, 
    pay_status, collection_account, platform_order_type, website, create_time, paid_time, 
    refund_time, seller_id, bailun_account_id, hq_account, seller_account, seller_order_id, 
    seller_email, order_update_time, bailun_order_id, platform_order_status, bailun_order_status, 
    bailun_payment_status, bailun_merge_status, bailun_interception_status, bailun_shipping_status, 
    seller_order_exchange_rate, seller_other_exchange_rate, finance_order_exchange_rate, 
    finance_other_exchange_rate, cny_to_usd_exchange_rate, order_to_usd_exchange_rate, 
    other_to_usd_exchange_rate, order_currency, other_currency, amount_sales, amount_total, 
    amount_shipping, amount_product, amount_tax, amount_adjustment, amount_gift_wrap, 
    amount_refund, amount_prepaid, cost_total, cost_promotion, cost_platform_fee, cost_product, 
    cost_shipping, cost_package, cost_fba_fee, cost_paypal_fee, cost_refund_commisson, 
    cost_handle_bailun, cost_handle_platform, cost_tail, cost_first, cost_logistics, 
    profit_total, profit_rate, receipt_country, receipt_city, receipt_area, receipt_address, 
    receipt_address_2, receipt_postal_code, receiver, receiver_phone, buyer_id, buyer_name, 
    buyer_email, has_fba_exception, has_platform_exception, has_cancle, area_id, gmt_create, 
    gmt_modified, quantity_bailun_sku, logistics_warehouse_code, logistics_warehouse_name, 
    logistics_method_code, logistics_method_name, bailun_picking_status, bailun_require_logistics, 
    has_scalp, has_innersale
  </sql>
  <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" 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_oms_order
    <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_oms_order
    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_oms_order
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_base_oms_order
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_oms_order (id, origin_order_id, platform_type, 
      transaction_id, pay_time, pay_method, 
      pay_account, pay_status, collection_account, 
      platform_order_type, website, create_time, 
      paid_time, refund_time, seller_id, 
      bailun_account_id, hq_account, seller_account, 
      seller_order_id, seller_email, order_update_time, 
      bailun_order_id, platform_order_status, bailun_order_status, 
      bailun_payment_status, bailun_merge_status, 
      bailun_interception_status, bailun_shipping_status, 
      seller_order_exchange_rate, seller_other_exchange_rate, 
      finance_order_exchange_rate, finance_other_exchange_rate, 
      cny_to_usd_exchange_rate, order_to_usd_exchange_rate, 
      other_to_usd_exchange_rate, order_currency, 
      other_currency, amount_sales, amount_total, 
      amount_shipping, amount_product, amount_tax, 
      amount_adjustment, amount_gift_wrap, amount_refund, 
      amount_prepaid, cost_total, cost_promotion, 
      cost_platform_fee, cost_product, cost_shipping, 
      cost_package, cost_fba_fee, cost_paypal_fee, 
      cost_refund_commisson, cost_handle_bailun, 
      cost_handle_platform, cost_tail, cost_first, 
      cost_logistics, profit_total, profit_rate, 
      receipt_country, receipt_city, receipt_area, 
      receipt_address, receipt_address_2, receipt_postal_code, 
      receiver, receiver_phone, buyer_id, 
      buyer_name, buyer_email, has_fba_exception, 
      has_platform_exception, has_cancle, area_id, 
      gmt_create, gmt_modified, quantity_bailun_sku, 
      logistics_warehouse_code, logistics_warehouse_name, 
      logistics_method_code, logistics_method_name, 
      bailun_picking_status, bailun_require_logistics, 
      has_scalp, has_innersale)
    values (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR}, 
      #{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR}, 
      #{payAccount,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{collectionAccount,jdbcType=VARCHAR}, 
      #{platformOrderType,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{paidTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}, #{sellerId,jdbcType=VARCHAR}, 
      #{bailunAccountId,jdbcType=INTEGER}, #{hqAccount,jdbcType=VARCHAR}, #{sellerAccount,jdbcType=VARCHAR}, 
      #{sellerOrderId,jdbcType=VARCHAR}, #{sellerEmail,jdbcType=VARCHAR}, #{orderUpdateTime,jdbcType=TIMESTAMP}, 
      #{bailunOrderId,jdbcType=VARCHAR}, #{platformOrderStatus,jdbcType=VARCHAR}, #{bailunOrderStatus,jdbcType=VARCHAR}, 
      #{bailunPaymentStatus,jdbcType=VARCHAR}, #{bailunMergeStatus,jdbcType=VARCHAR}, 
      #{bailunInterceptionStatus,jdbcType=VARCHAR}, #{bailunShippingStatus,jdbcType=VARCHAR}, 
      #{sellerOrderExchangeRate,jdbcType=DECIMAL}, #{sellerOtherExchangeRate,jdbcType=DECIMAL}, 
      #{financeOrderExchangeRate,jdbcType=DECIMAL}, #{financeOtherExchangeRate,jdbcType=DECIMAL}, 
      #{cnyToUsdExchangeRate,jdbcType=DECIMAL}, #{orderToUsdExchangeRate,jdbcType=DECIMAL}, 
      #{otherToUsdExchangeRate,jdbcType=DECIMAL}, #{orderCurrency,jdbcType=VARCHAR}, 
      #{otherCurrency,jdbcType=VARCHAR}, #{amountSales,jdbcType=DECIMAL}, #{amountTotal,jdbcType=DECIMAL}, 
      #{amountShipping,jdbcType=DECIMAL}, #{amountProduct,jdbcType=DECIMAL}, #{amountTax,jdbcType=DECIMAL}, 
      #{amountAdjustment,jdbcType=DECIMAL}, #{amountGiftWrap,jdbcType=DECIMAL}, #{amountRefund,jdbcType=DECIMAL}, 
      #{amountPrepaid,jdbcType=DECIMAL}, #{costTotal,jdbcType=DECIMAL}, #{costPromotion,jdbcType=DECIMAL}, 
      #{costPlatformFee,jdbcType=DECIMAL}, #{costProduct,jdbcType=DECIMAL}, #{costShipping,jdbcType=DECIMAL}, 
      #{costPackage,jdbcType=DECIMAL}, #{costFbaFee,jdbcType=DECIMAL}, #{costPaypalFee,jdbcType=DECIMAL}, 
      #{costRefundCommisson,jdbcType=DECIMAL}, #{costHandleBailun,jdbcType=DECIMAL}, 
      #{costHandlePlatform,jdbcType=DECIMAL}, #{costTail,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL}, 
      #{costLogistics,jdbcType=DECIMAL}, #{profitTotal,jdbcType=DECIMAL}, #{profitRate,jdbcType=DECIMAL}, 
      #{receiptCountry,jdbcType=VARCHAR}, #{receiptCity,jdbcType=VARCHAR}, #{receiptArea,jdbcType=VARCHAR}, 
      #{receiptAddress,jdbcType=VARCHAR}, #{receiptAddress2,jdbcType=VARCHAR}, #{receiptPostalCode,jdbcType=VARCHAR}, 
      #{receiver,jdbcType=VARCHAR}, #{receiverPhone,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR}, 
      #{buyerName,jdbcType=VARCHAR}, #{buyerEmail,jdbcType=VARCHAR}, #{hasFbaException,jdbcType=BIT}, 
      #{hasPlatformException,jdbcType=BIT}, #{hasCancle,jdbcType=BIT}, #{areaId,jdbcType=INTEGER}, 
      #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{quantityBailunSku,jdbcType=INTEGER}, 
      #{logisticsWarehouseCode,jdbcType=VARCHAR}, #{logisticsWarehouseName,jdbcType=VARCHAR}, 
      #{logisticsMethodCode,jdbcType=VARCHAR}, #{logisticsMethodName,jdbcType=VARCHAR}, 
      #{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR}, 
      #{hasScalp,jdbcType=BIT}, #{hasInnersale,jdbcType=BIT})
  </insert>
  <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_oms_order
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="originOrderId != null">
        origin_order_id,
      </if>
      <if test="platformType != null">
        platform_type,
      </if>
      <if test="transactionId != null">
        transaction_id,
      </if>
      <if test="payTime != null">
        pay_time,
      </if>
      <if test="payMethod != null">
        pay_method,
      </if>
      <if test="payAccount != null">
        pay_account,
      </if>
      <if test="payStatus != null">
        pay_status,
      </if>
      <if test="collectionAccount != null">
        collection_account,
      </if>
      <if test="platformOrderType != null">
        platform_order_type,
      </if>
      <if test="website != null">
        website,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="paidTime != null">
        paid_time,
      </if>
      <if test="refundTime != null">
        refund_time,
      </if>
      <if test="sellerId != null">
        seller_id,
      </if>
      <if test="bailunAccountId != null">
        bailun_account_id,
      </if>
      <if test="hqAccount != null">
        hq_account,
      </if>
      <if test="sellerAccount != null">
        seller_account,
      </if>
      <if test="sellerOrderId != null">
        seller_order_id,
      </if>
      <if test="sellerEmail != null">
        seller_email,
      </if>
      <if test="orderUpdateTime != null">
        order_update_time,
      </if>
      <if test="bailunOrderId != null">
        bailun_order_id,
      </if>
      <if test="platformOrderStatus != null">
        platform_order_status,
      </if>
      <if test="bailunOrderStatus != null">
        bailun_order_status,
      </if>
      <if test="bailunPaymentStatus != null">
        bailun_payment_status,
      </if>
      <if test="bailunMergeStatus != null">
        bailun_merge_status,
      </if>
      <if test="bailunInterceptionStatus != null">
        bailun_interception_status,
      </if>
      <if test="bailunShippingStatus != null">
        bailun_shipping_status,
      </if>
      <if test="sellerOrderExchangeRate != null">
        seller_order_exchange_rate,
      </if>
      <if test="sellerOtherExchangeRate != null">
        seller_other_exchange_rate,
      </if>
      <if test="financeOrderExchangeRate != null">
        finance_order_exchange_rate,
      </if>
      <if test="financeOtherExchangeRate != null">
        finance_other_exchange_rate,
      </if>
      <if test="cnyToUsdExchangeRate != null">
        cny_to_usd_exchange_rate,
      </if>
      <if test="orderToUsdExchangeRate != null">
        order_to_usd_exchange_rate,
      </if>
      <if test="otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate,
      </if>
      <if test="orderCurrency != null">
        order_currency,
      </if>
      <if test="otherCurrency != null">
        other_currency,
      </if>
      <if test="amountSales != null">
        amount_sales,
      </if>
      <if test="amountTotal != null">
        amount_total,
      </if>
      <if test="amountShipping != null">
        amount_shipping,
      </if>
      <if test="amountProduct != null">
        amount_product,
      </if>
      <if test="amountTax != null">
        amount_tax,
      </if>
      <if test="amountAdjustment != null">
        amount_adjustment,
      </if>
      <if test="amountGiftWrap != null">
        amount_gift_wrap,
      </if>
      <if test="amountRefund != null">
        amount_refund,
      </if>
      <if test="amountPrepaid != null">
        amount_prepaid,
      </if>
      <if test="costTotal != null">
        cost_total,
      </if>
      <if test="costPromotion != null">
        cost_promotion,
      </if>
      <if test="costPlatformFee != null">
        cost_platform_fee,
      </if>
      <if test="costProduct != null">
        cost_product,
      </if>
      <if test="costShipping != null">
        cost_shipping,
      </if>
      <if test="costPackage != null">
        cost_package,
      </if>
      <if test="costFbaFee != null">
        cost_fba_fee,
      </if>
      <if test="costPaypalFee != null">
        cost_paypal_fee,
      </if>
      <if test="costRefundCommisson != null">
        cost_refund_commisson,
      </if>
      <if test="costHandleBailun != null">
        cost_handle_bailun,
      </if>
      <if test="costHandlePlatform != null">
        cost_handle_platform,
      </if>
      <if test="costTail != null">
        cost_tail,
      </if>
      <if test="costFirst != null">
        cost_first,
      </if>
      <if test="costLogistics != null">
        cost_logistics,
      </if>
      <if test="profitTotal != null">
        profit_total,
      </if>
      <if test="profitRate != null">
        profit_rate,
      </if>
      <if test="receiptCountry != null">
        receipt_country,
      </if>
      <if test="receiptCity != null">
        receipt_city,
      </if>
      <if test="receiptArea != null">
        receipt_area,
      </if>
      <if test="receiptAddress != null">
        receipt_address,
      </if>
      <if test="receiptAddress2 != null">
        receipt_address_2,
      </if>
      <if test="receiptPostalCode != null">
        receipt_postal_code,
      </if>
      <if test="receiver != null">
        receiver,
      </if>
      <if test="receiverPhone != null">
        receiver_phone,
      </if>
      <if test="buyerId != null">
        buyer_id,
      </if>
      <if test="buyerName != null">
        buyer_name,
      </if>
      <if test="buyerEmail != null">
        buyer_email,
      </if>
      <if test="hasFbaException != null">
        has_fba_exception,
      </if>
      <if test="hasPlatformException != null">
        has_platform_exception,
      </if>
      <if test="hasCancle != null">
        has_cancle,
      </if>
      <if test="areaId != null">
        area_id,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
      <if test="quantityBailunSku != null">
        quantity_bailun_sku,
      </if>
      <if test="logisticsWarehouseCode != null">
        logistics_warehouse_code,
      </if>
      <if test="logisticsWarehouseName != null">
        logistics_warehouse_name,
      </if>
      <if test="logisticsMethodCode != null">
        logistics_method_code,
      </if>
      <if test="logisticsMethodName != null">
        logistics_method_name,
      </if>
      <if test="bailunPickingStatus != null">
        bailun_picking_status,
      </if>
      <if test="bailunRequireLogistics != null">
        bailun_require_logistics,
      </if>
      <if test="hasScalp != null">
        has_scalp,
      </if>
      <if test="hasInnersale != null">
        has_innersale,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="originOrderId != null">
        #{originOrderId,jdbcType=VARCHAR},
      </if>
      <if test="platformType != null">
        #{platformType,jdbcType=VARCHAR},
      </if>
      <if test="transactionId != null">
        #{transactionId,jdbcType=VARCHAR},
      </if>
      <if test="payTime != null">
        #{payTime,jdbcType=TIMESTAMP},
      </if>
      <if test="payMethod != null">
        #{payMethod,jdbcType=VARCHAR},
      </if>
      <if test="payAccount != null">
        #{payAccount,jdbcType=VARCHAR},
      </if>
      <if test="payStatus != null">
        #{payStatus,jdbcType=VARCHAR},
      </if>
      <if test="collectionAccount != null">
        #{collectionAccount,jdbcType=VARCHAR},
      </if>
      <if test="platformOrderType != null">
        #{platformOrderType,jdbcType=VARCHAR},
      </if>
      <if test="website != null">
        #{website,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="paidTime != null">
        #{paidTime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundTime != null">
        #{refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sellerId != null">
        #{sellerId,jdbcType=VARCHAR},
      </if>
      <if test="bailunAccountId != null">
        #{bailunAccountId,jdbcType=INTEGER},
      </if>
      <if test="hqAccount != null">
        #{hqAccount,jdbcType=VARCHAR},
      </if>
      <if test="sellerAccount != null">
        #{sellerAccount,jdbcType=VARCHAR},
      </if>
      <if test="sellerOrderId != null">
        #{sellerOrderId,jdbcType=VARCHAR},
      </if>
      <if test="sellerEmail != null">
        #{sellerEmail,jdbcType=VARCHAR},
      </if>
      <if test="orderUpdateTime != null">
        #{orderUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="bailunOrderId != null">
        #{bailunOrderId,jdbcType=VARCHAR},
      </if>
      <if test="platformOrderStatus != null">
        #{platformOrderStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunOrderStatus != null">
        #{bailunOrderStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunPaymentStatus != null">
        #{bailunPaymentStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunMergeStatus != null">
        #{bailunMergeStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunInterceptionStatus != null">
        #{bailunInterceptionStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunShippingStatus != null">
        #{bailunShippingStatus,jdbcType=VARCHAR},
      </if>
      <if test="sellerOrderExchangeRate != null">
        #{sellerOrderExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="sellerOtherExchangeRate != null">
        #{sellerOtherExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="financeOrderExchangeRate != null">
        #{financeOrderExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="financeOtherExchangeRate != null">
        #{financeOtherExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="cnyToUsdExchangeRate != null">
        #{cnyToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="orderToUsdExchangeRate != null">
        #{orderToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="otherToUsdExchangeRate != null">
        #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="orderCurrency != null">
        #{orderCurrency,jdbcType=VARCHAR},
      </if>
      <if test="otherCurrency != null">
        #{otherCurrency,jdbcType=VARCHAR},
      </if>
      <if test="amountSales != null">
        #{amountSales,jdbcType=DECIMAL},
      </if>
      <if test="amountTotal != null">
        #{amountTotal,jdbcType=DECIMAL},
      </if>
      <if test="amountShipping != null">
        #{amountShipping,jdbcType=DECIMAL},
      </if>
      <if test="amountProduct != null">
        #{amountProduct,jdbcType=DECIMAL},
      </if>
      <if test="amountTax != null">
        #{amountTax,jdbcType=DECIMAL},
      </if>
      <if test="amountAdjustment != null">
        #{amountAdjustment,jdbcType=DECIMAL},
      </if>
      <if test="amountGiftWrap != null">
        #{amountGiftWrap,jdbcType=DECIMAL},
      </if>
      <if test="amountRefund != null">
        #{amountRefund,jdbcType=DECIMAL},
      </if>
      <if test="amountPrepaid != null">
        #{amountPrepaid,jdbcType=DECIMAL},
      </if>
      <if test="costTotal != null">
        #{costTotal,jdbcType=DECIMAL},
      </if>
      <if test="costPromotion != null">
        #{costPromotion,jdbcType=DECIMAL},
      </if>
      <if test="costPlatformFee != null">
        #{costPlatformFee,jdbcType=DECIMAL},
      </if>
      <if test="costProduct != null">
        #{costProduct,jdbcType=DECIMAL},
      </if>
      <if test="costShipping != null">
        #{costShipping,jdbcType=DECIMAL},
      </if>
      <if test="costPackage != null">
        #{costPackage,jdbcType=DECIMAL},
      </if>
      <if test="costFbaFee != null">
        #{costFbaFee,jdbcType=DECIMAL},
      </if>
      <if test="costPaypalFee != null">
        #{costPaypalFee,jdbcType=DECIMAL},
      </if>
      <if test="costRefundCommisson != null">
        #{costRefundCommisson,jdbcType=DECIMAL},
      </if>
      <if test="costHandleBailun != null">
        #{costHandleBailun,jdbcType=DECIMAL},
      </if>
      <if test="costHandlePlatform != null">
        #{costHandlePlatform,jdbcType=DECIMAL},
      </if>
      <if test="costTail != null">
        #{costTail,jdbcType=DECIMAL},
      </if>
      <if test="costFirst != null">
        #{costFirst,jdbcType=DECIMAL},
      </if>
      <if test="costLogistics != null">
        #{costLogistics,jdbcType=DECIMAL},
      </if>
      <if test="profitTotal != null">
        #{profitTotal,jdbcType=DECIMAL},
      </if>
      <if test="profitRate != null">
        #{profitRate,jdbcType=DECIMAL},
      </if>
      <if test="receiptCountry != null">
        #{receiptCountry,jdbcType=VARCHAR},
      </if>
      <if test="receiptCity != null">
        #{receiptCity,jdbcType=VARCHAR},
      </if>
      <if test="receiptArea != null">
        #{receiptArea,jdbcType=VARCHAR},
      </if>
      <if test="receiptAddress != null">
        #{receiptAddress,jdbcType=VARCHAR},
      </if>
      <if test="receiptAddress2 != null">
        #{receiptAddress2,jdbcType=VARCHAR},
      </if>
      <if test="receiptPostalCode != null">
        #{receiptPostalCode,jdbcType=VARCHAR},
      </if>
      <if test="receiver != null">
        #{receiver,jdbcType=VARCHAR},
      </if>
      <if test="receiverPhone != null">
        #{receiverPhone,jdbcType=VARCHAR},
      </if>
      <if test="buyerId != null">
        #{buyerId,jdbcType=VARCHAR},
      </if>
      <if test="buyerName != null">
        #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="buyerEmail != null">
        #{buyerEmail,jdbcType=VARCHAR},
      </if>
      <if test="hasFbaException != null">
        #{hasFbaException,jdbcType=BIT},
      </if>
      <if test="hasPlatformException != null">
        #{hasPlatformException,jdbcType=BIT},
      </if>
      <if test="hasCancle != null">
        #{hasCancle,jdbcType=BIT},
      </if>
      <if test="areaId != null">
        #{areaId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="quantityBailunSku != null">
        #{quantityBailunSku,jdbcType=INTEGER},
      </if>
      <if test="logisticsWarehouseCode != null">
        #{logisticsWarehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="logisticsWarehouseName != null">
        #{logisticsWarehouseName,jdbcType=VARCHAR},
      </if>
      <if test="logisticsMethodCode != null">
        #{logisticsMethodCode,jdbcType=VARCHAR},
      </if>
      <if test="logisticsMethodName != null">
        #{logisticsMethodName,jdbcType=VARCHAR},
      </if>
      <if test="bailunPickingStatus != null">
        #{bailunPickingStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunRequireLogistics != null">
        #{bailunRequireLogistics,jdbcType=VARCHAR},
      </if>
      <if test="hasScalp != null">
        #{hasScalp,jdbcType=BIT},
      </if>
      <if test="hasInnersale != null">
        #{hasInnersale,jdbcType=BIT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from dc_base_oms_order
    <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_oms_order
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.originOrderId != null">
        origin_order_id = #{record.originOrderId,jdbcType=VARCHAR},
      </if>
      <if test="record.platformType != null">
        platform_type = #{record.platformType,jdbcType=VARCHAR},
      </if>
      <if test="record.transactionId != null">
        transaction_id = #{record.transactionId,jdbcType=VARCHAR},
      </if>
      <if test="record.payTime != null">
        pay_time = #{record.payTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.payMethod != null">
        pay_method = #{record.payMethod,jdbcType=VARCHAR},
      </if>
      <if test="record.payAccount != null">
        pay_account = #{record.payAccount,jdbcType=VARCHAR},
      </if>
      <if test="record.payStatus != null">
        pay_status = #{record.payStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.collectionAccount != null">
        collection_account = #{record.collectionAccount,jdbcType=VARCHAR},
      </if>
      <if test="record.platformOrderType != null">
        platform_order_type = #{record.platformOrderType,jdbcType=VARCHAR},
      </if>
      <if test="record.website != null">
        website = #{record.website,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.paidTime != null">
        paid_time = #{record.paidTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.refundTime != null">
        refund_time = #{record.refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.sellerId != null">
        seller_id = #{record.sellerId,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunAccountId != null">
        bailun_account_id = #{record.bailunAccountId,jdbcType=INTEGER},
      </if>
      <if test="record.hqAccount != null">
        hq_account = #{record.hqAccount,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerAccount != null">
        seller_account = #{record.sellerAccount,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerOrderId != null">
        seller_order_id = #{record.sellerOrderId,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerEmail != null">
        seller_email = #{record.sellerEmail,jdbcType=VARCHAR},
      </if>
      <if test="record.orderUpdateTime != null">
        order_update_time = #{record.orderUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.bailunOrderId != null">
        bailun_order_id = #{record.bailunOrderId,jdbcType=VARCHAR},
      </if>
      <if test="record.platformOrderStatus != null">
        platform_order_status = #{record.platformOrderStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunOrderStatus != null">
        bailun_order_status = #{record.bailunOrderStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunPaymentStatus != null">
        bailun_payment_status = #{record.bailunPaymentStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunMergeStatus != null">
        bailun_merge_status = #{record.bailunMergeStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunInterceptionStatus != null">
        bailun_interception_status = #{record.bailunInterceptionStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunShippingStatus != null">
        bailun_shipping_status = #{record.bailunShippingStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerOrderExchangeRate != null">
        seller_order_exchange_rate = #{record.sellerOrderExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.sellerOtherExchangeRate != null">
        seller_other_exchange_rate = #{record.sellerOtherExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.financeOrderExchangeRate != null">
        finance_order_exchange_rate = #{record.financeOrderExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.financeOtherExchangeRate != null">
        finance_other_exchange_rate = #{record.financeOtherExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.cnyToUsdExchangeRate != null">
        cny_to_usd_exchange_rate = #{record.cnyToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.orderToUsdExchangeRate != null">
        order_to_usd_exchange_rate = #{record.orderToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate = #{record.otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.orderCurrency != null">
        order_currency = #{record.orderCurrency,jdbcType=VARCHAR},
      </if>
      <if test="record.otherCurrency != null">
        other_currency = #{record.otherCurrency,jdbcType=VARCHAR},
      </if>
      <if test="record.amountSales != null">
        amount_sales = #{record.amountSales,jdbcType=DECIMAL},
      </if>
      <if test="record.amountTotal != null">
        amount_total = #{record.amountTotal,jdbcType=DECIMAL},
      </if>
      <if test="record.amountShipping != null">
        amount_shipping = #{record.amountShipping,jdbcType=DECIMAL},
      </if>
      <if test="record.amountProduct != null">
        amount_product = #{record.amountProduct,jdbcType=DECIMAL},
      </if>
      <if test="record.amountTax != null">
        amount_tax = #{record.amountTax,jdbcType=DECIMAL},
      </if>
      <if test="record.amountAdjustment != null">
        amount_adjustment = #{record.amountAdjustment,jdbcType=DECIMAL},
      </if>
      <if test="record.amountGiftWrap != null">
        amount_gift_wrap = #{record.amountGiftWrap,jdbcType=DECIMAL},
      </if>
      <if test="record.amountRefund != null">
        amount_refund = #{record.amountRefund,jdbcType=DECIMAL},
      </if>
      <if test="record.amountPrepaid != null">
        amount_prepaid = #{record.amountPrepaid,jdbcType=DECIMAL},
      </if>
      <if test="record.costTotal != null">
        cost_total = #{record.costTotal,jdbcType=DECIMAL},
      </if>
      <if test="record.costPromotion != null">
        cost_promotion = #{record.costPromotion,jdbcType=DECIMAL},
      </if>
      <if test="record.costPlatformFee != null">
        cost_platform_fee = #{record.costPlatformFee,jdbcType=DECIMAL},
      </if>
      <if test="record.costProduct != null">
        cost_product = #{record.costProduct,jdbcType=DECIMAL},
      </if>
      <if test="record.costShipping != null">
        cost_shipping = #{record.costShipping,jdbcType=DECIMAL},
      </if>
      <if test="record.costPackage != null">
        cost_package = #{record.costPackage,jdbcType=DECIMAL},
      </if>
      <if test="record.costFbaFee != null">
        cost_fba_fee = #{record.costFbaFee,jdbcType=DECIMAL},
      </if>
      <if test="record.costPaypalFee != null">
        cost_paypal_fee = #{record.costPaypalFee,jdbcType=DECIMAL},
      </if>
      <if test="record.costRefundCommisson != null">
        cost_refund_commisson = #{record.costRefundCommisson,jdbcType=DECIMAL},
      </if>
      <if test="record.costHandleBailun != null">
        cost_handle_bailun = #{record.costHandleBailun,jdbcType=DECIMAL},
      </if>
      <if test="record.costHandlePlatform != null">
        cost_handle_platform = #{record.costHandlePlatform,jdbcType=DECIMAL},
      </if>
      <if test="record.costTail != null">
        cost_tail = #{record.costTail,jdbcType=DECIMAL},
      </if>
      <if test="record.costFirst != null">
        cost_first = #{record.costFirst,jdbcType=DECIMAL},
      </if>
      <if test="record.costLogistics != null">
        cost_logistics = #{record.costLogistics,jdbcType=DECIMAL},
      </if>
      <if test="record.profitTotal != null">
        profit_total = #{record.profitTotal,jdbcType=DECIMAL},
      </if>
      <if test="record.profitRate != null">
        profit_rate = #{record.profitRate,jdbcType=DECIMAL},
      </if>
      <if test="record.receiptCountry != null">
        receipt_country = #{record.receiptCountry,jdbcType=VARCHAR},
      </if>
      <if test="record.receiptCity != null">
        receipt_city = #{record.receiptCity,jdbcType=VARCHAR},
      </if>
      <if test="record.receiptArea != null">
        receipt_area = #{record.receiptArea,jdbcType=VARCHAR},
      </if>
      <if test="record.receiptAddress != null">
        receipt_address = #{record.receiptAddress,jdbcType=VARCHAR},
      </if>
      <if test="record.receiptAddress2 != null">
        receipt_address_2 = #{record.receiptAddress2,jdbcType=VARCHAR},
      </if>
      <if test="record.receiptPostalCode != null">
        receipt_postal_code = #{record.receiptPostalCode,jdbcType=VARCHAR},
      </if>
      <if test="record.receiver != null">
        receiver = #{record.receiver,jdbcType=VARCHAR},
      </if>
      <if test="record.receiverPhone != null">
        receiver_phone = #{record.receiverPhone,jdbcType=VARCHAR},
      </if>
      <if test="record.buyerId != null">
        buyer_id = #{record.buyerId,jdbcType=VARCHAR},
      </if>
      <if test="record.buyerName != null">
        buyer_name = #{record.buyerName,jdbcType=VARCHAR},
      </if>
      <if test="record.buyerEmail != null">
        buyer_email = #{record.buyerEmail,jdbcType=VARCHAR},
      </if>
      <if test="record.hasFbaException != null">
        has_fba_exception = #{record.hasFbaException,jdbcType=BIT},
      </if>
      <if test="record.hasPlatformException != null">
        has_platform_exception = #{record.hasPlatformException,jdbcType=BIT},
      </if>
      <if test="record.hasCancle != null">
        has_cancle = #{record.hasCancle,jdbcType=BIT},
      </if>
      <if test="record.areaId != null">
        area_id = #{record.areaId,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>
      <if test="record.quantityBailunSku != null">
        quantity_bailun_sku = #{record.quantityBailunSku,jdbcType=INTEGER},
      </if>
      <if test="record.logisticsWarehouseCode != null">
        logistics_warehouse_code = #{record.logisticsWarehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="record.logisticsWarehouseName != null">
        logistics_warehouse_name = #{record.logisticsWarehouseName,jdbcType=VARCHAR},
      </if>
      <if test="record.logisticsMethodCode != null">
        logistics_method_code = #{record.logisticsMethodCode,jdbcType=VARCHAR},
      </if>
      <if test="record.logisticsMethodName != null">
        logistics_method_name = #{record.logisticsMethodName,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunPickingStatus != null">
        bailun_picking_status = #{record.bailunPickingStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunRequireLogistics != null">
        bailun_require_logistics = #{record.bailunRequireLogistics,jdbcType=VARCHAR},
      </if>
      <if test="record.hasScalp != null">
        has_scalp = #{record.hasScalp,jdbcType=BIT},
      </if>
      <if test="record.hasInnersale != null">
        has_innersale = #{record.hasInnersale,jdbcType=BIT},
      </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_oms_order
    set id = #{record.id,jdbcType=INTEGER},
      origin_order_id = #{record.originOrderId,jdbcType=VARCHAR},
      platform_type = #{record.platformType,jdbcType=VARCHAR},
      transaction_id = #{record.transactionId,jdbcType=VARCHAR},
      pay_time = #{record.payTime,jdbcType=TIMESTAMP},
      pay_method = #{record.payMethod,jdbcType=VARCHAR},
      pay_account = #{record.payAccount,jdbcType=VARCHAR},
      pay_status = #{record.payStatus,jdbcType=VARCHAR},
      collection_account = #{record.collectionAccount,jdbcType=VARCHAR},
      platform_order_type = #{record.platformOrderType,jdbcType=VARCHAR},
      website = #{record.website,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      paid_time = #{record.paidTime,jdbcType=TIMESTAMP},
      refund_time = #{record.refundTime,jdbcType=TIMESTAMP},
      seller_id = #{record.sellerId,jdbcType=VARCHAR},
      bailun_account_id = #{record.bailunAccountId,jdbcType=INTEGER},
      hq_account = #{record.hqAccount,jdbcType=VARCHAR},
      seller_account = #{record.sellerAccount,jdbcType=VARCHAR},
      seller_order_id = #{record.sellerOrderId,jdbcType=VARCHAR},
      seller_email = #{record.sellerEmail,jdbcType=VARCHAR},
      order_update_time = #{record.orderUpdateTime,jdbcType=TIMESTAMP},
      bailun_order_id = #{record.bailunOrderId,jdbcType=VARCHAR},
      platform_order_status = #{record.platformOrderStatus,jdbcType=VARCHAR},
      bailun_order_status = #{record.bailunOrderStatus,jdbcType=VARCHAR},
      bailun_payment_status = #{record.bailunPaymentStatus,jdbcType=VARCHAR},
      bailun_merge_status = #{record.bailunMergeStatus,jdbcType=VARCHAR},
      bailun_interception_status = #{record.bailunInterceptionStatus,jdbcType=VARCHAR},
      bailun_shipping_status = #{record.bailunShippingStatus,jdbcType=VARCHAR},
      seller_order_exchange_rate = #{record.sellerOrderExchangeRate,jdbcType=DECIMAL},
      seller_other_exchange_rate = #{record.sellerOtherExchangeRate,jdbcType=DECIMAL},
      finance_order_exchange_rate = #{record.financeOrderExchangeRate,jdbcType=DECIMAL},
      finance_other_exchange_rate = #{record.financeOtherExchangeRate,jdbcType=DECIMAL},
      cny_to_usd_exchange_rate = #{record.cnyToUsdExchangeRate,jdbcType=DECIMAL},
      order_to_usd_exchange_rate = #{record.orderToUsdExchangeRate,jdbcType=DECIMAL},
      other_to_usd_exchange_rate = #{record.otherToUsdExchangeRate,jdbcType=DECIMAL},
      order_currency = #{record.orderCurrency,jdbcType=VARCHAR},
      other_currency = #{record.otherCurrency,jdbcType=VARCHAR},
      amount_sales = #{record.amountSales,jdbcType=DECIMAL},
      amount_total = #{record.amountTotal,jdbcType=DECIMAL},
      amount_shipping = #{record.amountShipping,jdbcType=DECIMAL},
      amount_product = #{record.amountProduct,jdbcType=DECIMAL},
      amount_tax = #{record.amountTax,jdbcType=DECIMAL},
      amount_adjustment = #{record.amountAdjustment,jdbcType=DECIMAL},
      amount_gift_wrap = #{record.amountGiftWrap,jdbcType=DECIMAL},
      amount_refund = #{record.amountRefund,jdbcType=DECIMAL},
      amount_prepaid = #{record.amountPrepaid,jdbcType=DECIMAL},
      cost_total = #{record.costTotal,jdbcType=DECIMAL},
      cost_promotion = #{record.costPromotion,jdbcType=DECIMAL},
      cost_platform_fee = #{record.costPlatformFee,jdbcType=DECIMAL},
      cost_product = #{record.costProduct,jdbcType=DECIMAL},
      cost_shipping = #{record.costShipping,jdbcType=DECIMAL},
      cost_package = #{record.costPackage,jdbcType=DECIMAL},
      cost_fba_fee = #{record.costFbaFee,jdbcType=DECIMAL},
      cost_paypal_fee = #{record.costPaypalFee,jdbcType=DECIMAL},
      cost_refund_commisson = #{record.costRefundCommisson,jdbcType=DECIMAL},
      cost_handle_bailun = #{record.costHandleBailun,jdbcType=DECIMAL},
      cost_handle_platform = #{record.costHandlePlatform,jdbcType=DECIMAL},
      cost_tail = #{record.costTail,jdbcType=DECIMAL},
      cost_first = #{record.costFirst,jdbcType=DECIMAL},
      cost_logistics = #{record.costLogistics,jdbcType=DECIMAL},
      profit_total = #{record.profitTotal,jdbcType=DECIMAL},
      profit_rate = #{record.profitRate,jdbcType=DECIMAL},
      receipt_country = #{record.receiptCountry,jdbcType=VARCHAR},
      receipt_city = #{record.receiptCity,jdbcType=VARCHAR},
      receipt_area = #{record.receiptArea,jdbcType=VARCHAR},
      receipt_address = #{record.receiptAddress,jdbcType=VARCHAR},
      receipt_address_2 = #{record.receiptAddress2,jdbcType=VARCHAR},
      receipt_postal_code = #{record.receiptPostalCode,jdbcType=VARCHAR},
      receiver = #{record.receiver,jdbcType=VARCHAR},
      receiver_phone = #{record.receiverPhone,jdbcType=VARCHAR},
      buyer_id = #{record.buyerId,jdbcType=VARCHAR},
      buyer_name = #{record.buyerName,jdbcType=VARCHAR},
      buyer_email = #{record.buyerEmail,jdbcType=VARCHAR},
      has_fba_exception = #{record.hasFbaException,jdbcType=BIT},
      has_platform_exception = #{record.hasPlatformException,jdbcType=BIT},
      has_cancle = #{record.hasCancle,jdbcType=BIT},
      area_id = #{record.areaId,jdbcType=INTEGER},
      gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
      quantity_bailun_sku = #{record.quantityBailunSku,jdbcType=INTEGER},
      logistics_warehouse_code = #{record.logisticsWarehouseCode,jdbcType=VARCHAR},
      logistics_warehouse_name = #{record.logisticsWarehouseName,jdbcType=VARCHAR},
      logistics_method_code = #{record.logisticsMethodCode,jdbcType=VARCHAR},
      logistics_method_name = #{record.logisticsMethodName,jdbcType=VARCHAR},
      bailun_picking_status = #{record.bailunPickingStatus,jdbcType=VARCHAR},
      bailun_require_logistics = #{record.bailunRequireLogistics,jdbcType=VARCHAR},
      has_scalp = #{record.hasScalp,jdbcType=BIT},
      has_innersale = #{record.hasInnersale,jdbcType=BIT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_oms_order
    <set>
      <if test="originOrderId != null">
        origin_order_id = #{originOrderId,jdbcType=VARCHAR},
      </if>
      <if test="platformType != null">
        platform_type = #{platformType,jdbcType=VARCHAR},
      </if>
      <if test="transactionId != null">
        transaction_id = #{transactionId,jdbcType=VARCHAR},
      </if>
      <if test="payTime != null">
        pay_time = #{payTime,jdbcType=TIMESTAMP},
      </if>
      <if test="payMethod != null">
        pay_method = #{payMethod,jdbcType=VARCHAR},
      </if>
      <if test="payAccount != null">
        pay_account = #{payAccount,jdbcType=VARCHAR},
      </if>
      <if test="payStatus != null">
        pay_status = #{payStatus,jdbcType=VARCHAR},
      </if>
      <if test="collectionAccount != null">
        collection_account = #{collectionAccount,jdbcType=VARCHAR},
      </if>
      <if test="platformOrderType != null">
        platform_order_type = #{platformOrderType,jdbcType=VARCHAR},
      </if>
      <if test="website != null">
        website = #{website,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="paidTime != null">
        paid_time = #{paidTime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundTime != null">
        refund_time = #{refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sellerId != null">
        seller_id = #{sellerId,jdbcType=VARCHAR},
      </if>
      <if test="bailunAccountId != null">
        bailun_account_id = #{bailunAccountId,jdbcType=INTEGER},
      </if>
      <if test="hqAccount != null">
        hq_account = #{hqAccount,jdbcType=VARCHAR},
      </if>
      <if test="sellerAccount != null">
        seller_account = #{sellerAccount,jdbcType=VARCHAR},
      </if>
      <if test="sellerOrderId != null">
        seller_order_id = #{sellerOrderId,jdbcType=VARCHAR},
      </if>
      <if test="sellerEmail != null">
        seller_email = #{sellerEmail,jdbcType=VARCHAR},
      </if>
      <if test="orderUpdateTime != null">
        order_update_time = #{orderUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="bailunOrderId != null">
        bailun_order_id = #{bailunOrderId,jdbcType=VARCHAR},
      </if>
      <if test="platformOrderStatus != null">
        platform_order_status = #{platformOrderStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunOrderStatus != null">
        bailun_order_status = #{bailunOrderStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunPaymentStatus != null">
        bailun_payment_status = #{bailunPaymentStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunMergeStatus != null">
        bailun_merge_status = #{bailunMergeStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunInterceptionStatus != null">
        bailun_interception_status = #{bailunInterceptionStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunShippingStatus != null">
        bailun_shipping_status = #{bailunShippingStatus,jdbcType=VARCHAR},
      </if>
      <if test="sellerOrderExchangeRate != null">
        seller_order_exchange_rate = #{sellerOrderExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="sellerOtherExchangeRate != null">
        seller_other_exchange_rate = #{sellerOtherExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="financeOrderExchangeRate != null">
        finance_order_exchange_rate = #{financeOrderExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="financeOtherExchangeRate != null">
        finance_other_exchange_rate = #{financeOtherExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="cnyToUsdExchangeRate != null">
        cny_to_usd_exchange_rate = #{cnyToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="orderToUsdExchangeRate != null">
        order_to_usd_exchange_rate = #{orderToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate = #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="orderCurrency != null">
        order_currency = #{orderCurrency,jdbcType=VARCHAR},
      </if>
      <if test="otherCurrency != null">
        other_currency = #{otherCurrency,jdbcType=VARCHAR},
      </if>
      <if test="amountSales != null">
        amount_sales = #{amountSales,jdbcType=DECIMAL},
      </if>
      <if test="amountTotal != null">
        amount_total = #{amountTotal,jdbcType=DECIMAL},
      </if>
      <if test="amountShipping != null">
        amount_shipping = #{amountShipping,jdbcType=DECIMAL},
      </if>
      <if test="amountProduct != null">
        amount_product = #{amountProduct,jdbcType=DECIMAL},
      </if>
      <if test="amountTax != null">
        amount_tax = #{amountTax,jdbcType=DECIMAL},
      </if>
      <if test="amountAdjustment != null">
        amount_adjustment = #{amountAdjustment,jdbcType=DECIMAL},
      </if>
      <if test="amountGiftWrap != null">
        amount_gift_wrap = #{amountGiftWrap,jdbcType=DECIMAL},
      </if>
      <if test="amountRefund != null">
        amount_refund = #{amountRefund,jdbcType=DECIMAL},
      </if>
      <if test="amountPrepaid != null">
        amount_prepaid = #{amountPrepaid,jdbcType=DECIMAL},
      </if>
      <if test="costTotal != null">
        cost_total = #{costTotal,jdbcType=DECIMAL},
      </if>
      <if test="costPromotion != null">
        cost_promotion = #{costPromotion,jdbcType=DECIMAL},
      </if>
      <if test="costPlatformFee != null">
        cost_platform_fee = #{costPlatformFee,jdbcType=DECIMAL},
      </if>
      <if test="costProduct != null">
        cost_product = #{costProduct,jdbcType=DECIMAL},
      </if>
      <if test="costShipping != null">
        cost_shipping = #{costShipping,jdbcType=DECIMAL},
      </if>
      <if test="costPackage != null">
        cost_package = #{costPackage,jdbcType=DECIMAL},
      </if>
      <if test="costFbaFee != null">
        cost_fba_fee = #{costFbaFee,jdbcType=DECIMAL},
      </if>
      <if test="costPaypalFee != null">
        cost_paypal_fee = #{costPaypalFee,jdbcType=DECIMAL},
      </if>
      <if test="costRefundCommisson != null">
        cost_refund_commisson = #{costRefundCommisson,jdbcType=DECIMAL},
      </if>
      <if test="costHandleBailun != null">
        cost_handle_bailun = #{costHandleBailun,jdbcType=DECIMAL},
      </if>
      <if test="costHandlePlatform != null">
        cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL},
      </if>
      <if test="costTail != null">
        cost_tail = #{costTail,jdbcType=DECIMAL},
      </if>
      <if test="costFirst != null">
        cost_first = #{costFirst,jdbcType=DECIMAL},
      </if>
      <if test="costLogistics != null">
        cost_logistics = #{costLogistics,jdbcType=DECIMAL},
      </if>
      <if test="profitTotal != null">
        profit_total = #{profitTotal,jdbcType=DECIMAL},
      </if>
      <if test="profitRate != null">
        profit_rate = #{profitRate,jdbcType=DECIMAL},
      </if>
      <if test="receiptCountry != null">
        receipt_country = #{receiptCountry,jdbcType=VARCHAR},
      </if>
      <if test="receiptCity != null">
        receipt_city = #{receiptCity,jdbcType=VARCHAR},
      </if>
      <if test="receiptArea != null">
        receipt_area = #{receiptArea,jdbcType=VARCHAR},
      </if>
      <if test="receiptAddress != null">
        receipt_address = #{receiptAddress,jdbcType=VARCHAR},
      </if>
      <if test="receiptAddress2 != null">
        receipt_address_2 = #{receiptAddress2,jdbcType=VARCHAR},
      </if>
      <if test="receiptPostalCode != null">
        receipt_postal_code = #{receiptPostalCode,jdbcType=VARCHAR},
      </if>
      <if test="receiver != null">
        receiver = #{receiver,jdbcType=VARCHAR},
      </if>
      <if test="receiverPhone != null">
        receiver_phone = #{receiverPhone,jdbcType=VARCHAR},
      </if>
      <if test="buyerId != null">
        buyer_id = #{buyerId,jdbcType=VARCHAR},
      </if>
      <if test="buyerName != null">
        buyer_name = #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="buyerEmail != null">
        buyer_email = #{buyerEmail,jdbcType=VARCHAR},
      </if>
      <if test="hasFbaException != null">
        has_fba_exception = #{hasFbaException,jdbcType=BIT},
      </if>
      <if test="hasPlatformException != null">
        has_platform_exception = #{hasPlatformException,jdbcType=BIT},
      </if>
      <if test="hasCancle != null">
        has_cancle = #{hasCancle,jdbcType=BIT},
      </if>
      <if test="areaId != null">
        area_id = #{areaId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="quantityBailunSku != null">
        quantity_bailun_sku = #{quantityBailunSku,jdbcType=INTEGER},
      </if>
      <if test="logisticsWarehouseCode != null">
        logistics_warehouse_code = #{logisticsWarehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="logisticsWarehouseName != null">
        logistics_warehouse_name = #{logisticsWarehouseName,jdbcType=VARCHAR},
      </if>
      <if test="logisticsMethodCode != null">
        logistics_method_code = #{logisticsMethodCode,jdbcType=VARCHAR},
      </if>
      <if test="logisticsMethodName != null">
        logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR},
      </if>
      <if test="bailunPickingStatus != null">
        bailun_picking_status = #{bailunPickingStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunRequireLogistics != null">
        bailun_require_logistics = #{bailunRequireLogistics,jdbcType=VARCHAR},
      </if>
      <if test="hasScalp != null">
        has_scalp = #{hasScalp,jdbcType=BIT},
      </if>
      <if test="hasInnersale != null">
        has_innersale = #{hasInnersale,jdbcType=BIT},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_oms_order
    set origin_order_id = #{originOrderId,jdbcType=VARCHAR},
      platform_type = #{platformType,jdbcType=VARCHAR},
      transaction_id = #{transactionId,jdbcType=VARCHAR},
      pay_time = #{payTime,jdbcType=TIMESTAMP},
      pay_method = #{payMethod,jdbcType=VARCHAR},
      pay_account = #{payAccount,jdbcType=VARCHAR},
      pay_status = #{payStatus,jdbcType=VARCHAR},
      collection_account = #{collectionAccount,jdbcType=VARCHAR},
      platform_order_type = #{platformOrderType,jdbcType=VARCHAR},
      website = #{website,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      paid_time = #{paidTime,jdbcType=TIMESTAMP},
      refund_time = #{refundTime,jdbcType=TIMESTAMP},
      seller_id = #{sellerId,jdbcType=VARCHAR},
      bailun_account_id = #{bailunAccountId,jdbcType=INTEGER},
      hq_account = #{hqAccount,jdbcType=VARCHAR},
      seller_account = #{sellerAccount,jdbcType=VARCHAR},
      seller_order_id = #{sellerOrderId,jdbcType=VARCHAR},
      seller_email = #{sellerEmail,jdbcType=VARCHAR},
      order_update_time = #{orderUpdateTime,jdbcType=TIMESTAMP},
      bailun_order_id = #{bailunOrderId,jdbcType=VARCHAR},
      platform_order_status = #{platformOrderStatus,jdbcType=VARCHAR},
      bailun_order_status = #{bailunOrderStatus,jdbcType=VARCHAR},
      bailun_payment_status = #{bailunPaymentStatus,jdbcType=VARCHAR},
      bailun_merge_status = #{bailunMergeStatus,jdbcType=VARCHAR},
      bailun_interception_status = #{bailunInterceptionStatus,jdbcType=VARCHAR},
      bailun_shipping_status = #{bailunShippingStatus,jdbcType=VARCHAR},
      seller_order_exchange_rate = #{sellerOrderExchangeRate,jdbcType=DECIMAL},
      seller_other_exchange_rate = #{sellerOtherExchangeRate,jdbcType=DECIMAL},
      finance_order_exchange_rate = #{financeOrderExchangeRate,jdbcType=DECIMAL},
      finance_other_exchange_rate = #{financeOtherExchangeRate,jdbcType=DECIMAL},
      cny_to_usd_exchange_rate = #{cnyToUsdExchangeRate,jdbcType=DECIMAL},
      order_to_usd_exchange_rate = #{orderToUsdExchangeRate,jdbcType=DECIMAL},
      other_to_usd_exchange_rate = #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      order_currency = #{orderCurrency,jdbcType=VARCHAR},
      other_currency = #{otherCurrency,jdbcType=VARCHAR},
      amount_sales = #{amountSales,jdbcType=DECIMAL},
      amount_total = #{amountTotal,jdbcType=DECIMAL},
      amount_shipping = #{amountShipping,jdbcType=DECIMAL},
      amount_product = #{amountProduct,jdbcType=DECIMAL},
      amount_tax = #{amountTax,jdbcType=DECIMAL},
      amount_adjustment = #{amountAdjustment,jdbcType=DECIMAL},
      amount_gift_wrap = #{amountGiftWrap,jdbcType=DECIMAL},
      amount_refund = #{amountRefund,jdbcType=DECIMAL},
      amount_prepaid = #{amountPrepaid,jdbcType=DECIMAL},
      cost_total = #{costTotal,jdbcType=DECIMAL},
      cost_promotion = #{costPromotion,jdbcType=DECIMAL},
      cost_platform_fee = #{costPlatformFee,jdbcType=DECIMAL},
      cost_product = #{costProduct,jdbcType=DECIMAL},
      cost_shipping = #{costShipping,jdbcType=DECIMAL},
      cost_package = #{costPackage,jdbcType=DECIMAL},
      cost_fba_fee = #{costFbaFee,jdbcType=DECIMAL},
      cost_paypal_fee = #{costPaypalFee,jdbcType=DECIMAL},
      cost_refund_commisson = #{costRefundCommisson,jdbcType=DECIMAL},
      cost_handle_bailun = #{costHandleBailun,jdbcType=DECIMAL},
      cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL},
      cost_tail = #{costTail,jdbcType=DECIMAL},
      cost_first = #{costFirst,jdbcType=DECIMAL},
      cost_logistics = #{costLogistics,jdbcType=DECIMAL},
      profit_total = #{profitTotal,jdbcType=DECIMAL},
      profit_rate = #{profitRate,jdbcType=DECIMAL},
      receipt_country = #{receiptCountry,jdbcType=VARCHAR},
      receipt_city = #{receiptCity,jdbcType=VARCHAR},
      receipt_area = #{receiptArea,jdbcType=VARCHAR},
      receipt_address = #{receiptAddress,jdbcType=VARCHAR},
      receipt_address_2 = #{receiptAddress2,jdbcType=VARCHAR},
      receipt_postal_code = #{receiptPostalCode,jdbcType=VARCHAR},
      receiver = #{receiver,jdbcType=VARCHAR},
      receiver_phone = #{receiverPhone,jdbcType=VARCHAR},
      buyer_id = #{buyerId,jdbcType=VARCHAR},
      buyer_name = #{buyerName,jdbcType=VARCHAR},
      buyer_email = #{buyerEmail,jdbcType=VARCHAR},
      has_fba_exception = #{hasFbaException,jdbcType=BIT},
      has_platform_exception = #{hasPlatformException,jdbcType=BIT},
      has_cancle = #{hasCancle,jdbcType=BIT},
      area_id = #{areaId,jdbcType=INTEGER},
      gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      quantity_bailun_sku = #{quantityBailunSku,jdbcType=INTEGER},
      logistics_warehouse_code = #{logisticsWarehouseCode,jdbcType=VARCHAR},
      logistics_warehouse_name = #{logisticsWarehouseName,jdbcType=VARCHAR},
      logistics_method_code = #{logisticsMethodCode,jdbcType=VARCHAR},
      logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR},
      bailun_picking_status = #{bailunPickingStatus,jdbcType=VARCHAR},
      bailun_require_logistics = #{bailunRequireLogistics,jdbcType=VARCHAR},
      has_scalp = #{hasScalp,jdbcType=BIT},
      has_innersale = #{hasInnersale,jdbcType=BIT}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder">
    <!--
      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_oms_order
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="originOrderId != null">
        origin_order_id,
      </if>
      <if test="platformType != null">
        platform_type,
      </if>
      <if test="transactionId != null">
        transaction_id,
      </if>
      <if test="payTime != null">
        pay_time,
      </if>
      <if test="payMethod != null">
        pay_method,
      </if>
      <if test="payAccount != null">
        pay_account,
      </if>
      <if test="payStatus != null">
        pay_status,
      </if>
      <if test="collectionAccount != null">
        collection_account,
      </if>
      <if test="platformOrderType != null">
        platform_order_type,
      </if>
      <if test="website != null">
        website,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="paidTime != null">
        paid_time,
      </if>
      <if test="refundTime != null">
        refund_time,
      </if>
      <if test="sellerId != null">
        seller_id,
      </if>
      <if test="bailunAccountId != null">
        bailun_account_id,
      </if>
      <if test="hqAccount != null">
        hq_account,
      </if>
      <if test="sellerAccount != null">
        seller_account,
      </if>
      <if test="sellerOrderId != null">
        seller_order_id,
      </if>
      <if test="sellerEmail != null">
        seller_email,
      </if>
      <if test="orderUpdateTime != null">
        order_update_time,
      </if>
      <if test="bailunOrderId != null">
        bailun_order_id,
      </if>
      <if test="platformOrderStatus != null">
        platform_order_status,
      </if>
      <if test="bailunOrderStatus != null">
        bailun_order_status,
      </if>
      <if test="bailunPaymentStatus != null">
        bailun_payment_status,
      </if>
      <if test="bailunMergeStatus != null">
        bailun_merge_status,
      </if>
      <if test="bailunInterceptionStatus != null">
        bailun_interception_status,
      </if>
      <if test="bailunShippingStatus != null">
        bailun_shipping_status,
      </if>
      <if test="sellerOrderExchangeRate != null">
        seller_order_exchange_rate,
      </if>
      <if test="sellerOtherExchangeRate != null">
        seller_other_exchange_rate,
      </if>
      <if test="financeOrderExchangeRate != null">
        finance_order_exchange_rate,
      </if>
      <if test="financeOtherExchangeRate != null">
        finance_other_exchange_rate,
      </if>
      <if test="cnyToUsdExchangeRate != null">
        cny_to_usd_exchange_rate,
      </if>
      <if test="orderToUsdExchangeRate != null">
        order_to_usd_exchange_rate,
      </if>
      <if test="otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate,
      </if>
      <if test="orderCurrency != null">
        order_currency,
      </if>
      <if test="otherCurrency != null">
        other_currency,
      </if>
      <if test="amountSales != null">
        amount_sales,
      </if>
      <if test="amountTotal != null">
        amount_total,
      </if>
      <if test="amountShipping != null">
        amount_shipping,
      </if>
      <if test="amountProduct != null">
        amount_product,
      </if>
      <if test="amountTax != null">
        amount_tax,
      </if>
      <if test="amountAdjustment != null">
        amount_adjustment,
      </if>
      <if test="amountGiftWrap != null">
        amount_gift_wrap,
      </if>
      <if test="amountRefund != null">
        amount_refund,
      </if>
      <if test="amountPrepaid != null">
        amount_prepaid,
      </if>
      <if test="costTotal != null">
        cost_total,
      </if>
      <if test="costPromotion != null">
        cost_promotion,
      </if>
      <if test="costPlatformFee != null">
        cost_platform_fee,
      </if>
      <if test="costProduct != null">
        cost_product,
      </if>
      <if test="costShipping != null">
        cost_shipping,
      </if>
      <if test="costPackage != null">
        cost_package,
      </if>
      <if test="costFbaFee != null">
        cost_fba_fee,
      </if>
      <if test="costPaypalFee != null">
        cost_paypal_fee,
      </if>
      <if test="costRefundCommisson != null">
        cost_refund_commisson,
      </if>
      <if test="costHandleBailun != null">
        cost_handle_bailun,
      </if>
      <if test="costHandlePlatform != null">
        cost_handle_platform,
      </if>
      <if test="costTail != null">
        cost_tail,
      </if>
      <if test="costFirst != null">
        cost_first,
      </if>
      <if test="costLogistics != null">
        cost_logistics,
      </if>
      <if test="profitTotal != null">
        profit_total,
      </if>
      <if test="profitRate != null">
        profit_rate,
      </if>
      <if test="receiptCountry != null">
        receipt_country,
      </if>
      <if test="receiptCity != null">
        receipt_city,
      </if>
      <if test="receiptArea != null">
        receipt_area,
      </if>
      <if test="receiptAddress != null">
        receipt_address,
      </if>
      <if test="receiptAddress2 != null">
        receipt_address_2,
      </if>
      <if test="receiptPostalCode != null">
        receipt_postal_code,
      </if>
      <if test="receiver != null">
        receiver,
      </if>
      <if test="receiverPhone != null">
        receiver_phone,
      </if>
      <if test="buyerId != null">
        buyer_id,
      </if>
      <if test="buyerName != null">
        buyer_name,
      </if>
      <if test="buyerEmail != null">
        buyer_email,
      </if>
      <if test="hasFbaException != null">
        has_fba_exception,
      </if>
      <if test="hasPlatformException != null">
        has_platform_exception,
      </if>
      <if test="hasCancle != null">
        has_cancle,
      </if>
      <if test="areaId != null">
        area_id,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
      <if test="quantityBailunSku != null">
        quantity_bailun_sku,
      </if>
      <if test="logisticsWarehouseCode != null">
        logistics_warehouse_code,
      </if>
      <if test="logisticsWarehouseName != null">
        logistics_warehouse_name,
      </if>
      <if test="logisticsMethodCode != null">
        logistics_method_code,
      </if>
      <if test="logisticsMethodName != null">
        logistics_method_name,
      </if>
      <if test="bailunPickingStatus != null">
        bailun_picking_status,
      </if>
      <if test="bailunRequireLogistics != null">
        bailun_require_logistics,
      </if>
      <if test="hasScalp != null">
        has_scalp,
      </if>
      <if test="hasInnersale != null">
        has_innersale,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="originOrderId != null">
        #{originOrderId,jdbcType=VARCHAR},
      </if>
      <if test="platformType != null">
        #{platformType,jdbcType=VARCHAR},
      </if>
      <if test="transactionId != null">
        #{transactionId,jdbcType=VARCHAR},
      </if>
      <if test="payTime != null">
        #{payTime,jdbcType=TIMESTAMP},
      </if>
      <if test="payMethod != null">
        #{payMethod,jdbcType=VARCHAR},
      </if>
      <if test="payAccount != null">
        #{payAccount,jdbcType=VARCHAR},
      </if>
      <if test="payStatus != null">
        #{payStatus,jdbcType=VARCHAR},
      </if>
      <if test="collectionAccount != null">
        #{collectionAccount,jdbcType=VARCHAR},
      </if>
      <if test="platformOrderType != null">
        #{platformOrderType,jdbcType=VARCHAR},
      </if>
      <if test="website != null">
        #{website,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="paidTime != null">
        #{paidTime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundTime != null">
        #{refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sellerId != null">
        #{sellerId,jdbcType=VARCHAR},
      </if>
      <if test="bailunAccountId != null">
        #{bailunAccountId,jdbcType=INTEGER},
      </if>
      <if test="hqAccount != null">
        #{hqAccount,jdbcType=VARCHAR},
      </if>
      <if test="sellerAccount != null">
        #{sellerAccount,jdbcType=VARCHAR},
      </if>
      <if test="sellerOrderId != null">
        #{sellerOrderId,jdbcType=VARCHAR},
      </if>
      <if test="sellerEmail != null">
        #{sellerEmail,jdbcType=VARCHAR},
      </if>
      <if test="orderUpdateTime != null">
        #{orderUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="bailunOrderId != null">
        #{bailunOrderId,jdbcType=VARCHAR},
      </if>
      <if test="platformOrderStatus != null">
        #{platformOrderStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunOrderStatus != null">
        #{bailunOrderStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunPaymentStatus != null">
        #{bailunPaymentStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunMergeStatus != null">
        #{bailunMergeStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunInterceptionStatus != null">
        #{bailunInterceptionStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunShippingStatus != null">
        #{bailunShippingStatus,jdbcType=VARCHAR},
      </if>
      <if test="sellerOrderExchangeRate != null">
        #{sellerOrderExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="sellerOtherExchangeRate != null">
        #{sellerOtherExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="financeOrderExchangeRate != null">
        #{financeOrderExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="financeOtherExchangeRate != null">
        #{financeOtherExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="cnyToUsdExchangeRate != null">
        #{cnyToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="orderToUsdExchangeRate != null">
        #{orderToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="otherToUsdExchangeRate != null">
        #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="orderCurrency != null">
        #{orderCurrency,jdbcType=VARCHAR},
      </if>
      <if test="otherCurrency != null">
        #{otherCurrency,jdbcType=VARCHAR},
      </if>
      <if test="amountSales != null">
        #{amountSales,jdbcType=DECIMAL},
      </if>
      <if test="amountTotal != null">
        #{amountTotal,jdbcType=DECIMAL},
      </if>
      <if test="amountShipping != null">
        #{amountShipping,jdbcType=DECIMAL},
      </if>
      <if test="amountProduct != null">
        #{amountProduct,jdbcType=DECIMAL},
      </if>
      <if test="amountTax != null">
        #{amountTax,jdbcType=DECIMAL},
      </if>
      <if test="amountAdjustment != null">
        #{amountAdjustment,jdbcType=DECIMAL},
      </if>
      <if test="amountGiftWrap != null">
        #{amountGiftWrap,jdbcType=DECIMAL},
      </if>
      <if test="amountRefund != null">
        #{amountRefund,jdbcType=DECIMAL},
      </if>
      <if test="amountPrepaid != null">
        #{amountPrepaid,jdbcType=DECIMAL},
      </if>
      <if test="costTotal != null">
        #{costTotal,jdbcType=DECIMAL},
      </if>
      <if test="costPromotion != null">
        #{costPromotion,jdbcType=DECIMAL},
      </if>
      <if test="costPlatformFee != null">
        #{costPlatformFee,jdbcType=DECIMAL},
      </if>
      <if test="costProduct != null">
        #{costProduct,jdbcType=DECIMAL},
      </if>
      <if test="costShipping != null">
        #{costShipping,jdbcType=DECIMAL},
      </if>
      <if test="costPackage != null">
        #{costPackage,jdbcType=DECIMAL},
      </if>
      <if test="costFbaFee != null">
        #{costFbaFee,jdbcType=DECIMAL},
      </if>
      <if test="costPaypalFee != null">
        #{costPaypalFee,jdbcType=DECIMAL},
      </if>
      <if test="costRefundCommisson != null">
        #{costRefundCommisson,jdbcType=DECIMAL},
      </if>
      <if test="costHandleBailun != null">
        #{costHandleBailun,jdbcType=DECIMAL},
      </if>
      <if test="costHandlePlatform != null">
        #{costHandlePlatform,jdbcType=DECIMAL},
      </if>
      <if test="costTail != null">
        #{costTail,jdbcType=DECIMAL},
      </if>
      <if test="costFirst != null">
        #{costFirst,jdbcType=DECIMAL},
      </if>
      <if test="costLogistics != null">
        #{costLogistics,jdbcType=DECIMAL},
      </if>
      <if test="profitTotal != null">
        #{profitTotal,jdbcType=DECIMAL},
      </if>
      <if test="profitRate != null">
        #{profitRate,jdbcType=DECIMAL},
      </if>
      <if test="receiptCountry != null">
        #{receiptCountry,jdbcType=VARCHAR},
      </if>
      <if test="receiptCity != null">
        #{receiptCity,jdbcType=VARCHAR},
      </if>
      <if test="receiptArea != null">
        #{receiptArea,jdbcType=VARCHAR},
      </if>
      <if test="receiptAddress != null">
        #{receiptAddress,jdbcType=VARCHAR},
      </if>
      <if test="receiptAddress2 != null">
        #{receiptAddress2,jdbcType=VARCHAR},
      </if>
      <if test="receiptPostalCode != null">
        #{receiptPostalCode,jdbcType=VARCHAR},
      </if>
      <if test="receiver != null">
        #{receiver,jdbcType=VARCHAR},
      </if>
      <if test="receiverPhone != null">
        #{receiverPhone,jdbcType=VARCHAR},
      </if>
      <if test="buyerId != null">
        #{buyerId,jdbcType=VARCHAR},
      </if>
      <if test="buyerName != null">
        #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="buyerEmail != null">
        #{buyerEmail,jdbcType=VARCHAR},
      </if>
      <if test="hasFbaException != null">
        #{hasFbaException,jdbcType=BIT},
      </if>
      <if test="hasPlatformException != null">
        #{hasPlatformException,jdbcType=BIT},
      </if>
      <if test="hasCancle != null">
        #{hasCancle,jdbcType=BIT},
      </if>
      <if test="areaId != null">
        #{areaId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="quantityBailunSku != null">
        #{quantityBailunSku,jdbcType=INTEGER},
      </if>
      <if test="logisticsWarehouseCode != null">
        #{logisticsWarehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="logisticsWarehouseName != null">
        #{logisticsWarehouseName,jdbcType=VARCHAR},
      </if>
      <if test="logisticsMethodCode != null">
        #{logisticsMethodCode,jdbcType=VARCHAR},
      </if>
      <if test="logisticsMethodName != null">
        #{logisticsMethodName,jdbcType=VARCHAR},
      </if>
      <if test="bailunPickingStatus != null">
        #{bailunPickingStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunRequireLogistics != null">
        #{bailunRequireLogistics,jdbcType=VARCHAR},
      </if>
      <if test="hasScalp != null">
        #{hasScalp,jdbcType=BIT},
      </if>
      <if test="hasInnersale != null">
        #{hasInnersale,jdbcType=BIT},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="originOrderId != null">
        origin_order_id = #{originOrderId,jdbcType=VARCHAR},
      </if>
      <if test="platformType != null">
        platform_type = #{platformType,jdbcType=VARCHAR},
      </if>
      <if test="transactionId != null">
        transaction_id = #{transactionId,jdbcType=VARCHAR},
      </if>
      <if test="payTime != null">
        pay_time = #{payTime,jdbcType=TIMESTAMP},
      </if>
      <if test="payMethod != null">
        pay_method = #{payMethod,jdbcType=VARCHAR},
      </if>
      <if test="payAccount != null">
        pay_account = #{payAccount,jdbcType=VARCHAR},
      </if>
      <if test="payStatus != null">
        pay_status = #{payStatus,jdbcType=VARCHAR},
      </if>
      <if test="collectionAccount != null">
        collection_account = #{collectionAccount,jdbcType=VARCHAR},
      </if>
      <if test="platformOrderType != null">
        platform_order_type = #{platformOrderType,jdbcType=VARCHAR},
      </if>
      <if test="website != null">
        website = #{website,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="paidTime != null">
        paid_time = #{paidTime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundTime != null">
        refund_time = #{refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sellerId != null">
        seller_id = #{sellerId,jdbcType=VARCHAR},
      </if>
      <if test="bailunAccountId != null">
        bailun_account_id = #{bailunAccountId,jdbcType=INTEGER},
      </if>
      <if test="hqAccount != null">
        hq_account = #{hqAccount,jdbcType=VARCHAR},
      </if>
      <if test="sellerAccount != null">
        seller_account = #{sellerAccount,jdbcType=VARCHAR},
      </if>
      <if test="sellerOrderId != null">
        seller_order_id = #{sellerOrderId,jdbcType=VARCHAR},
      </if>
      <if test="sellerEmail != null">
        seller_email = #{sellerEmail,jdbcType=VARCHAR},
      </if>
      <if test="orderUpdateTime != null">
        order_update_time = #{orderUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="bailunOrderId != null">
        bailun_order_id = #{bailunOrderId,jdbcType=VARCHAR},
      </if>
      <if test="platformOrderStatus != null">
        platform_order_status = #{platformOrderStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunOrderStatus != null">
        bailun_order_status = #{bailunOrderStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunPaymentStatus != null">
        bailun_payment_status = #{bailunPaymentStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunMergeStatus != null">
        bailun_merge_status = #{bailunMergeStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunInterceptionStatus != null">
        bailun_interception_status = #{bailunInterceptionStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunShippingStatus != null">
        bailun_shipping_status = #{bailunShippingStatus,jdbcType=VARCHAR},
      </if>
      <if test="sellerOrderExchangeRate != null">
        seller_order_exchange_rate = #{sellerOrderExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="sellerOtherExchangeRate != null">
        seller_other_exchange_rate = #{sellerOtherExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="financeOrderExchangeRate != null">
        finance_order_exchange_rate = #{financeOrderExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="financeOtherExchangeRate != null">
        finance_other_exchange_rate = #{financeOtherExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="cnyToUsdExchangeRate != null">
        cny_to_usd_exchange_rate = #{cnyToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="orderToUsdExchangeRate != null">
        order_to_usd_exchange_rate = #{orderToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate = #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="orderCurrency != null">
        order_currency = #{orderCurrency,jdbcType=VARCHAR},
      </if>
      <if test="otherCurrency != null">
        other_currency = #{otherCurrency,jdbcType=VARCHAR},
      </if>
      <if test="amountSales != null">
        amount_sales = #{amountSales,jdbcType=DECIMAL},
      </if>
      <if test="amountTotal != null">
        amount_total = #{amountTotal,jdbcType=DECIMAL},
      </if>
      <if test="amountShipping != null">
        amount_shipping = #{amountShipping,jdbcType=DECIMAL},
      </if>
      <if test="amountProduct != null">
        amount_product = #{amountProduct,jdbcType=DECIMAL},
      </if>
      <if test="amountTax != null">
        amount_tax = #{amountTax,jdbcType=DECIMAL},
      </if>
      <if test="amountAdjustment != null">
        amount_adjustment = #{amountAdjustment,jdbcType=DECIMAL},
      </if>
      <if test="amountGiftWrap != null">
        amount_gift_wrap = #{amountGiftWrap,jdbcType=DECIMAL},
      </if>
      <if test="amountRefund != null">
        amount_refund = #{amountRefund,jdbcType=DECIMAL},
      </if>
      <if test="amountPrepaid != null">
        amount_prepaid = #{amountPrepaid,jdbcType=DECIMAL},
      </if>
      <if test="costTotal != null">
        cost_total = #{costTotal,jdbcType=DECIMAL},
      </if>
      <if test="costPromotion != null">
        cost_promotion = #{costPromotion,jdbcType=DECIMAL},
      </if>
      <if test="costPlatformFee != null">
        cost_platform_fee = #{costPlatformFee,jdbcType=DECIMAL},
      </if>
      <if test="costProduct != null">
        cost_product = #{costProduct,jdbcType=DECIMAL},
      </if>
      <if test="costShipping != null">
        cost_shipping = #{costShipping,jdbcType=DECIMAL},
      </if>
      <if test="costPackage != null">
        cost_package = #{costPackage,jdbcType=DECIMAL},
      </if>
      <if test="costFbaFee != null">
        cost_fba_fee = #{costFbaFee,jdbcType=DECIMAL},
      </if>
      <if test="costPaypalFee != null">
        cost_paypal_fee = #{costPaypalFee,jdbcType=DECIMAL},
      </if>
      <if test="costRefundCommisson != null">
        cost_refund_commisson = #{costRefundCommisson,jdbcType=DECIMAL},
      </if>
      <if test="costHandleBailun != null">
        cost_handle_bailun = #{costHandleBailun,jdbcType=DECIMAL},
      </if>
      <if test="costHandlePlatform != null">
        cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL},
      </if>
      <if test="costTail != null">
        cost_tail = #{costTail,jdbcType=DECIMAL},
      </if>
      <if test="costFirst != null">
        cost_first = #{costFirst,jdbcType=DECIMAL},
      </if>
      <if test="costLogistics != null">
        cost_logistics = #{costLogistics,jdbcType=DECIMAL},
      </if>
      <if test="profitTotal != null">
        profit_total = #{profitTotal,jdbcType=DECIMAL},
      </if>
      <if test="profitRate != null">
        profit_rate = #{profitRate,jdbcType=DECIMAL},
      </if>
      <if test="receiptCountry != null">
        receipt_country = #{receiptCountry,jdbcType=VARCHAR},
      </if>
      <if test="receiptCity != null">
        receipt_city = #{receiptCity,jdbcType=VARCHAR},
      </if>
      <if test="receiptArea != null">
        receipt_area = #{receiptArea,jdbcType=VARCHAR},
      </if>
      <if test="receiptAddress != null">
        receipt_address = #{receiptAddress,jdbcType=VARCHAR},
      </if>
      <if test="receiptAddress2 != null">
        receipt_address_2 = #{receiptAddress2,jdbcType=VARCHAR},
      </if>
      <if test="receiptPostalCode != null">
        receipt_postal_code = #{receiptPostalCode,jdbcType=VARCHAR},
      </if>
      <if test="receiver != null">
        receiver = #{receiver,jdbcType=VARCHAR},
      </if>
      <if test="receiverPhone != null">
        receiver_phone = #{receiverPhone,jdbcType=VARCHAR},
      </if>
      <if test="buyerId != null">
        buyer_id = #{buyerId,jdbcType=VARCHAR},
      </if>
      <if test="buyerName != null">
        buyer_name = #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="buyerEmail != null">
        buyer_email = #{buyerEmail,jdbcType=VARCHAR},
      </if>
      <if test="hasFbaException != null">
        has_fba_exception = #{hasFbaException,jdbcType=BIT},
      </if>
      <if test="hasPlatformException != null">
        has_platform_exception = #{hasPlatformException,jdbcType=BIT},
      </if>
      <if test="hasCancle != null">
        has_cancle = #{hasCancle,jdbcType=BIT},
      </if>
      <if test="areaId != null">
        area_id = #{areaId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="quantityBailunSku != null">
        quantity_bailun_sku = #{quantityBailunSku,jdbcType=INTEGER},
      </if>
      <if test="logisticsWarehouseCode != null">
        logistics_warehouse_code = #{logisticsWarehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="logisticsWarehouseName != null">
        logistics_warehouse_name = #{logisticsWarehouseName,jdbcType=VARCHAR},
      </if>
      <if test="logisticsMethodCode != null">
        logistics_method_code = #{logisticsMethodCode,jdbcType=VARCHAR},
      </if>
      <if test="logisticsMethodName != null">
        logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR},
      </if>
      <if test="bailunPickingStatus != null">
        bailun_picking_status = #{bailunPickingStatus,jdbcType=VARCHAR},
      </if>
      <if test="bailunRequireLogistics != null">
        bailun_require_logistics = #{bailunRequireLogistics,jdbcType=VARCHAR},
      </if>
      <if test="hasScalp != null">
        has_scalp = #{hasScalp,jdbcType=BIT},
      </if>
      <if test="hasInnersale != null">
        has_innersale = #{hasInnersale,jdbcType=BIT},
      </if>
    </trim>
  </insert>
  <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder">
    <!--
      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_oms_order
    (id, origin_order_id, platform_type, transaction_id, pay_time, pay_method, pay_account, 
      pay_status, collection_account, platform_order_type, website, create_time, paid_time, 
      refund_time, seller_id, bailun_account_id, hq_account, seller_account, seller_order_id, 
      seller_email, order_update_time, bailun_order_id, platform_order_status, bailun_order_status, 
      bailun_payment_status, bailun_merge_status, bailun_interception_status, bailun_shipping_status, 
      seller_order_exchange_rate, seller_other_exchange_rate, finance_order_exchange_rate, 
      finance_other_exchange_rate, cny_to_usd_exchange_rate, order_to_usd_exchange_rate, 
      other_to_usd_exchange_rate, order_currency, other_currency, amount_sales, amount_total, 
      amount_shipping, amount_product, amount_tax, amount_adjustment, amount_gift_wrap, 
      amount_refund, amount_prepaid, cost_total, cost_promotion, cost_platform_fee, cost_product, 
      cost_shipping, cost_package, cost_fba_fee, cost_paypal_fee, cost_refund_commisson, 
      cost_handle_bailun, cost_handle_platform, cost_tail, cost_first, cost_logistics, 
      profit_total, profit_rate, receipt_country, receipt_city, receipt_area, receipt_address, 
      receipt_address_2, receipt_postal_code, receiver, receiver_phone, buyer_id, buyer_name, 
      buyer_email, has_fba_exception, has_platform_exception, has_cancle, area_id, gmt_create, 
      gmt_modified, quantity_bailun_sku, logistics_warehouse_code, logistics_warehouse_name, 
      logistics_method_code, logistics_method_name, bailun_picking_status, bailun_require_logistics, 
      has_scalp, has_innersale)
    values
    (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR}, 
      #{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR}, 
      #{payAccount,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{collectionAccount,jdbcType=VARCHAR}, 
      #{platformOrderType,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{paidTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}, #{sellerId,jdbcType=VARCHAR}, 
      #{bailunAccountId,jdbcType=INTEGER}, #{hqAccount,jdbcType=VARCHAR}, #{sellerAccount,jdbcType=VARCHAR}, 
      #{sellerOrderId,jdbcType=VARCHAR}, #{sellerEmail,jdbcType=VARCHAR}, #{orderUpdateTime,jdbcType=TIMESTAMP}, 
      #{bailunOrderId,jdbcType=VARCHAR}, #{platformOrderStatus,jdbcType=VARCHAR}, #{bailunOrderStatus,jdbcType=VARCHAR}, 
      #{bailunPaymentStatus,jdbcType=VARCHAR}, #{bailunMergeStatus,jdbcType=VARCHAR}, 
      #{bailunInterceptionStatus,jdbcType=VARCHAR}, #{bailunShippingStatus,jdbcType=VARCHAR}, 
      #{sellerOrderExchangeRate,jdbcType=DECIMAL}, #{sellerOtherExchangeRate,jdbcType=DECIMAL}, 
      #{financeOrderExchangeRate,jdbcType=DECIMAL}, #{financeOtherExchangeRate,jdbcType=DECIMAL}, 
      #{cnyToUsdExchangeRate,jdbcType=DECIMAL}, #{orderToUsdExchangeRate,jdbcType=DECIMAL}, 
      #{otherToUsdExchangeRate,jdbcType=DECIMAL}, #{orderCurrency,jdbcType=VARCHAR}, 
      #{otherCurrency,jdbcType=VARCHAR}, #{amountSales,jdbcType=DECIMAL}, #{amountTotal,jdbcType=DECIMAL}, 
      #{amountShipping,jdbcType=DECIMAL}, #{amountProduct,jdbcType=DECIMAL}, #{amountTax,jdbcType=DECIMAL}, 
      #{amountAdjustment,jdbcType=DECIMAL}, #{amountGiftWrap,jdbcType=DECIMAL}, #{amountRefund,jdbcType=DECIMAL}, 
      #{amountPrepaid,jdbcType=DECIMAL}, #{costTotal,jdbcType=DECIMAL}, #{costPromotion,jdbcType=DECIMAL}, 
      #{costPlatformFee,jdbcType=DECIMAL}, #{costProduct,jdbcType=DECIMAL}, #{costShipping,jdbcType=DECIMAL}, 
      #{costPackage,jdbcType=DECIMAL}, #{costFbaFee,jdbcType=DECIMAL}, #{costPaypalFee,jdbcType=DECIMAL}, 
      #{costRefundCommisson,jdbcType=DECIMAL}, #{costHandleBailun,jdbcType=DECIMAL}, 
      #{costHandlePlatform,jdbcType=DECIMAL}, #{costTail,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL}, 
      #{costLogistics,jdbcType=DECIMAL}, #{profitTotal,jdbcType=DECIMAL}, #{profitRate,jdbcType=DECIMAL}, 
      #{receiptCountry,jdbcType=VARCHAR}, #{receiptCity,jdbcType=VARCHAR}, #{receiptArea,jdbcType=VARCHAR}, 
      #{receiptAddress,jdbcType=VARCHAR}, #{receiptAddress2,jdbcType=VARCHAR}, #{receiptPostalCode,jdbcType=VARCHAR}, 
      #{receiver,jdbcType=VARCHAR}, #{receiverPhone,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR}, 
      #{buyerName,jdbcType=VARCHAR}, #{buyerEmail,jdbcType=VARCHAR}, #{hasFbaException,jdbcType=BIT}, 
      #{hasPlatformException,jdbcType=BIT}, #{hasCancle,jdbcType=BIT}, #{areaId,jdbcType=INTEGER}, 
      #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{quantityBailunSku,jdbcType=INTEGER}, 
      #{logisticsWarehouseCode,jdbcType=VARCHAR}, #{logisticsWarehouseName,jdbcType=VARCHAR}, 
      #{logisticsMethodCode,jdbcType=VARCHAR}, #{logisticsMethodName,jdbcType=VARCHAR}, 
      #{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR}, 
      #{hasScalp,jdbcType=BIT}, #{hasInnersale,jdbcType=BIT})
    on duplicate key update 
    id = #{id,jdbcType=INTEGER}, 
    origin_order_id = #{originOrderId,jdbcType=VARCHAR}, 
    platform_type = #{platformType,jdbcType=VARCHAR}, 
    transaction_id = #{transactionId,jdbcType=VARCHAR}, 
    pay_time = #{payTime,jdbcType=TIMESTAMP}, 
    pay_method = #{payMethod,jdbcType=VARCHAR}, 
    pay_account = #{payAccount,jdbcType=VARCHAR}, 
    pay_status = #{payStatus,jdbcType=VARCHAR}, 
    collection_account = #{collectionAccount,jdbcType=VARCHAR}, 
    platform_order_type = #{platformOrderType,jdbcType=VARCHAR}, 
    website = #{website,jdbcType=VARCHAR}, 
    create_time = #{createTime,jdbcType=TIMESTAMP}, 
    paid_time = #{paidTime,jdbcType=TIMESTAMP}, 
    refund_time = #{refundTime,jdbcType=TIMESTAMP}, 
    seller_id = #{sellerId,jdbcType=VARCHAR}, 
    bailun_account_id = #{bailunAccountId,jdbcType=INTEGER}, 
    hq_account = #{hqAccount,jdbcType=VARCHAR}, 
    seller_account = #{sellerAccount,jdbcType=VARCHAR}, 
    seller_order_id = #{sellerOrderId,jdbcType=VARCHAR}, 
    seller_email = #{sellerEmail,jdbcType=VARCHAR}, 
    order_update_time = #{orderUpdateTime,jdbcType=TIMESTAMP}, 
    bailun_order_id = #{bailunOrderId,jdbcType=VARCHAR}, 
    platform_order_status = #{platformOrderStatus,jdbcType=VARCHAR}, 
    bailun_order_status = #{bailunOrderStatus,jdbcType=VARCHAR}, 
    bailun_payment_status = #{bailunPaymentStatus,jdbcType=VARCHAR}, 
    bailun_merge_status = #{bailunMergeStatus,jdbcType=VARCHAR}, 
    bailun_interception_status = #{bailunInterceptionStatus,jdbcType=VARCHAR}, 
    bailun_shipping_status = #{bailunShippingStatus,jdbcType=VARCHAR}, 
    seller_order_exchange_rate = #{sellerOrderExchangeRate,jdbcType=DECIMAL}, 
    seller_other_exchange_rate = #{sellerOtherExchangeRate,jdbcType=DECIMAL}, 
    finance_order_exchange_rate = #{financeOrderExchangeRate,jdbcType=DECIMAL}, 
    finance_other_exchange_rate = #{financeOtherExchangeRate,jdbcType=DECIMAL}, 
    cny_to_usd_exchange_rate = #{cnyToUsdExchangeRate,jdbcType=DECIMAL}, 
    order_to_usd_exchange_rate = #{orderToUsdExchangeRate,jdbcType=DECIMAL}, 
    other_to_usd_exchange_rate = #{otherToUsdExchangeRate,jdbcType=DECIMAL}, 
    order_currency = #{orderCurrency,jdbcType=VARCHAR}, 
    other_currency = #{otherCurrency,jdbcType=VARCHAR}, 
    amount_sales = #{amountSales,jdbcType=DECIMAL}, 
    amount_total = #{amountTotal,jdbcType=DECIMAL}, 
    amount_shipping = #{amountShipping,jdbcType=DECIMAL}, 
    amount_product = #{amountProduct,jdbcType=DECIMAL}, 
    amount_tax = #{amountTax,jdbcType=DECIMAL}, 
    amount_adjustment = #{amountAdjustment,jdbcType=DECIMAL}, 
    amount_gift_wrap = #{amountGiftWrap,jdbcType=DECIMAL}, 
    amount_refund = #{amountRefund,jdbcType=DECIMAL}, 
    amount_prepaid = #{amountPrepaid,jdbcType=DECIMAL}, 
    cost_total = #{costTotal,jdbcType=DECIMAL}, 
    cost_promotion = #{costPromotion,jdbcType=DECIMAL}, 
    cost_platform_fee = #{costPlatformFee,jdbcType=DECIMAL}, 
    cost_product = #{costProduct,jdbcType=DECIMAL}, 
    cost_shipping = #{costShipping,jdbcType=DECIMAL}, 
    cost_package = #{costPackage,jdbcType=DECIMAL}, 
    cost_fba_fee = #{costFbaFee,jdbcType=DECIMAL}, 
    cost_paypal_fee = #{costPaypalFee,jdbcType=DECIMAL}, 
    cost_refund_commisson = #{costRefundCommisson,jdbcType=DECIMAL}, 
    cost_handle_bailun = #{costHandleBailun,jdbcType=DECIMAL}, 
    cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL}, 
    cost_tail = #{costTail,jdbcType=DECIMAL}, 
    cost_first = #{costFirst,jdbcType=DECIMAL}, 
    cost_logistics = #{costLogistics,jdbcType=DECIMAL}, 
    profit_total = #{profitTotal,jdbcType=DECIMAL}, 
    profit_rate = #{profitRate,jdbcType=DECIMAL}, 
    receipt_country = #{receiptCountry,jdbcType=VARCHAR}, 
    receipt_city = #{receiptCity,jdbcType=VARCHAR}, 
    receipt_area = #{receiptArea,jdbcType=VARCHAR}, 
    receipt_address = #{receiptAddress,jdbcType=VARCHAR}, 
    receipt_address_2 = #{receiptAddress2,jdbcType=VARCHAR}, 
    receipt_postal_code = #{receiptPostalCode,jdbcType=VARCHAR}, 
    receiver = #{receiver,jdbcType=VARCHAR}, 
    receiver_phone = #{receiverPhone,jdbcType=VARCHAR}, 
    buyer_id = #{buyerId,jdbcType=VARCHAR}, 
    buyer_name = #{buyerName,jdbcType=VARCHAR}, 
    buyer_email = #{buyerEmail,jdbcType=VARCHAR}, 
    has_fba_exception = #{hasFbaException,jdbcType=BIT}, 
    has_platform_exception = #{hasPlatformException,jdbcType=BIT}, 
    has_cancle = #{hasCancle,jdbcType=BIT}, 
    area_id = #{areaId,jdbcType=INTEGER}, 
    gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, 
    gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, 
    quantity_bailun_sku = #{quantityBailunSku,jdbcType=INTEGER}, 
    logistics_warehouse_code = #{logisticsWarehouseCode,jdbcType=VARCHAR}, 
    logistics_warehouse_name = #{logisticsWarehouseName,jdbcType=VARCHAR}, 
    logistics_method_code = #{logisticsMethodCode,jdbcType=VARCHAR}, 
    logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR}, 
    bailun_picking_status = #{bailunPickingStatus,jdbcType=VARCHAR}, 
    bailun_require_logistics = #{bailunRequireLogistics,jdbcType=VARCHAR}, 
    has_scalp = #{hasScalp,jdbcType=BIT}, 
    has_innersale = #{hasInnersale,jdbcType=BIT}
  </insert>
  <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" 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_oms_order
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>

  <update id="logicDeleteOmsSku">
        update  dc_base_oms_sku set has_delete=1 where origin_order_id=#{originOrderId,jdbcType=VARCHAR} and bailun_account_id = #{bailunAccountId,jdbcType=INTEGER}
  </update>
  <update id="logicDeleteOmsPick">
        update  dc_base_oms_pick set has_delete=1 where origin_order_id=#{originOrderId,jdbcType=VARCHAR} and bailun_account_id = #{bailunAccountId,jdbcType=INTEGER}
  </update>
</mapper>