<?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.DcBasePurchaseDetailsMapper">
  <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcBasePurchaseDetails">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="purchase_id" jdbcType="VARCHAR" property="purchaseId" />
    <result column="status" jdbcType="TINYINT" property="status" />
    <result column="purchase_category_name" jdbcType="VARCHAR" property="purchaseCategoryName" />
    <result column="deliver_id" jdbcType="INTEGER" property="deliverId" />
    <result column="deliver_name" jdbcType="VARCHAR" property="deliverName" />
    <result column="buyer_name" jdbcType="VARCHAR" property="buyerName" />
    <result column="warehouse_from_code" jdbcType="VARCHAR" property="warehouseFromCode" />
    <result column="warehouse_from_name" jdbcType="VARCHAR" property="warehouseFromName" />
    <result column="warehouse_into_code" jdbcType="VARCHAR" property="warehouseIntoCode" />
    <result column="warehouse_into_name" jdbcType="VARCHAR" property="warehouseIntoName" />
    <result column="bailun_sku" jdbcType="VARCHAR" property="bailunSku" />
    <result column="quantity_purchase" jdbcType="INTEGER" property="quantityPurchase" />
    <result column="unit_price" jdbcType="DECIMAL" property="unitPrice" />
    <result column="amount_paid" jdbcType="DECIMAL" property="amountPaid" />
    <result column="currency_code" jdbcType="VARCHAR" property="currencyCode" />
    <result column="currency_name" jdbcType="VARCHAR" property="currencyName" />
    <result column="quantity_return" jdbcType="INTEGER" property="quantityReturn" />
    <result column="quantity_inbound" jdbcType="INTEGER" property="quantityInbound" />
    <result column="quantity_deliver" jdbcType="INTEGER" property="quantityDeliver" />
    <result column="quantity_not_deliver" jdbcType="INTEGER" property="quantityNotDeliver" />
    <result column="quantity_arrival" jdbcType="INTEGER" property="quantityArrival" />
    <result column="quantity_not_arrival" jdbcType="INTEGER" property="quantityNotArrival" />
    <result column="quantity_inspect" jdbcType="INTEGER" property="quantityInspect" />
    <result column="quantity_qualified_inspect" jdbcType="INTEGER" property="quantityQualifiedInspect" />
    <result column="quantity_unqualified_inspect" jdbcType="INTEGER" property="quantityUnqualifiedInspect" />
    <result column="quantity_wait_transfer" jdbcType="INTEGER" property="quantityWaitTransfer" />
    <result column="quantity_exchange" jdbcType="INTEGER" property="quantityExchange" />
    <result column="quantity_lose_inbound" jdbcType="INTEGER" property="quantityLoseInbound" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
    <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
    <result column="quantity_not_inbound" jdbcType="INTEGER" property="quantityNotInbound" />
    <result column="alibaba_order_id" jdbcType="VARCHAR" property="alibabaOrderId" />
    <result column="logistics_order_id" jdbcType="VARCHAR" property="logisticsOrderId" />
    <result column="logistics_company_name" jdbcType="VARCHAR" property="logisticsCompanyName" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, purchase_id, status, purchase_category_name, deliver_id, deliver_name, buyer_name, 
    warehouse_from_code, warehouse_from_name, warehouse_into_code, warehouse_into_name, 
    bailun_sku, quantity_purchase, unit_price, amount_paid, currency_code, currency_name, 
    quantity_return, quantity_inbound, quantity_deliver, quantity_not_deliver, quantity_arrival, 
    quantity_not_arrival, quantity_inspect, quantity_qualified_inspect, quantity_unqualified_inspect, 
    quantity_wait_transfer, quantity_exchange, quantity_lose_inbound, create_time, update_time, 
    gmt_create, gmt_modified, quantity_not_inbound, alibaba_order_id, logistics_order_id, 
    logistics_company_name
  </sql>
  <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBasePurchaseDetailsExample" 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_purchase_details
    <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_purchase_details
    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_purchase_details
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcBasePurchaseDetailsExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_base_purchase_details
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.bailuntec.domain.entity.DcBasePurchaseDetails">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_purchase_details (id, purchase_id, status, 
      purchase_category_name, deliver_id, deliver_name, 
      buyer_name, warehouse_from_code, warehouse_from_name, 
      warehouse_into_code, warehouse_into_name, bailun_sku, 
      quantity_purchase, unit_price, amount_paid, 
      currency_code, currency_name, quantity_return, 
      quantity_inbound, quantity_deliver, quantity_not_deliver, 
      quantity_arrival, quantity_not_arrival, quantity_inspect, 
      quantity_qualified_inspect, quantity_unqualified_inspect, 
      quantity_wait_transfer, quantity_exchange, 
      quantity_lose_inbound, create_time, update_time, 
      gmt_create, gmt_modified, quantity_not_inbound, 
      alibaba_order_id, logistics_order_id, logistics_company_name
      )
    values (#{id,jdbcType=INTEGER}, #{purchaseId,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, 
      #{purchaseCategoryName,jdbcType=VARCHAR}, #{deliverId,jdbcType=INTEGER}, #{deliverName,jdbcType=VARCHAR}, 
      #{buyerName,jdbcType=VARCHAR}, #{warehouseFromCode,jdbcType=VARCHAR}, #{warehouseFromName,jdbcType=VARCHAR}, 
      #{warehouseIntoCode,jdbcType=VARCHAR}, #{warehouseIntoName,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR}, 
      #{quantityPurchase,jdbcType=INTEGER}, #{unitPrice,jdbcType=DECIMAL}, #{amountPaid,jdbcType=DECIMAL}, 
      #{currencyCode,jdbcType=VARCHAR}, #{currencyName,jdbcType=VARCHAR}, #{quantityReturn,jdbcType=INTEGER}, 
      #{quantityInbound,jdbcType=INTEGER}, #{quantityDeliver,jdbcType=INTEGER}, #{quantityNotDeliver,jdbcType=INTEGER}, 
      #{quantityArrival,jdbcType=INTEGER}, #{quantityNotArrival,jdbcType=INTEGER}, #{quantityInspect,jdbcType=INTEGER}, 
      #{quantityQualifiedInspect,jdbcType=INTEGER}, #{quantityUnqualifiedInspect,jdbcType=INTEGER}, 
      #{quantityWaitTransfer,jdbcType=INTEGER}, #{quantityExchange,jdbcType=INTEGER}, 
      #{quantityLoseInbound,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{quantityNotInbound,jdbcType=INTEGER}, 
      #{alibabaOrderId,jdbcType=VARCHAR}, #{logisticsOrderId,jdbcType=VARCHAR}, #{logisticsCompanyName,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBasePurchaseDetails">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_purchase_details
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="purchaseId != null">
        purchase_id,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="purchaseCategoryName != null">
        purchase_category_name,
      </if>
      <if test="deliverId != null">
        deliver_id,
      </if>
      <if test="deliverName != null">
        deliver_name,
      </if>
      <if test="buyerName != null">
        buyer_name,
      </if>
      <if test="warehouseFromCode != null">
        warehouse_from_code,
      </if>
      <if test="warehouseFromName != null">
        warehouse_from_name,
      </if>
      <if test="warehouseIntoCode != null">
        warehouse_into_code,
      </if>
      <if test="warehouseIntoName != null">
        warehouse_into_name,
      </if>
      <if test="bailunSku != null">
        bailun_sku,
      </if>
      <if test="quantityPurchase != null">
        quantity_purchase,
      </if>
      <if test="unitPrice != null">
        unit_price,
      </if>
      <if test="amountPaid != null">
        amount_paid,
      </if>
      <if test="currencyCode != null">
        currency_code,
      </if>
      <if test="currencyName != null">
        currency_name,
      </if>
      <if test="quantityReturn != null">
        quantity_return,
      </if>
      <if test="quantityInbound != null">
        quantity_inbound,
      </if>
      <if test="quantityDeliver != null">
        quantity_deliver,
      </if>
      <if test="quantityNotDeliver != null">
        quantity_not_deliver,
      </if>
      <if test="quantityArrival != null">
        quantity_arrival,
      </if>
      <if test="quantityNotArrival != null">
        quantity_not_arrival,
      </if>
      <if test="quantityInspect != null">
        quantity_inspect,
      </if>
      <if test="quantityQualifiedInspect != null">
        quantity_qualified_inspect,
      </if>
      <if test="quantityUnqualifiedInspect != null">
        quantity_unqualified_inspect,
      </if>
      <if test="quantityWaitTransfer != null">
        quantity_wait_transfer,
      </if>
      <if test="quantityExchange != null">
        quantity_exchange,
      </if>
      <if test="quantityLoseInbound != null">
        quantity_lose_inbound,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
      <if test="quantityNotInbound != null">
        quantity_not_inbound,
      </if>
      <if test="alibabaOrderId != null">
        alibaba_order_id,
      </if>
      <if test="logisticsOrderId != null">
        logistics_order_id,
      </if>
      <if test="logisticsCompanyName != null">
        logistics_company_name,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="purchaseId != null">
        #{purchaseId,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=TINYINT},
      </if>
      <if test="purchaseCategoryName != null">
        #{purchaseCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="deliverId != null">
        #{deliverId,jdbcType=INTEGER},
      </if>
      <if test="deliverName != null">
        #{deliverName,jdbcType=VARCHAR},
      </if>
      <if test="buyerName != null">
        #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="warehouseFromCode != null">
        #{warehouseFromCode,jdbcType=VARCHAR},
      </if>
      <if test="warehouseFromName != null">
        #{warehouseFromName,jdbcType=VARCHAR},
      </if>
      <if test="warehouseIntoCode != null">
        #{warehouseIntoCode,jdbcType=VARCHAR},
      </if>
      <if test="warehouseIntoName != null">
        #{warehouseIntoName,jdbcType=VARCHAR},
      </if>
      <if test="bailunSku != null">
        #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="quantityPurchase != null">
        #{quantityPurchase,jdbcType=INTEGER},
      </if>
      <if test="unitPrice != null">
        #{unitPrice,jdbcType=DECIMAL},
      </if>
      <if test="amountPaid != null">
        #{amountPaid,jdbcType=DECIMAL},
      </if>
      <if test="currencyCode != null">
        #{currencyCode,jdbcType=VARCHAR},
      </if>
      <if test="currencyName != null">
        #{currencyName,jdbcType=VARCHAR},
      </if>
      <if test="quantityReturn != null">
        #{quantityReturn,jdbcType=INTEGER},
      </if>
      <if test="quantityInbound != null">
        #{quantityInbound,jdbcType=INTEGER},
      </if>
      <if test="quantityDeliver != null">
        #{quantityDeliver,jdbcType=INTEGER},
      </if>
      <if test="quantityNotDeliver != null">
        #{quantityNotDeliver,jdbcType=INTEGER},
      </if>
      <if test="quantityArrival != null">
        #{quantityArrival,jdbcType=INTEGER},
      </if>
      <if test="quantityNotArrival != null">
        #{quantityNotArrival,jdbcType=INTEGER},
      </if>
      <if test="quantityInspect != null">
        #{quantityInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityQualifiedInspect != null">
        #{quantityQualifiedInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityUnqualifiedInspect != null">
        #{quantityUnqualifiedInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityWaitTransfer != null">
        #{quantityWaitTransfer,jdbcType=INTEGER},
      </if>
      <if test="quantityExchange != null">
        #{quantityExchange,jdbcType=INTEGER},
      </if>
      <if test="quantityLoseInbound != null">
        #{quantityLoseInbound,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="quantityNotInbound != null">
        #{quantityNotInbound,jdbcType=INTEGER},
      </if>
      <if test="alibabaOrderId != null">
        #{alibabaOrderId,jdbcType=VARCHAR},
      </if>
      <if test="logisticsOrderId != null">
        #{logisticsOrderId,jdbcType=VARCHAR},
      </if>
      <if test="logisticsCompanyName != null">
        #{logisticsCompanyName,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBasePurchaseDetailsExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from dc_base_purchase_details
    <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_purchase_details
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.purchaseId != null">
        purchase_id = #{record.purchaseId,jdbcType=VARCHAR},
      </if>
      <if test="record.status != null">
        status = #{record.status,jdbcType=TINYINT},
      </if>
      <if test="record.purchaseCategoryName != null">
        purchase_category_name = #{record.purchaseCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="record.deliverId != null">
        deliver_id = #{record.deliverId,jdbcType=INTEGER},
      </if>
      <if test="record.deliverName != null">
        deliver_name = #{record.deliverName,jdbcType=VARCHAR},
      </if>
      <if test="record.buyerName != null">
        buyer_name = #{record.buyerName,jdbcType=VARCHAR},
      </if>
      <if test="record.warehouseFromCode != null">
        warehouse_from_code = #{record.warehouseFromCode,jdbcType=VARCHAR},
      </if>
      <if test="record.warehouseFromName != null">
        warehouse_from_name = #{record.warehouseFromName,jdbcType=VARCHAR},
      </if>
      <if test="record.warehouseIntoCode != null">
        warehouse_into_code = #{record.warehouseIntoCode,jdbcType=VARCHAR},
      </if>
      <if test="record.warehouseIntoName != null">
        warehouse_into_name = #{record.warehouseIntoName,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunSku != null">
        bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="record.quantityPurchase != null">
        quantity_purchase = #{record.quantityPurchase,jdbcType=INTEGER},
      </if>
      <if test="record.unitPrice != null">
        unit_price = #{record.unitPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.amountPaid != null">
        amount_paid = #{record.amountPaid,jdbcType=DECIMAL},
      </if>
      <if test="record.currencyCode != null">
        currency_code = #{record.currencyCode,jdbcType=VARCHAR},
      </if>
      <if test="record.currencyName != null">
        currency_name = #{record.currencyName,jdbcType=VARCHAR},
      </if>
      <if test="record.quantityReturn != null">
        quantity_return = #{record.quantityReturn,jdbcType=INTEGER},
      </if>
      <if test="record.quantityInbound != null">
        quantity_inbound = #{record.quantityInbound,jdbcType=INTEGER},
      </if>
      <if test="record.quantityDeliver != null">
        quantity_deliver = #{record.quantityDeliver,jdbcType=INTEGER},
      </if>
      <if test="record.quantityNotDeliver != null">
        quantity_not_deliver = #{record.quantityNotDeliver,jdbcType=INTEGER},
      </if>
      <if test="record.quantityArrival != null">
        quantity_arrival = #{record.quantityArrival,jdbcType=INTEGER},
      </if>
      <if test="record.quantityNotArrival != null">
        quantity_not_arrival = #{record.quantityNotArrival,jdbcType=INTEGER},
      </if>
      <if test="record.quantityInspect != null">
        quantity_inspect = #{record.quantityInspect,jdbcType=INTEGER},
      </if>
      <if test="record.quantityQualifiedInspect != null">
        quantity_qualified_inspect = #{record.quantityQualifiedInspect,jdbcType=INTEGER},
      </if>
      <if test="record.quantityUnqualifiedInspect != null">
        quantity_unqualified_inspect = #{record.quantityUnqualifiedInspect,jdbcType=INTEGER},
      </if>
      <if test="record.quantityWaitTransfer != null">
        quantity_wait_transfer = #{record.quantityWaitTransfer,jdbcType=INTEGER},
      </if>
      <if test="record.quantityExchange != null">
        quantity_exchange = #{record.quantityExchange,jdbcType=INTEGER},
      </if>
      <if test="record.quantityLoseInbound != null">
        quantity_lose_inbound = #{record.quantityLoseInbound,jdbcType=INTEGER},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </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.quantityNotInbound != null">
        quantity_not_inbound = #{record.quantityNotInbound,jdbcType=INTEGER},
      </if>
      <if test="record.alibabaOrderId != null">
        alibaba_order_id = #{record.alibabaOrderId,jdbcType=VARCHAR},
      </if>
      <if test="record.logisticsOrderId != null">
        logistics_order_id = #{record.logisticsOrderId,jdbcType=VARCHAR},
      </if>
      <if test="record.logisticsCompanyName != null">
        logistics_company_name = #{record.logisticsCompanyName,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_purchase_details
    set id = #{record.id,jdbcType=INTEGER},
      purchase_id = #{record.purchaseId,jdbcType=VARCHAR},
      status = #{record.status,jdbcType=TINYINT},
      purchase_category_name = #{record.purchaseCategoryName,jdbcType=VARCHAR},
      deliver_id = #{record.deliverId,jdbcType=INTEGER},
      deliver_name = #{record.deliverName,jdbcType=VARCHAR},
      buyer_name = #{record.buyerName,jdbcType=VARCHAR},
      warehouse_from_code = #{record.warehouseFromCode,jdbcType=VARCHAR},
      warehouse_from_name = #{record.warehouseFromName,jdbcType=VARCHAR},
      warehouse_into_code = #{record.warehouseIntoCode,jdbcType=VARCHAR},
      warehouse_into_name = #{record.warehouseIntoName,jdbcType=VARCHAR},
      bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
      quantity_purchase = #{record.quantityPurchase,jdbcType=INTEGER},
      unit_price = #{record.unitPrice,jdbcType=DECIMAL},
      amount_paid = #{record.amountPaid,jdbcType=DECIMAL},
      currency_code = #{record.currencyCode,jdbcType=VARCHAR},
      currency_name = #{record.currencyName,jdbcType=VARCHAR},
      quantity_return = #{record.quantityReturn,jdbcType=INTEGER},
      quantity_inbound = #{record.quantityInbound,jdbcType=INTEGER},
      quantity_deliver = #{record.quantityDeliver,jdbcType=INTEGER},
      quantity_not_deliver = #{record.quantityNotDeliver,jdbcType=INTEGER},
      quantity_arrival = #{record.quantityArrival,jdbcType=INTEGER},
      quantity_not_arrival = #{record.quantityNotArrival,jdbcType=INTEGER},
      quantity_inspect = #{record.quantityInspect,jdbcType=INTEGER},
      quantity_qualified_inspect = #{record.quantityQualifiedInspect,jdbcType=INTEGER},
      quantity_unqualified_inspect = #{record.quantityUnqualifiedInspect,jdbcType=INTEGER},
      quantity_wait_transfer = #{record.quantityWaitTransfer,jdbcType=INTEGER},
      quantity_exchange = #{record.quantityExchange,jdbcType=INTEGER},
      quantity_lose_inbound = #{record.quantityLoseInbound,jdbcType=INTEGER},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
      quantity_not_inbound = #{record.quantityNotInbound,jdbcType=INTEGER},
      alibaba_order_id = #{record.alibabaOrderId,jdbcType=VARCHAR},
      logistics_order_id = #{record.logisticsOrderId,jdbcType=VARCHAR},
      logistics_company_name = #{record.logisticsCompanyName,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcBasePurchaseDetails">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_purchase_details
    <set>
      <if test="purchaseId != null">
        purchase_id = #{purchaseId,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=TINYINT},
      </if>
      <if test="purchaseCategoryName != null">
        purchase_category_name = #{purchaseCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="deliverId != null">
        deliver_id = #{deliverId,jdbcType=INTEGER},
      </if>
      <if test="deliverName != null">
        deliver_name = #{deliverName,jdbcType=VARCHAR},
      </if>
      <if test="buyerName != null">
        buyer_name = #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="warehouseFromCode != null">
        warehouse_from_code = #{warehouseFromCode,jdbcType=VARCHAR},
      </if>
      <if test="warehouseFromName != null">
        warehouse_from_name = #{warehouseFromName,jdbcType=VARCHAR},
      </if>
      <if test="warehouseIntoCode != null">
        warehouse_into_code = #{warehouseIntoCode,jdbcType=VARCHAR},
      </if>
      <if test="warehouseIntoName != null">
        warehouse_into_name = #{warehouseIntoName,jdbcType=VARCHAR},
      </if>
      <if test="bailunSku != null">
        bailun_sku = #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="quantityPurchase != null">
        quantity_purchase = #{quantityPurchase,jdbcType=INTEGER},
      </if>
      <if test="unitPrice != null">
        unit_price = #{unitPrice,jdbcType=DECIMAL},
      </if>
      <if test="amountPaid != null">
        amount_paid = #{amountPaid,jdbcType=DECIMAL},
      </if>
      <if test="currencyCode != null">
        currency_code = #{currencyCode,jdbcType=VARCHAR},
      </if>
      <if test="currencyName != null">
        currency_name = #{currencyName,jdbcType=VARCHAR},
      </if>
      <if test="quantityReturn != null">
        quantity_return = #{quantityReturn,jdbcType=INTEGER},
      </if>
      <if test="quantityInbound != null">
        quantity_inbound = #{quantityInbound,jdbcType=INTEGER},
      </if>
      <if test="quantityDeliver != null">
        quantity_deliver = #{quantityDeliver,jdbcType=INTEGER},
      </if>
      <if test="quantityNotDeliver != null">
        quantity_not_deliver = #{quantityNotDeliver,jdbcType=INTEGER},
      </if>
      <if test="quantityArrival != null">
        quantity_arrival = #{quantityArrival,jdbcType=INTEGER},
      </if>
      <if test="quantityNotArrival != null">
        quantity_not_arrival = #{quantityNotArrival,jdbcType=INTEGER},
      </if>
      <if test="quantityInspect != null">
        quantity_inspect = #{quantityInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityQualifiedInspect != null">
        quantity_qualified_inspect = #{quantityQualifiedInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityUnqualifiedInspect != null">
        quantity_unqualified_inspect = #{quantityUnqualifiedInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityWaitTransfer != null">
        quantity_wait_transfer = #{quantityWaitTransfer,jdbcType=INTEGER},
      </if>
      <if test="quantityExchange != null">
        quantity_exchange = #{quantityExchange,jdbcType=INTEGER},
      </if>
      <if test="quantityLoseInbound != null">
        quantity_lose_inbound = #{quantityLoseInbound,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="quantityNotInbound != null">
        quantity_not_inbound = #{quantityNotInbound,jdbcType=INTEGER},
      </if>
      <if test="alibabaOrderId != null">
        alibaba_order_id = #{alibabaOrderId,jdbcType=VARCHAR},
      </if>
      <if test="logisticsOrderId != null">
        logistics_order_id = #{logisticsOrderId,jdbcType=VARCHAR},
      </if>
      <if test="logisticsCompanyName != null">
        logistics_company_name = #{logisticsCompanyName,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcBasePurchaseDetails">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_purchase_details
    set purchase_id = #{purchaseId,jdbcType=VARCHAR},
      status = #{status,jdbcType=TINYINT},
      purchase_category_name = #{purchaseCategoryName,jdbcType=VARCHAR},
      deliver_id = #{deliverId,jdbcType=INTEGER},
      deliver_name = #{deliverName,jdbcType=VARCHAR},
      buyer_name = #{buyerName,jdbcType=VARCHAR},
      warehouse_from_code = #{warehouseFromCode,jdbcType=VARCHAR},
      warehouse_from_name = #{warehouseFromName,jdbcType=VARCHAR},
      warehouse_into_code = #{warehouseIntoCode,jdbcType=VARCHAR},
      warehouse_into_name = #{warehouseIntoName,jdbcType=VARCHAR},
      bailun_sku = #{bailunSku,jdbcType=VARCHAR},
      quantity_purchase = #{quantityPurchase,jdbcType=INTEGER},
      unit_price = #{unitPrice,jdbcType=DECIMAL},
      amount_paid = #{amountPaid,jdbcType=DECIMAL},
      currency_code = #{currencyCode,jdbcType=VARCHAR},
      currency_name = #{currencyName,jdbcType=VARCHAR},
      quantity_return = #{quantityReturn,jdbcType=INTEGER},
      quantity_inbound = #{quantityInbound,jdbcType=INTEGER},
      quantity_deliver = #{quantityDeliver,jdbcType=INTEGER},
      quantity_not_deliver = #{quantityNotDeliver,jdbcType=INTEGER},
      quantity_arrival = #{quantityArrival,jdbcType=INTEGER},
      quantity_not_arrival = #{quantityNotArrival,jdbcType=INTEGER},
      quantity_inspect = #{quantityInspect,jdbcType=INTEGER},
      quantity_qualified_inspect = #{quantityQualifiedInspect,jdbcType=INTEGER},
      quantity_unqualified_inspect = #{quantityUnqualifiedInspect,jdbcType=INTEGER},
      quantity_wait_transfer = #{quantityWaitTransfer,jdbcType=INTEGER},
      quantity_exchange = #{quantityExchange,jdbcType=INTEGER},
      quantity_lose_inbound = #{quantityLoseInbound,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      quantity_not_inbound = #{quantityNotInbound,jdbcType=INTEGER},
      alibaba_order_id = #{alibabaOrderId,jdbcType=VARCHAR},
      logistics_order_id = #{logisticsOrderId,jdbcType=VARCHAR},
      logistics_company_name = #{logisticsCompanyName,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBasePurchaseDetails">
    <!--
      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_purchase_details
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="purchaseId != null">
        purchase_id,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="purchaseCategoryName != null">
        purchase_category_name,
      </if>
      <if test="deliverId != null">
        deliver_id,
      </if>
      <if test="deliverName != null">
        deliver_name,
      </if>
      <if test="buyerName != null">
        buyer_name,
      </if>
      <if test="warehouseFromCode != null">
        warehouse_from_code,
      </if>
      <if test="warehouseFromName != null">
        warehouse_from_name,
      </if>
      <if test="warehouseIntoCode != null">
        warehouse_into_code,
      </if>
      <if test="warehouseIntoName != null">
        warehouse_into_name,
      </if>
      <if test="bailunSku != null">
        bailun_sku,
      </if>
      <if test="quantityPurchase != null">
        quantity_purchase,
      </if>
      <if test="unitPrice != null">
        unit_price,
      </if>
      <if test="amountPaid != null">
        amount_paid,
      </if>
      <if test="currencyCode != null">
        currency_code,
      </if>
      <if test="currencyName != null">
        currency_name,
      </if>
      <if test="quantityReturn != null">
        quantity_return,
      </if>
      <if test="quantityInbound != null">
        quantity_inbound,
      </if>
      <if test="quantityDeliver != null">
        quantity_deliver,
      </if>
      <if test="quantityNotDeliver != null">
        quantity_not_deliver,
      </if>
      <if test="quantityArrival != null">
        quantity_arrival,
      </if>
      <if test="quantityNotArrival != null">
        quantity_not_arrival,
      </if>
      <if test="quantityInspect != null">
        quantity_inspect,
      </if>
      <if test="quantityQualifiedInspect != null">
        quantity_qualified_inspect,
      </if>
      <if test="quantityUnqualifiedInspect != null">
        quantity_unqualified_inspect,
      </if>
      <if test="quantityWaitTransfer != null">
        quantity_wait_transfer,
      </if>
      <if test="quantityExchange != null">
        quantity_exchange,
      </if>
      <if test="quantityLoseInbound != null">
        quantity_lose_inbound,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
      <if test="quantityNotInbound != null">
        quantity_not_inbound,
      </if>
      <if test="alibabaOrderId != null">
        alibaba_order_id,
      </if>
      <if test="logisticsOrderId != null">
        logistics_order_id,
      </if>
      <if test="logisticsCompanyName != null">
        logistics_company_name,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="purchaseId != null">
        #{purchaseId,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=TINYINT},
      </if>
      <if test="purchaseCategoryName != null">
        #{purchaseCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="deliverId != null">
        #{deliverId,jdbcType=INTEGER},
      </if>
      <if test="deliverName != null">
        #{deliverName,jdbcType=VARCHAR},
      </if>
      <if test="buyerName != null">
        #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="warehouseFromCode != null">
        #{warehouseFromCode,jdbcType=VARCHAR},
      </if>
      <if test="warehouseFromName != null">
        #{warehouseFromName,jdbcType=VARCHAR},
      </if>
      <if test="warehouseIntoCode != null">
        #{warehouseIntoCode,jdbcType=VARCHAR},
      </if>
      <if test="warehouseIntoName != null">
        #{warehouseIntoName,jdbcType=VARCHAR},
      </if>
      <if test="bailunSku != null">
        #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="quantityPurchase != null">
        #{quantityPurchase,jdbcType=INTEGER},
      </if>
      <if test="unitPrice != null">
        #{unitPrice,jdbcType=DECIMAL},
      </if>
      <if test="amountPaid != null">
        #{amountPaid,jdbcType=DECIMAL},
      </if>
      <if test="currencyCode != null">
        #{currencyCode,jdbcType=VARCHAR},
      </if>
      <if test="currencyName != null">
        #{currencyName,jdbcType=VARCHAR},
      </if>
      <if test="quantityReturn != null">
        #{quantityReturn,jdbcType=INTEGER},
      </if>
      <if test="quantityInbound != null">
        #{quantityInbound,jdbcType=INTEGER},
      </if>
      <if test="quantityDeliver != null">
        #{quantityDeliver,jdbcType=INTEGER},
      </if>
      <if test="quantityNotDeliver != null">
        #{quantityNotDeliver,jdbcType=INTEGER},
      </if>
      <if test="quantityArrival != null">
        #{quantityArrival,jdbcType=INTEGER},
      </if>
      <if test="quantityNotArrival != null">
        #{quantityNotArrival,jdbcType=INTEGER},
      </if>
      <if test="quantityInspect != null">
        #{quantityInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityQualifiedInspect != null">
        #{quantityQualifiedInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityUnqualifiedInspect != null">
        #{quantityUnqualifiedInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityWaitTransfer != null">
        #{quantityWaitTransfer,jdbcType=INTEGER},
      </if>
      <if test="quantityExchange != null">
        #{quantityExchange,jdbcType=INTEGER},
      </if>
      <if test="quantityLoseInbound != null">
        #{quantityLoseInbound,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="quantityNotInbound != null">
        #{quantityNotInbound,jdbcType=INTEGER},
      </if>
      <if test="alibabaOrderId != null">
        #{alibabaOrderId,jdbcType=VARCHAR},
      </if>
      <if test="logisticsOrderId != null">
        #{logisticsOrderId,jdbcType=VARCHAR},
      </if>
      <if test="logisticsCompanyName != null">
        #{logisticsCompanyName,jdbcType=VARCHAR},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="purchaseId != null">
        purchase_id = #{purchaseId,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=TINYINT},
      </if>
      <if test="purchaseCategoryName != null">
        purchase_category_name = #{purchaseCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="deliverId != null">
        deliver_id = #{deliverId,jdbcType=INTEGER},
      </if>
      <if test="deliverName != null">
        deliver_name = #{deliverName,jdbcType=VARCHAR},
      </if>
      <if test="buyerName != null">
        buyer_name = #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="warehouseFromCode != null">
        warehouse_from_code = #{warehouseFromCode,jdbcType=VARCHAR},
      </if>
      <if test="warehouseFromName != null">
        warehouse_from_name = #{warehouseFromName,jdbcType=VARCHAR},
      </if>
      <if test="warehouseIntoCode != null">
        warehouse_into_code = #{warehouseIntoCode,jdbcType=VARCHAR},
      </if>
      <if test="warehouseIntoName != null">
        warehouse_into_name = #{warehouseIntoName,jdbcType=VARCHAR},
      </if>
      <if test="bailunSku != null">
        bailun_sku = #{bailunSku,jdbcType=VARCHAR},
      </if>
      <if test="quantityPurchase != null">
        quantity_purchase = #{quantityPurchase,jdbcType=INTEGER},
      </if>
      <if test="unitPrice != null">
        unit_price = #{unitPrice,jdbcType=DECIMAL},
      </if>
      <if test="amountPaid != null">
        amount_paid = #{amountPaid,jdbcType=DECIMAL},
      </if>
      <if test="currencyCode != null">
        currency_code = #{currencyCode,jdbcType=VARCHAR},
      </if>
      <if test="currencyName != null">
        currency_name = #{currencyName,jdbcType=VARCHAR},
      </if>
      <if test="quantityReturn != null">
        quantity_return = #{quantityReturn,jdbcType=INTEGER},
      </if>
      <if test="quantityInbound != null">
        quantity_inbound = #{quantityInbound,jdbcType=INTEGER},
      </if>
      <if test="quantityDeliver != null">
        quantity_deliver = #{quantityDeliver,jdbcType=INTEGER},
      </if>
      <if test="quantityNotDeliver != null">
        quantity_not_deliver = #{quantityNotDeliver,jdbcType=INTEGER},
      </if>
      <if test="quantityArrival != null">
        quantity_arrival = #{quantityArrival,jdbcType=INTEGER},
      </if>
      <if test="quantityNotArrival != null">
        quantity_not_arrival = #{quantityNotArrival,jdbcType=INTEGER},
      </if>
      <if test="quantityInspect != null">
        quantity_inspect = #{quantityInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityQualifiedInspect != null">
        quantity_qualified_inspect = #{quantityQualifiedInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityUnqualifiedInspect != null">
        quantity_unqualified_inspect = #{quantityUnqualifiedInspect,jdbcType=INTEGER},
      </if>
      <if test="quantityWaitTransfer != null">
        quantity_wait_transfer = #{quantityWaitTransfer,jdbcType=INTEGER},
      </if>
      <if test="quantityExchange != null">
        quantity_exchange = #{quantityExchange,jdbcType=INTEGER},
      </if>
      <if test="quantityLoseInbound != null">
        quantity_lose_inbound = #{quantityLoseInbound,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="quantityNotInbound != null">
        quantity_not_inbound = #{quantityNotInbound,jdbcType=INTEGER},
      </if>
      <if test="alibabaOrderId != null">
        alibaba_order_id = #{alibabaOrderId,jdbcType=VARCHAR},
      </if>
      <if test="logisticsOrderId != null">
        logistics_order_id = #{logisticsOrderId,jdbcType=VARCHAR},
      </if>
      <if test="logisticsCompanyName != null">
        logistics_company_name = #{logisticsCompanyName,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBasePurchaseDetails">
    <!--
      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_purchase_details
    (id, purchase_id, status, purchase_category_name, deliver_id, deliver_name, buyer_name, 
      warehouse_from_code, warehouse_from_name, warehouse_into_code, warehouse_into_name, 
      bailun_sku, quantity_purchase, unit_price, amount_paid, currency_code, currency_name, 
      quantity_return, quantity_inbound, quantity_deliver, quantity_not_deliver, quantity_arrival, 
      quantity_not_arrival, quantity_inspect, quantity_qualified_inspect, quantity_unqualified_inspect, 
      quantity_wait_transfer, quantity_exchange, quantity_lose_inbound, create_time, 
      update_time, gmt_create, gmt_modified, quantity_not_inbound, alibaba_order_id, 
      logistics_order_id, logistics_company_name)
    values
    (#{id,jdbcType=INTEGER}, #{purchaseId,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, 
      #{purchaseCategoryName,jdbcType=VARCHAR}, #{deliverId,jdbcType=INTEGER}, #{deliverName,jdbcType=VARCHAR}, 
      #{buyerName,jdbcType=VARCHAR}, #{warehouseFromCode,jdbcType=VARCHAR}, #{warehouseFromName,jdbcType=VARCHAR}, 
      #{warehouseIntoCode,jdbcType=VARCHAR}, #{warehouseIntoName,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR}, 
      #{quantityPurchase,jdbcType=INTEGER}, #{unitPrice,jdbcType=DECIMAL}, #{amountPaid,jdbcType=DECIMAL}, 
      #{currencyCode,jdbcType=VARCHAR}, #{currencyName,jdbcType=VARCHAR}, #{quantityReturn,jdbcType=INTEGER}, 
      #{quantityInbound,jdbcType=INTEGER}, #{quantityDeliver,jdbcType=INTEGER}, #{quantityNotDeliver,jdbcType=INTEGER}, 
      #{quantityArrival,jdbcType=INTEGER}, #{quantityNotArrival,jdbcType=INTEGER}, #{quantityInspect,jdbcType=INTEGER}, 
      #{quantityQualifiedInspect,jdbcType=INTEGER}, #{quantityUnqualifiedInspect,jdbcType=INTEGER}, 
      #{quantityWaitTransfer,jdbcType=INTEGER}, #{quantityExchange,jdbcType=INTEGER}, 
      #{quantityLoseInbound,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{quantityNotInbound,jdbcType=INTEGER}, 
      #{alibabaOrderId,jdbcType=VARCHAR}, #{logisticsOrderId,jdbcType=VARCHAR}, #{logisticsCompanyName,jdbcType=VARCHAR}
      )
    on duplicate key update 
    id = #{id,jdbcType=INTEGER}, 
    purchase_id = #{purchaseId,jdbcType=VARCHAR}, 
    status = #{status,jdbcType=TINYINT}, 
    purchase_category_name = #{purchaseCategoryName,jdbcType=VARCHAR}, 
    deliver_id = #{deliverId,jdbcType=INTEGER}, 
    deliver_name = #{deliverName,jdbcType=VARCHAR}, 
    buyer_name = #{buyerName,jdbcType=VARCHAR}, 
    warehouse_from_code = #{warehouseFromCode,jdbcType=VARCHAR}, 
    warehouse_from_name = #{warehouseFromName,jdbcType=VARCHAR}, 
    warehouse_into_code = #{warehouseIntoCode,jdbcType=VARCHAR}, 
    warehouse_into_name = #{warehouseIntoName,jdbcType=VARCHAR}, 
    bailun_sku = #{bailunSku,jdbcType=VARCHAR}, 
    quantity_purchase = #{quantityPurchase,jdbcType=INTEGER}, 
    unit_price = #{unitPrice,jdbcType=DECIMAL}, 
    amount_paid = #{amountPaid,jdbcType=DECIMAL}, 
    currency_code = #{currencyCode,jdbcType=VARCHAR}, 
    currency_name = #{currencyName,jdbcType=VARCHAR}, 
    quantity_return = #{quantityReturn,jdbcType=INTEGER}, 
    quantity_inbound = #{quantityInbound,jdbcType=INTEGER}, 
    quantity_deliver = #{quantityDeliver,jdbcType=INTEGER}, 
    quantity_not_deliver = #{quantityNotDeliver,jdbcType=INTEGER}, 
    quantity_arrival = #{quantityArrival,jdbcType=INTEGER}, 
    quantity_not_arrival = #{quantityNotArrival,jdbcType=INTEGER}, 
    quantity_inspect = #{quantityInspect,jdbcType=INTEGER}, 
    quantity_qualified_inspect = #{quantityQualifiedInspect,jdbcType=INTEGER}, 
    quantity_unqualified_inspect = #{quantityUnqualifiedInspect,jdbcType=INTEGER}, 
    quantity_wait_transfer = #{quantityWaitTransfer,jdbcType=INTEGER}, 
    quantity_exchange = #{quantityExchange,jdbcType=INTEGER}, 
    quantity_lose_inbound = #{quantityLoseInbound,jdbcType=INTEGER}, 
    create_time = #{createTime,jdbcType=TIMESTAMP}, 
    update_time = #{updateTime,jdbcType=TIMESTAMP}, 
    gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, 
    gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, 
    quantity_not_inbound = #{quantityNotInbound,jdbcType=INTEGER}, 
    alibaba_order_id = #{alibabaOrderId,jdbcType=VARCHAR}, 
    logistics_order_id = #{logisticsOrderId,jdbcType=VARCHAR}, 
    logistics_company_name = #{logisticsCompanyName,jdbcType=VARCHAR}
  </insert>
  <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBasePurchaseDetailsExample" 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_purchase_details
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
</mapper>