<?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="cn.superdesk.uniorder.dao.mapper.thirdpart.jd.AccountingUnifiedSupplierOrderJdMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJd">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="batch_id" jdbcType="VARCHAR" property="batchId" />
    <result column="jd_order_sn" jdbcType="VARCHAR" property="jdOrderSn" />
    <result column="jd_original_order_sn" jdbcType="VARCHAR" property="jdOriginalOrderSn" />
    <result column="payment_no" jdbcType="VARCHAR" property="paymentNo" />
    <result column="jd_accoumt_user_name" jdbcType="VARCHAR" property="jdAccoumtUserName" />
    <result column="product_number" jdbcType="VARCHAR" property="productNumber" />
    <result column="biz_type" jdbcType="VARCHAR" property="bizType" />
    <result column="jd_create_time" jdbcType="TIMESTAMP" property="jdCreateTime" />
    <result column="jd_pay_time" jdbcType="TIMESTAMP" property="jdPayTime" />
    <result column="jd_finish_time" jdbcType="TIMESTAMP" property="jdFinishTime" />
    <result column="jd_order_amount" jdbcType="DECIMAL" property="jdOrderAmount" />
    <result column="jd_repayment_amount" jdbcType="DECIMAL" property="jdRepaymentAmount" />
    <result column="jd_refund_amount" jdbcType="DECIMAL" property="jdRefundAmount" />
    <result column="jd_out_standing_amount" jdbcType="DECIMAL" property="jdOutStandingAmount" />
    <result column="jd_order_state" jdbcType="TINYINT" property="jdOrderState" />
    <result column="jd_order_state_name" jdbcType="VARCHAR" property="jdOrderStateName" />
    <result column="were_accounted_state" jdbcType="TINYINT" property="wereAccountedState" />
    <result column="were_accounted_state_name" jdbcType="VARCHAR" property="wereAccountedStateName" />
    <result column="out_account_time" jdbcType="TIMESTAMP" property="outAccountTime" />
    <result column="jd_accounting_order_sn" jdbcType="VARCHAR" property="jdAccountingOrderSn" />
    <result column="settled_state" jdbcType="TINYINT" property="settledState" />
    <result column="settled_state_name" jdbcType="VARCHAR" property="settledStateName" />
    <result column="settled_time" jdbcType="TIMESTAMP" property="settledTime" />
    <result column="purchaser_contract_sn" jdbcType="VARCHAR" property="purchaserContractSn" />
    <result column="purchaser_virt_code" jdbcType="VARCHAR" property="purchaserVirtCode" />
    <result column="purchaser_virt_name" jdbcType="VARCHAR" property="purchaserVirtName" />
    <result column="invoiced_state" jdbcType="TINYINT" property="invoicedState" />
    <result column="invoiced_state_name" jdbcType="VARCHAR" property="invoicedStateName" />
    <result column="after_sale_state" jdbcType="TINYINT" property="afterSaleState" />
    <result column="after_sale_state_name" jdbcType="VARCHAR" property="afterSaleStateName" />
    <result column="repayment_order_sn" jdbcType="VARCHAR" property="repaymentOrderSn" />
    <result column="invoiced_date" jdbcType="TIMESTAMP" property="invoicedDate" />
    <result column="repayment_time" jdbcType="TIMESTAMP" property="repaymentTime" />
    <result column="overdue_days" jdbcType="INTEGER" property="overdueDays" />
    <result column="jd_order_type" jdbcType="TINYINT" property="jdOrderType" />
    <result column="jd_order_type_name" jdbcType="VARCHAR" property="jdOrderTypeName" />
    <result column="jd_pay_type" jdbcType="TINYINT" property="jdPayType" />
    <result column="jd_pay_type_name" jdbcType="VARCHAR" property="jdPayTypeName" />
    <result column="invoice_number" jdbcType="VARCHAR" property="invoiceNumber" />
    <result column="invoice_category_code" jdbcType="VARCHAR" property="invoiceCategoryCode" />
    <result column="total_amount_including_tax" jdbcType="DECIMAL" property="totalAmountIncludingTax" />
    <result column="purchaser_company_name" jdbcType="VARCHAR" property="purchaserCompanyName" />
    <result column="invoice_type_id" jdbcType="TINYINT" property="invoiceTypeId" />
    <result column="invoice_type" jdbcType="VARCHAR" property="invoiceType" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
    <result column="create_user_name" jdbcType="VARCHAR" property="createUserName" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
    <result column="update_user_name" jdbcType="VARCHAR" property="updateUserName" />
    <result column="process_result" jdbcType="TINYINT" property="processResult" />
    <result column="jd_order_amount_str" jdbcType="VARCHAR" property="jdOrderAmountStr" />
    <result column="jd_repayment_amount_str" jdbcType="VARCHAR" property="jdRepaymentAmountStr" />
    <result column="jd_refund_amount_str" jdbcType="VARCHAR" property="jdRefundAmountStr" />
    <result column="jd_out_standing_amount_str" jdbcType="VARCHAR" property="jdOutStandingAmountStr" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJd">
    <result column="process_report" jdbcType="LONGVARCHAR" property="processReport" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <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">
    <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">
    id, batch_id, jd_order_sn, jd_original_order_sn, payment_no, jd_accoumt_user_name, 
    product_number, biz_type, jd_create_time, jd_pay_time, jd_finish_time, jd_order_amount, 
    jd_repayment_amount, jd_refund_amount, jd_out_standing_amount, jd_order_state, jd_order_state_name, 
    were_accounted_state, were_accounted_state_name, out_account_time, jd_accounting_order_sn, 
    settled_state, settled_state_name, settled_time, purchaser_contract_sn, purchaser_virt_code, 
    purchaser_virt_name, invoiced_state, invoiced_state_name, after_sale_state, after_sale_state_name, 
    repayment_order_sn, invoiced_date, repayment_time, overdue_days, jd_order_type, jd_order_type_name, 
    jd_pay_type, jd_pay_type_name, invoice_number, invoice_category_code, total_amount_including_tax, 
    purchaser_company_name, invoice_type_id, invoice_type, create_time, create_user_id, 
    create_user_name, update_time, update_user_id, update_user_name, process_result, 
    jd_order_amount_str, jd_repayment_amount_str, jd_refund_amount_str, jd_out_standing_amount_str
  </sql>
  <sql id="Blob_Column_List">
    process_report
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJdExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from accounting_unified_supplier_order_jd
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJdExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from accounting_unified_supplier_order_jd
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from accounting_unified_supplier_order_jd
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from accounting_unified_supplier_order_jd
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJdExample">
    delete from accounting_unified_supplier_order_jd
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJd">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into accounting_unified_supplier_order_jd (batch_id, jd_order_sn, jd_original_order_sn, 
      payment_no, jd_accoumt_user_name, product_number, 
      biz_type, jd_create_time, jd_pay_time, 
      jd_finish_time, jd_order_amount, jd_repayment_amount, 
      jd_refund_amount, jd_out_standing_amount, jd_order_state, 
      jd_order_state_name, were_accounted_state, were_accounted_state_name, 
      out_account_time, jd_accounting_order_sn, 
      settled_state, settled_state_name, settled_time, 
      purchaser_contract_sn, purchaser_virt_code, 
      purchaser_virt_name, invoiced_state, invoiced_state_name, 
      after_sale_state, after_sale_state_name, repayment_order_sn, 
      invoiced_date, repayment_time, overdue_days, 
      jd_order_type, jd_order_type_name, jd_pay_type, 
      jd_pay_type_name, invoice_number, invoice_category_code, 
      total_amount_including_tax, purchaser_company_name, 
      invoice_type_id, invoice_type, create_time, 
      create_user_id, create_user_name, update_time, 
      update_user_id, update_user_name, process_result, 
      jd_order_amount_str, jd_repayment_amount_str, 
      jd_refund_amount_str, jd_out_standing_amount_str, 
      process_report)
    values (#{batchId,jdbcType=VARCHAR}, #{jdOrderSn,jdbcType=VARCHAR}, #{jdOriginalOrderSn,jdbcType=VARCHAR}, 
      #{paymentNo,jdbcType=VARCHAR}, #{jdAccoumtUserName,jdbcType=VARCHAR}, #{productNumber,jdbcType=VARCHAR}, 
      #{bizType,jdbcType=VARCHAR}, #{jdCreateTime,jdbcType=TIMESTAMP}, #{jdPayTime,jdbcType=TIMESTAMP}, 
      #{jdFinishTime,jdbcType=TIMESTAMP}, #{jdOrderAmount,jdbcType=DECIMAL}, #{jdRepaymentAmount,jdbcType=DECIMAL}, 
      #{jdRefundAmount,jdbcType=DECIMAL}, #{jdOutStandingAmount,jdbcType=DECIMAL}, #{jdOrderState,jdbcType=TINYINT}, 
      #{jdOrderStateName,jdbcType=VARCHAR}, #{wereAccountedState,jdbcType=TINYINT}, #{wereAccountedStateName,jdbcType=VARCHAR}, 
      #{outAccountTime,jdbcType=TIMESTAMP}, #{jdAccountingOrderSn,jdbcType=VARCHAR}, 
      #{settledState,jdbcType=TINYINT}, #{settledStateName,jdbcType=VARCHAR}, #{settledTime,jdbcType=TIMESTAMP}, 
      #{purchaserContractSn,jdbcType=VARCHAR}, #{purchaserVirtCode,jdbcType=VARCHAR}, 
      #{purchaserVirtName,jdbcType=VARCHAR}, #{invoicedState,jdbcType=TINYINT}, #{invoicedStateName,jdbcType=VARCHAR}, 
      #{afterSaleState,jdbcType=TINYINT}, #{afterSaleStateName,jdbcType=VARCHAR}, #{repaymentOrderSn,jdbcType=VARCHAR}, 
      #{invoicedDate,jdbcType=TIMESTAMP}, #{repaymentTime,jdbcType=TIMESTAMP}, #{overdueDays,jdbcType=INTEGER}, 
      #{jdOrderType,jdbcType=TINYINT}, #{jdOrderTypeName,jdbcType=VARCHAR}, #{jdPayType,jdbcType=TINYINT}, 
      #{jdPayTypeName,jdbcType=VARCHAR}, #{invoiceNumber,jdbcType=VARCHAR}, #{invoiceCategoryCode,jdbcType=VARCHAR}, 
      #{totalAmountIncludingTax,jdbcType=DECIMAL}, #{purchaserCompanyName,jdbcType=VARCHAR}, 
      #{invoiceTypeId,jdbcType=TINYINT}, #{invoiceType,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{createUserId,jdbcType=BIGINT}, #{createUserName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{updateUserId,jdbcType=BIGINT}, #{updateUserName,jdbcType=VARCHAR}, #{processResult,jdbcType=TINYINT}, 
      #{jdOrderAmountStr,jdbcType=VARCHAR}, #{jdRepaymentAmountStr,jdbcType=VARCHAR}, 
      #{jdRefundAmountStr,jdbcType=VARCHAR}, #{jdOutStandingAmountStr,jdbcType=VARCHAR}, 
      #{processReport,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJd">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into accounting_unified_supplier_order_jd
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="batchId != null">
        batch_id,
      </if>
      <if test="jdOrderSn != null">
        jd_order_sn,
      </if>
      <if test="jdOriginalOrderSn != null">
        jd_original_order_sn,
      </if>
      <if test="paymentNo != null">
        payment_no,
      </if>
      <if test="jdAccoumtUserName != null">
        jd_accoumt_user_name,
      </if>
      <if test="productNumber != null">
        product_number,
      </if>
      <if test="bizType != null">
        biz_type,
      </if>
      <if test="jdCreateTime != null">
        jd_create_time,
      </if>
      <if test="jdPayTime != null">
        jd_pay_time,
      </if>
      <if test="jdFinishTime != null">
        jd_finish_time,
      </if>
      <if test="jdOrderAmount != null">
        jd_order_amount,
      </if>
      <if test="jdRepaymentAmount != null">
        jd_repayment_amount,
      </if>
      <if test="jdRefundAmount != null">
        jd_refund_amount,
      </if>
      <if test="jdOutStandingAmount != null">
        jd_out_standing_amount,
      </if>
      <if test="jdOrderState != null">
        jd_order_state,
      </if>
      <if test="jdOrderStateName != null">
        jd_order_state_name,
      </if>
      <if test="wereAccountedState != null">
        were_accounted_state,
      </if>
      <if test="wereAccountedStateName != null">
        were_accounted_state_name,
      </if>
      <if test="outAccountTime != null">
        out_account_time,
      </if>
      <if test="jdAccountingOrderSn != null">
        jd_accounting_order_sn,
      </if>
      <if test="settledState != null">
        settled_state,
      </if>
      <if test="settledStateName != null">
        settled_state_name,
      </if>
      <if test="settledTime != null">
        settled_time,
      </if>
      <if test="purchaserContractSn != null">
        purchaser_contract_sn,
      </if>
      <if test="purchaserVirtCode != null">
        purchaser_virt_code,
      </if>
      <if test="purchaserVirtName != null">
        purchaser_virt_name,
      </if>
      <if test="invoicedState != null">
        invoiced_state,
      </if>
      <if test="invoicedStateName != null">
        invoiced_state_name,
      </if>
      <if test="afterSaleState != null">
        after_sale_state,
      </if>
      <if test="afterSaleStateName != null">
        after_sale_state_name,
      </if>
      <if test="repaymentOrderSn != null">
        repayment_order_sn,
      </if>
      <if test="invoicedDate != null">
        invoiced_date,
      </if>
      <if test="repaymentTime != null">
        repayment_time,
      </if>
      <if test="overdueDays != null">
        overdue_days,
      </if>
      <if test="jdOrderType != null">
        jd_order_type,
      </if>
      <if test="jdOrderTypeName != null">
        jd_order_type_name,
      </if>
      <if test="jdPayType != null">
        jd_pay_type,
      </if>
      <if test="jdPayTypeName != null">
        jd_pay_type_name,
      </if>
      <if test="invoiceNumber != null">
        invoice_number,
      </if>
      <if test="invoiceCategoryCode != null">
        invoice_category_code,
      </if>
      <if test="totalAmountIncludingTax != null">
        total_amount_including_tax,
      </if>
      <if test="purchaserCompanyName != null">
        purchaser_company_name,
      </if>
      <if test="invoiceTypeId != null">
        invoice_type_id,
      </if>
      <if test="invoiceType != null">
        invoice_type,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createUserId != null">
        create_user_id,
      </if>
      <if test="createUserName != null">
        create_user_name,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="updateUserId != null">
        update_user_id,
      </if>
      <if test="updateUserName != null">
        update_user_name,
      </if>
      <if test="processResult != null">
        process_result,
      </if>
      <if test="jdOrderAmountStr != null">
        jd_order_amount_str,
      </if>
      <if test="jdRepaymentAmountStr != null">
        jd_repayment_amount_str,
      </if>
      <if test="jdRefundAmountStr != null">
        jd_refund_amount_str,
      </if>
      <if test="jdOutStandingAmountStr != null">
        jd_out_standing_amount_str,
      </if>
      <if test="processReport != null">
        process_report,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="batchId != null">
        #{batchId,jdbcType=VARCHAR},
      </if>
      <if test="jdOrderSn != null">
        #{jdOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="jdOriginalOrderSn != null">
        #{jdOriginalOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="paymentNo != null">
        #{paymentNo,jdbcType=VARCHAR},
      </if>
      <if test="jdAccoumtUserName != null">
        #{jdAccoumtUserName,jdbcType=VARCHAR},
      </if>
      <if test="productNumber != null">
        #{productNumber,jdbcType=VARCHAR},
      </if>
      <if test="bizType != null">
        #{bizType,jdbcType=VARCHAR},
      </if>
      <if test="jdCreateTime != null">
        #{jdCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="jdPayTime != null">
        #{jdPayTime,jdbcType=TIMESTAMP},
      </if>
      <if test="jdFinishTime != null">
        #{jdFinishTime,jdbcType=TIMESTAMP},
      </if>
      <if test="jdOrderAmount != null">
        #{jdOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="jdRepaymentAmount != null">
        #{jdRepaymentAmount,jdbcType=DECIMAL},
      </if>
      <if test="jdRefundAmount != null">
        #{jdRefundAmount,jdbcType=DECIMAL},
      </if>
      <if test="jdOutStandingAmount != null">
        #{jdOutStandingAmount,jdbcType=DECIMAL},
      </if>
      <if test="jdOrderState != null">
        #{jdOrderState,jdbcType=TINYINT},
      </if>
      <if test="jdOrderStateName != null">
        #{jdOrderStateName,jdbcType=VARCHAR},
      </if>
      <if test="wereAccountedState != null">
        #{wereAccountedState,jdbcType=TINYINT},
      </if>
      <if test="wereAccountedStateName != null">
        #{wereAccountedStateName,jdbcType=VARCHAR},
      </if>
      <if test="outAccountTime != null">
        #{outAccountTime,jdbcType=TIMESTAMP},
      </if>
      <if test="jdAccountingOrderSn != null">
        #{jdAccountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="settledState != null">
        #{settledState,jdbcType=TINYINT},
      </if>
      <if test="settledStateName != null">
        #{settledStateName,jdbcType=VARCHAR},
      </if>
      <if test="settledTime != null">
        #{settledTime,jdbcType=TIMESTAMP},
      </if>
      <if test="purchaserContractSn != null">
        #{purchaserContractSn,jdbcType=VARCHAR},
      </if>
      <if test="purchaserVirtCode != null">
        #{purchaserVirtCode,jdbcType=VARCHAR},
      </if>
      <if test="purchaserVirtName != null">
        #{purchaserVirtName,jdbcType=VARCHAR},
      </if>
      <if test="invoicedState != null">
        #{invoicedState,jdbcType=TINYINT},
      </if>
      <if test="invoicedStateName != null">
        #{invoicedStateName,jdbcType=VARCHAR},
      </if>
      <if test="afterSaleState != null">
        #{afterSaleState,jdbcType=TINYINT},
      </if>
      <if test="afterSaleStateName != null">
        #{afterSaleStateName,jdbcType=VARCHAR},
      </if>
      <if test="repaymentOrderSn != null">
        #{repaymentOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="invoicedDate != null">
        #{invoicedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="repaymentTime != null">
        #{repaymentTime,jdbcType=TIMESTAMP},
      </if>
      <if test="overdueDays != null">
        #{overdueDays,jdbcType=INTEGER},
      </if>
      <if test="jdOrderType != null">
        #{jdOrderType,jdbcType=TINYINT},
      </if>
      <if test="jdOrderTypeName != null">
        #{jdOrderTypeName,jdbcType=VARCHAR},
      </if>
      <if test="jdPayType != null">
        #{jdPayType,jdbcType=TINYINT},
      </if>
      <if test="jdPayTypeName != null">
        #{jdPayTypeName,jdbcType=VARCHAR},
      </if>
      <if test="invoiceNumber != null">
        #{invoiceNumber,jdbcType=VARCHAR},
      </if>
      <if test="invoiceCategoryCode != null">
        #{invoiceCategoryCode,jdbcType=VARCHAR},
      </if>
      <if test="totalAmountIncludingTax != null">
        #{totalAmountIncludingTax,jdbcType=DECIMAL},
      </if>
      <if test="purchaserCompanyName != null">
        #{purchaserCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="invoiceTypeId != null">
        #{invoiceTypeId,jdbcType=TINYINT},
      </if>
      <if test="invoiceType != null">
        #{invoiceType,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="createUserName != null">
        #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        #{updateUserId,jdbcType=BIGINT},
      </if>
      <if test="updateUserName != null">
        #{updateUserName,jdbcType=VARCHAR},
      </if>
      <if test="processResult != null">
        #{processResult,jdbcType=TINYINT},
      </if>
      <if test="jdOrderAmountStr != null">
        #{jdOrderAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="jdRepaymentAmountStr != null">
        #{jdRepaymentAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="jdRefundAmountStr != null">
        #{jdRefundAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="jdOutStandingAmountStr != null">
        #{jdOutStandingAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="processReport != null">
        #{processReport,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJdExample" resultType="java.lang.Long">
    select count(*) from accounting_unified_supplier_order_jd
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update accounting_unified_supplier_order_jd
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.batchId != null">
        batch_id = #{record.batchId,jdbcType=VARCHAR},
      </if>
      <if test="record.jdOrderSn != null">
        jd_order_sn = #{record.jdOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.jdOriginalOrderSn != null">
        jd_original_order_sn = #{record.jdOriginalOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.paymentNo != null">
        payment_no = #{record.paymentNo,jdbcType=VARCHAR},
      </if>
      <if test="record.jdAccoumtUserName != null">
        jd_accoumt_user_name = #{record.jdAccoumtUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.productNumber != null">
        product_number = #{record.productNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.bizType != null">
        biz_type = #{record.bizType,jdbcType=VARCHAR},
      </if>
      <if test="record.jdCreateTime != null">
        jd_create_time = #{record.jdCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.jdPayTime != null">
        jd_pay_time = #{record.jdPayTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.jdFinishTime != null">
        jd_finish_time = #{record.jdFinishTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.jdOrderAmount != null">
        jd_order_amount = #{record.jdOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.jdRepaymentAmount != null">
        jd_repayment_amount = #{record.jdRepaymentAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.jdRefundAmount != null">
        jd_refund_amount = #{record.jdRefundAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.jdOutStandingAmount != null">
        jd_out_standing_amount = #{record.jdOutStandingAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.jdOrderState != null">
        jd_order_state = #{record.jdOrderState,jdbcType=TINYINT},
      </if>
      <if test="record.jdOrderStateName != null">
        jd_order_state_name = #{record.jdOrderStateName,jdbcType=VARCHAR},
      </if>
      <if test="record.wereAccountedState != null">
        were_accounted_state = #{record.wereAccountedState,jdbcType=TINYINT},
      </if>
      <if test="record.wereAccountedStateName != null">
        were_accounted_state_name = #{record.wereAccountedStateName,jdbcType=VARCHAR},
      </if>
      <if test="record.outAccountTime != null">
        out_account_time = #{record.outAccountTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.jdAccountingOrderSn != null">
        jd_accounting_order_sn = #{record.jdAccountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.settledState != null">
        settled_state = #{record.settledState,jdbcType=TINYINT},
      </if>
      <if test="record.settledStateName != null">
        settled_state_name = #{record.settledStateName,jdbcType=VARCHAR},
      </if>
      <if test="record.settledTime != null">
        settled_time = #{record.settledTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.purchaserContractSn != null">
        purchaser_contract_sn = #{record.purchaserContractSn,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaserVirtCode != null">
        purchaser_virt_code = #{record.purchaserVirtCode,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaserVirtName != null">
        purchaser_virt_name = #{record.purchaserVirtName,jdbcType=VARCHAR},
      </if>
      <if test="record.invoicedState != null">
        invoiced_state = #{record.invoicedState,jdbcType=TINYINT},
      </if>
      <if test="record.invoicedStateName != null">
        invoiced_state_name = #{record.invoicedStateName,jdbcType=VARCHAR},
      </if>
      <if test="record.afterSaleState != null">
        after_sale_state = #{record.afterSaleState,jdbcType=TINYINT},
      </if>
      <if test="record.afterSaleStateName != null">
        after_sale_state_name = #{record.afterSaleStateName,jdbcType=VARCHAR},
      </if>
      <if test="record.repaymentOrderSn != null">
        repayment_order_sn = #{record.repaymentOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.invoicedDate != null">
        invoiced_date = #{record.invoicedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.repaymentTime != null">
        repayment_time = #{record.repaymentTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.overdueDays != null">
        overdue_days = #{record.overdueDays,jdbcType=INTEGER},
      </if>
      <if test="record.jdOrderType != null">
        jd_order_type = #{record.jdOrderType,jdbcType=TINYINT},
      </if>
      <if test="record.jdOrderTypeName != null">
        jd_order_type_name = #{record.jdOrderTypeName,jdbcType=VARCHAR},
      </if>
      <if test="record.jdPayType != null">
        jd_pay_type = #{record.jdPayType,jdbcType=TINYINT},
      </if>
      <if test="record.jdPayTypeName != null">
        jd_pay_type_name = #{record.jdPayTypeName,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceNumber != null">
        invoice_number = #{record.invoiceNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceCategoryCode != null">
        invoice_category_code = #{record.invoiceCategoryCode,jdbcType=VARCHAR},
      </if>
      <if test="record.totalAmountIncludingTax != null">
        total_amount_including_tax = #{record.totalAmountIncludingTax,jdbcType=DECIMAL},
      </if>
      <if test="record.purchaserCompanyName != null">
        purchaser_company_name = #{record.purchaserCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceTypeId != null">
        invoice_type_id = #{record.invoiceTypeId,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceType != null">
        invoice_type = #{record.invoiceType,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createUserId != null">
        create_user_id = #{record.createUserId,jdbcType=BIGINT},
      </if>
      <if test="record.createUserName != null">
        create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateUserId != null">
        update_user_id = #{record.updateUserId,jdbcType=BIGINT},
      </if>
      <if test="record.updateUserName != null">
        update_user_name = #{record.updateUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.processResult != null">
        process_result = #{record.processResult,jdbcType=TINYINT},
      </if>
      <if test="record.jdOrderAmountStr != null">
        jd_order_amount_str = #{record.jdOrderAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="record.jdRepaymentAmountStr != null">
        jd_repayment_amount_str = #{record.jdRepaymentAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="record.jdRefundAmountStr != null">
        jd_refund_amount_str = #{record.jdRefundAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="record.jdOutStandingAmountStr != null">
        jd_out_standing_amount_str = #{record.jdOutStandingAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="record.processReport != null">
        process_report = #{record.processReport,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update accounting_unified_supplier_order_jd
    set id = #{record.id,jdbcType=BIGINT},
      batch_id = #{record.batchId,jdbcType=VARCHAR},
      jd_order_sn = #{record.jdOrderSn,jdbcType=VARCHAR},
      jd_original_order_sn = #{record.jdOriginalOrderSn,jdbcType=VARCHAR},
      payment_no = #{record.paymentNo,jdbcType=VARCHAR},
      jd_accoumt_user_name = #{record.jdAccoumtUserName,jdbcType=VARCHAR},
      product_number = #{record.productNumber,jdbcType=VARCHAR},
      biz_type = #{record.bizType,jdbcType=VARCHAR},
      jd_create_time = #{record.jdCreateTime,jdbcType=TIMESTAMP},
      jd_pay_time = #{record.jdPayTime,jdbcType=TIMESTAMP},
      jd_finish_time = #{record.jdFinishTime,jdbcType=TIMESTAMP},
      jd_order_amount = #{record.jdOrderAmount,jdbcType=DECIMAL},
      jd_repayment_amount = #{record.jdRepaymentAmount,jdbcType=DECIMAL},
      jd_refund_amount = #{record.jdRefundAmount,jdbcType=DECIMAL},
      jd_out_standing_amount = #{record.jdOutStandingAmount,jdbcType=DECIMAL},
      jd_order_state = #{record.jdOrderState,jdbcType=TINYINT},
      jd_order_state_name = #{record.jdOrderStateName,jdbcType=VARCHAR},
      were_accounted_state = #{record.wereAccountedState,jdbcType=TINYINT},
      were_accounted_state_name = #{record.wereAccountedStateName,jdbcType=VARCHAR},
      out_account_time = #{record.outAccountTime,jdbcType=TIMESTAMP},
      jd_accounting_order_sn = #{record.jdAccountingOrderSn,jdbcType=VARCHAR},
      settled_state = #{record.settledState,jdbcType=TINYINT},
      settled_state_name = #{record.settledStateName,jdbcType=VARCHAR},
      settled_time = #{record.settledTime,jdbcType=TIMESTAMP},
      purchaser_contract_sn = #{record.purchaserContractSn,jdbcType=VARCHAR},
      purchaser_virt_code = #{record.purchaserVirtCode,jdbcType=VARCHAR},
      purchaser_virt_name = #{record.purchaserVirtName,jdbcType=VARCHAR},
      invoiced_state = #{record.invoicedState,jdbcType=TINYINT},
      invoiced_state_name = #{record.invoicedStateName,jdbcType=VARCHAR},
      after_sale_state = #{record.afterSaleState,jdbcType=TINYINT},
      after_sale_state_name = #{record.afterSaleStateName,jdbcType=VARCHAR},
      repayment_order_sn = #{record.repaymentOrderSn,jdbcType=VARCHAR},
      invoiced_date = #{record.invoicedDate,jdbcType=TIMESTAMP},
      repayment_time = #{record.repaymentTime,jdbcType=TIMESTAMP},
      overdue_days = #{record.overdueDays,jdbcType=INTEGER},
      jd_order_type = #{record.jdOrderType,jdbcType=TINYINT},
      jd_order_type_name = #{record.jdOrderTypeName,jdbcType=VARCHAR},
      jd_pay_type = #{record.jdPayType,jdbcType=TINYINT},
      jd_pay_type_name = #{record.jdPayTypeName,jdbcType=VARCHAR},
      invoice_number = #{record.invoiceNumber,jdbcType=VARCHAR},
      invoice_category_code = #{record.invoiceCategoryCode,jdbcType=VARCHAR},
      total_amount_including_tax = #{record.totalAmountIncludingTax,jdbcType=DECIMAL},
      purchaser_company_name = #{record.purchaserCompanyName,jdbcType=VARCHAR},
      invoice_type_id = #{record.invoiceTypeId,jdbcType=TINYINT},
      invoice_type = #{record.invoiceType,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_user_id = #{record.createUserId,jdbcType=BIGINT},
      create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{record.updateUserId,jdbcType=BIGINT},
      update_user_name = #{record.updateUserName,jdbcType=VARCHAR},
      process_result = #{record.processResult,jdbcType=TINYINT},
      jd_order_amount_str = #{record.jdOrderAmountStr,jdbcType=VARCHAR},
      jd_repayment_amount_str = #{record.jdRepaymentAmountStr,jdbcType=VARCHAR},
      jd_refund_amount_str = #{record.jdRefundAmountStr,jdbcType=VARCHAR},
      jd_out_standing_amount_str = #{record.jdOutStandingAmountStr,jdbcType=VARCHAR},
      process_report = #{record.processReport,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update accounting_unified_supplier_order_jd
    set id = #{record.id,jdbcType=BIGINT},
      batch_id = #{record.batchId,jdbcType=VARCHAR},
      jd_order_sn = #{record.jdOrderSn,jdbcType=VARCHAR},
      jd_original_order_sn = #{record.jdOriginalOrderSn,jdbcType=VARCHAR},
      payment_no = #{record.paymentNo,jdbcType=VARCHAR},
      jd_accoumt_user_name = #{record.jdAccoumtUserName,jdbcType=VARCHAR},
      product_number = #{record.productNumber,jdbcType=VARCHAR},
      biz_type = #{record.bizType,jdbcType=VARCHAR},
      jd_create_time = #{record.jdCreateTime,jdbcType=TIMESTAMP},
      jd_pay_time = #{record.jdPayTime,jdbcType=TIMESTAMP},
      jd_finish_time = #{record.jdFinishTime,jdbcType=TIMESTAMP},
      jd_order_amount = #{record.jdOrderAmount,jdbcType=DECIMAL},
      jd_repayment_amount = #{record.jdRepaymentAmount,jdbcType=DECIMAL},
      jd_refund_amount = #{record.jdRefundAmount,jdbcType=DECIMAL},
      jd_out_standing_amount = #{record.jdOutStandingAmount,jdbcType=DECIMAL},
      jd_order_state = #{record.jdOrderState,jdbcType=TINYINT},
      jd_order_state_name = #{record.jdOrderStateName,jdbcType=VARCHAR},
      were_accounted_state = #{record.wereAccountedState,jdbcType=TINYINT},
      were_accounted_state_name = #{record.wereAccountedStateName,jdbcType=VARCHAR},
      out_account_time = #{record.outAccountTime,jdbcType=TIMESTAMP},
      jd_accounting_order_sn = #{record.jdAccountingOrderSn,jdbcType=VARCHAR},
      settled_state = #{record.settledState,jdbcType=TINYINT},
      settled_state_name = #{record.settledStateName,jdbcType=VARCHAR},
      settled_time = #{record.settledTime,jdbcType=TIMESTAMP},
      purchaser_contract_sn = #{record.purchaserContractSn,jdbcType=VARCHAR},
      purchaser_virt_code = #{record.purchaserVirtCode,jdbcType=VARCHAR},
      purchaser_virt_name = #{record.purchaserVirtName,jdbcType=VARCHAR},
      invoiced_state = #{record.invoicedState,jdbcType=TINYINT},
      invoiced_state_name = #{record.invoicedStateName,jdbcType=VARCHAR},
      after_sale_state = #{record.afterSaleState,jdbcType=TINYINT},
      after_sale_state_name = #{record.afterSaleStateName,jdbcType=VARCHAR},
      repayment_order_sn = #{record.repaymentOrderSn,jdbcType=VARCHAR},
      invoiced_date = #{record.invoicedDate,jdbcType=TIMESTAMP},
      repayment_time = #{record.repaymentTime,jdbcType=TIMESTAMP},
      overdue_days = #{record.overdueDays,jdbcType=INTEGER},
      jd_order_type = #{record.jdOrderType,jdbcType=TINYINT},
      jd_order_type_name = #{record.jdOrderTypeName,jdbcType=VARCHAR},
      jd_pay_type = #{record.jdPayType,jdbcType=TINYINT},
      jd_pay_type_name = #{record.jdPayTypeName,jdbcType=VARCHAR},
      invoice_number = #{record.invoiceNumber,jdbcType=VARCHAR},
      invoice_category_code = #{record.invoiceCategoryCode,jdbcType=VARCHAR},
      total_amount_including_tax = #{record.totalAmountIncludingTax,jdbcType=DECIMAL},
      purchaser_company_name = #{record.purchaserCompanyName,jdbcType=VARCHAR},
      invoice_type_id = #{record.invoiceTypeId,jdbcType=TINYINT},
      invoice_type = #{record.invoiceType,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_user_id = #{record.createUserId,jdbcType=BIGINT},
      create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{record.updateUserId,jdbcType=BIGINT},
      update_user_name = #{record.updateUserName,jdbcType=VARCHAR},
      process_result = #{record.processResult,jdbcType=TINYINT},
      jd_order_amount_str = #{record.jdOrderAmountStr,jdbcType=VARCHAR},
      jd_repayment_amount_str = #{record.jdRepaymentAmountStr,jdbcType=VARCHAR},
      jd_refund_amount_str = #{record.jdRefundAmountStr,jdbcType=VARCHAR},
      jd_out_standing_amount_str = #{record.jdOutStandingAmountStr,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJd">
    update accounting_unified_supplier_order_jd
    <set>
      <if test="batchId != null">
        batch_id = #{batchId,jdbcType=VARCHAR},
      </if>
      <if test="jdOrderSn != null">
        jd_order_sn = #{jdOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="jdOriginalOrderSn != null">
        jd_original_order_sn = #{jdOriginalOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="paymentNo != null">
        payment_no = #{paymentNo,jdbcType=VARCHAR},
      </if>
      <if test="jdAccoumtUserName != null">
        jd_accoumt_user_name = #{jdAccoumtUserName,jdbcType=VARCHAR},
      </if>
      <if test="productNumber != null">
        product_number = #{productNumber,jdbcType=VARCHAR},
      </if>
      <if test="bizType != null">
        biz_type = #{bizType,jdbcType=VARCHAR},
      </if>
      <if test="jdCreateTime != null">
        jd_create_time = #{jdCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="jdPayTime != null">
        jd_pay_time = #{jdPayTime,jdbcType=TIMESTAMP},
      </if>
      <if test="jdFinishTime != null">
        jd_finish_time = #{jdFinishTime,jdbcType=TIMESTAMP},
      </if>
      <if test="jdOrderAmount != null">
        jd_order_amount = #{jdOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="jdRepaymentAmount != null">
        jd_repayment_amount = #{jdRepaymentAmount,jdbcType=DECIMAL},
      </if>
      <if test="jdRefundAmount != null">
        jd_refund_amount = #{jdRefundAmount,jdbcType=DECIMAL},
      </if>
      <if test="jdOutStandingAmount != null">
        jd_out_standing_amount = #{jdOutStandingAmount,jdbcType=DECIMAL},
      </if>
      <if test="jdOrderState != null">
        jd_order_state = #{jdOrderState,jdbcType=TINYINT},
      </if>
      <if test="jdOrderStateName != null">
        jd_order_state_name = #{jdOrderStateName,jdbcType=VARCHAR},
      </if>
      <if test="wereAccountedState != null">
        were_accounted_state = #{wereAccountedState,jdbcType=TINYINT},
      </if>
      <if test="wereAccountedStateName != null">
        were_accounted_state_name = #{wereAccountedStateName,jdbcType=VARCHAR},
      </if>
      <if test="outAccountTime != null">
        out_account_time = #{outAccountTime,jdbcType=TIMESTAMP},
      </if>
      <if test="jdAccountingOrderSn != null">
        jd_accounting_order_sn = #{jdAccountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="settledState != null">
        settled_state = #{settledState,jdbcType=TINYINT},
      </if>
      <if test="settledStateName != null">
        settled_state_name = #{settledStateName,jdbcType=VARCHAR},
      </if>
      <if test="settledTime != null">
        settled_time = #{settledTime,jdbcType=TIMESTAMP},
      </if>
      <if test="purchaserContractSn != null">
        purchaser_contract_sn = #{purchaserContractSn,jdbcType=VARCHAR},
      </if>
      <if test="purchaserVirtCode != null">
        purchaser_virt_code = #{purchaserVirtCode,jdbcType=VARCHAR},
      </if>
      <if test="purchaserVirtName != null">
        purchaser_virt_name = #{purchaserVirtName,jdbcType=VARCHAR},
      </if>
      <if test="invoicedState != null">
        invoiced_state = #{invoicedState,jdbcType=TINYINT},
      </if>
      <if test="invoicedStateName != null">
        invoiced_state_name = #{invoicedStateName,jdbcType=VARCHAR},
      </if>
      <if test="afterSaleState != null">
        after_sale_state = #{afterSaleState,jdbcType=TINYINT},
      </if>
      <if test="afterSaleStateName != null">
        after_sale_state_name = #{afterSaleStateName,jdbcType=VARCHAR},
      </if>
      <if test="repaymentOrderSn != null">
        repayment_order_sn = #{repaymentOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="invoicedDate != null">
        invoiced_date = #{invoicedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="repaymentTime != null">
        repayment_time = #{repaymentTime,jdbcType=TIMESTAMP},
      </if>
      <if test="overdueDays != null">
        overdue_days = #{overdueDays,jdbcType=INTEGER},
      </if>
      <if test="jdOrderType != null">
        jd_order_type = #{jdOrderType,jdbcType=TINYINT},
      </if>
      <if test="jdOrderTypeName != null">
        jd_order_type_name = #{jdOrderTypeName,jdbcType=VARCHAR},
      </if>
      <if test="jdPayType != null">
        jd_pay_type = #{jdPayType,jdbcType=TINYINT},
      </if>
      <if test="jdPayTypeName != null">
        jd_pay_type_name = #{jdPayTypeName,jdbcType=VARCHAR},
      </if>
      <if test="invoiceNumber != null">
        invoice_number = #{invoiceNumber,jdbcType=VARCHAR},
      </if>
      <if test="invoiceCategoryCode != null">
        invoice_category_code = #{invoiceCategoryCode,jdbcType=VARCHAR},
      </if>
      <if test="totalAmountIncludingTax != null">
        total_amount_including_tax = #{totalAmountIncludingTax,jdbcType=DECIMAL},
      </if>
      <if test="purchaserCompanyName != null">
        purchaser_company_name = #{purchaserCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="invoiceTypeId != null">
        invoice_type_id = #{invoiceTypeId,jdbcType=TINYINT},
      </if>
      <if test="invoiceType != null">
        invoice_type = #{invoiceType,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        create_user_id = #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="createUserName != null">
        create_user_name = #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        update_user_id = #{updateUserId,jdbcType=BIGINT},
      </if>
      <if test="updateUserName != null">
        update_user_name = #{updateUserName,jdbcType=VARCHAR},
      </if>
      <if test="processResult != null">
        process_result = #{processResult,jdbcType=TINYINT},
      </if>
      <if test="jdOrderAmountStr != null">
        jd_order_amount_str = #{jdOrderAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="jdRepaymentAmountStr != null">
        jd_repayment_amount_str = #{jdRepaymentAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="jdRefundAmountStr != null">
        jd_refund_amount_str = #{jdRefundAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="jdOutStandingAmountStr != null">
        jd_out_standing_amount_str = #{jdOutStandingAmountStr,jdbcType=VARCHAR},
      </if>
      <if test="processReport != null">
        process_report = #{processReport,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJd">
    update accounting_unified_supplier_order_jd
    set batch_id = #{batchId,jdbcType=VARCHAR},
      jd_order_sn = #{jdOrderSn,jdbcType=VARCHAR},
      jd_original_order_sn = #{jdOriginalOrderSn,jdbcType=VARCHAR},
      payment_no = #{paymentNo,jdbcType=VARCHAR},
      jd_accoumt_user_name = #{jdAccoumtUserName,jdbcType=VARCHAR},
      product_number = #{productNumber,jdbcType=VARCHAR},
      biz_type = #{bizType,jdbcType=VARCHAR},
      jd_create_time = #{jdCreateTime,jdbcType=TIMESTAMP},
      jd_pay_time = #{jdPayTime,jdbcType=TIMESTAMP},
      jd_finish_time = #{jdFinishTime,jdbcType=TIMESTAMP},
      jd_order_amount = #{jdOrderAmount,jdbcType=DECIMAL},
      jd_repayment_amount = #{jdRepaymentAmount,jdbcType=DECIMAL},
      jd_refund_amount = #{jdRefundAmount,jdbcType=DECIMAL},
      jd_out_standing_amount = #{jdOutStandingAmount,jdbcType=DECIMAL},
      jd_order_state = #{jdOrderState,jdbcType=TINYINT},
      jd_order_state_name = #{jdOrderStateName,jdbcType=VARCHAR},
      were_accounted_state = #{wereAccountedState,jdbcType=TINYINT},
      were_accounted_state_name = #{wereAccountedStateName,jdbcType=VARCHAR},
      out_account_time = #{outAccountTime,jdbcType=TIMESTAMP},
      jd_accounting_order_sn = #{jdAccountingOrderSn,jdbcType=VARCHAR},
      settled_state = #{settledState,jdbcType=TINYINT},
      settled_state_name = #{settledStateName,jdbcType=VARCHAR},
      settled_time = #{settledTime,jdbcType=TIMESTAMP},
      purchaser_contract_sn = #{purchaserContractSn,jdbcType=VARCHAR},
      purchaser_virt_code = #{purchaserVirtCode,jdbcType=VARCHAR},
      purchaser_virt_name = #{purchaserVirtName,jdbcType=VARCHAR},
      invoiced_state = #{invoicedState,jdbcType=TINYINT},
      invoiced_state_name = #{invoicedStateName,jdbcType=VARCHAR},
      after_sale_state = #{afterSaleState,jdbcType=TINYINT},
      after_sale_state_name = #{afterSaleStateName,jdbcType=VARCHAR},
      repayment_order_sn = #{repaymentOrderSn,jdbcType=VARCHAR},
      invoiced_date = #{invoicedDate,jdbcType=TIMESTAMP},
      repayment_time = #{repaymentTime,jdbcType=TIMESTAMP},
      overdue_days = #{overdueDays,jdbcType=INTEGER},
      jd_order_type = #{jdOrderType,jdbcType=TINYINT},
      jd_order_type_name = #{jdOrderTypeName,jdbcType=VARCHAR},
      jd_pay_type = #{jdPayType,jdbcType=TINYINT},
      jd_pay_type_name = #{jdPayTypeName,jdbcType=VARCHAR},
      invoice_number = #{invoiceNumber,jdbcType=VARCHAR},
      invoice_category_code = #{invoiceCategoryCode,jdbcType=VARCHAR},
      total_amount_including_tax = #{totalAmountIncludingTax,jdbcType=DECIMAL},
      purchaser_company_name = #{purchaserCompanyName,jdbcType=VARCHAR},
      invoice_type_id = #{invoiceTypeId,jdbcType=TINYINT},
      invoice_type = #{invoiceType,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      create_user_name = #{createUserName,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      update_user_name = #{updateUserName,jdbcType=VARCHAR},
      process_result = #{processResult,jdbcType=TINYINT},
      jd_order_amount_str = #{jdOrderAmountStr,jdbcType=VARCHAR},
      jd_repayment_amount_str = #{jdRepaymentAmountStr,jdbcType=VARCHAR},
      jd_refund_amount_str = #{jdRefundAmountStr,jdbcType=VARCHAR},
      jd_out_standing_amount_str = #{jdOutStandingAmountStr,jdbcType=VARCHAR},
      process_report = #{processReport,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.jd.AccountingUnifiedSupplierOrderJd">
    update accounting_unified_supplier_order_jd
    set batch_id = #{batchId,jdbcType=VARCHAR},
      jd_order_sn = #{jdOrderSn,jdbcType=VARCHAR},
      jd_original_order_sn = #{jdOriginalOrderSn,jdbcType=VARCHAR},
      payment_no = #{paymentNo,jdbcType=VARCHAR},
      jd_accoumt_user_name = #{jdAccoumtUserName,jdbcType=VARCHAR},
      product_number = #{productNumber,jdbcType=VARCHAR},
      biz_type = #{bizType,jdbcType=VARCHAR},
      jd_create_time = #{jdCreateTime,jdbcType=TIMESTAMP},
      jd_pay_time = #{jdPayTime,jdbcType=TIMESTAMP},
      jd_finish_time = #{jdFinishTime,jdbcType=TIMESTAMP},
      jd_order_amount = #{jdOrderAmount,jdbcType=DECIMAL},
      jd_repayment_amount = #{jdRepaymentAmount,jdbcType=DECIMAL},
      jd_refund_amount = #{jdRefundAmount,jdbcType=DECIMAL},
      jd_out_standing_amount = #{jdOutStandingAmount,jdbcType=DECIMAL},
      jd_order_state = #{jdOrderState,jdbcType=TINYINT},
      jd_order_state_name = #{jdOrderStateName,jdbcType=VARCHAR},
      were_accounted_state = #{wereAccountedState,jdbcType=TINYINT},
      were_accounted_state_name = #{wereAccountedStateName,jdbcType=VARCHAR},
      out_account_time = #{outAccountTime,jdbcType=TIMESTAMP},
      jd_accounting_order_sn = #{jdAccountingOrderSn,jdbcType=VARCHAR},
      settled_state = #{settledState,jdbcType=TINYINT},
      settled_state_name = #{settledStateName,jdbcType=VARCHAR},
      settled_time = #{settledTime,jdbcType=TIMESTAMP},
      purchaser_contract_sn = #{purchaserContractSn,jdbcType=VARCHAR},
      purchaser_virt_code = #{purchaserVirtCode,jdbcType=VARCHAR},
      purchaser_virt_name = #{purchaserVirtName,jdbcType=VARCHAR},
      invoiced_state = #{invoicedState,jdbcType=TINYINT},
      invoiced_state_name = #{invoicedStateName,jdbcType=VARCHAR},
      after_sale_state = #{afterSaleState,jdbcType=TINYINT},
      after_sale_state_name = #{afterSaleStateName,jdbcType=VARCHAR},
      repayment_order_sn = #{repaymentOrderSn,jdbcType=VARCHAR},
      invoiced_date = #{invoicedDate,jdbcType=TIMESTAMP},
      repayment_time = #{repaymentTime,jdbcType=TIMESTAMP},
      overdue_days = #{overdueDays,jdbcType=INTEGER},
      jd_order_type = #{jdOrderType,jdbcType=TINYINT},
      jd_order_type_name = #{jdOrderTypeName,jdbcType=VARCHAR},
      jd_pay_type = #{jdPayType,jdbcType=TINYINT},
      jd_pay_type_name = #{jdPayTypeName,jdbcType=VARCHAR},
      invoice_number = #{invoiceNumber,jdbcType=VARCHAR},
      invoice_category_code = #{invoiceCategoryCode,jdbcType=VARCHAR},
      total_amount_including_tax = #{totalAmountIncludingTax,jdbcType=DECIMAL},
      purchaser_company_name = #{purchaserCompanyName,jdbcType=VARCHAR},
      invoice_type_id = #{invoiceTypeId,jdbcType=TINYINT},
      invoice_type = #{invoiceType,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      create_user_name = #{createUserName,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      update_user_name = #{updateUserName,jdbcType=VARCHAR},
      process_result = #{processResult,jdbcType=TINYINT},
      jd_order_amount_str = #{jdOrderAmountStr,jdbcType=VARCHAR},
      jd_repayment_amount_str = #{jdRepaymentAmountStr,jdbcType=VARCHAR},
      jd_refund_amount_str = #{jdRefundAmountStr,jdbcType=VARCHAR},
      jd_out_standing_amount_str = #{jdOutStandingAmountStr,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>