<?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.invoice.supplier.InvoiceApplySupplierMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplier">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="accounting_order_type" jdbcType="TINYINT" property="accountingOrderType" />
    <result column="accounting_order_id" jdbcType="BIGINT" property="accountingOrderId" />
    <result column="accounting_order_sn" jdbcType="VARCHAR" property="accountingOrderSn" />
    <result column="dim_create_by" jdbcType="TINYINT" property="dimCreateBy" />
    <result column="invoice_apply_sn" jdbcType="VARCHAR" property="invoiceApplySn" />
    <result column="invoice_apply_amount" jdbcType="DECIMAL" property="invoiceApplyAmount" />
    <result column="invoice_type" jdbcType="TINYINT" property="invoiceType" />
    <result column="invoice_title" jdbcType="VARCHAR" property="invoiceTitle" />
    <result column="sys_platform_ext_invoice_id" jdbcType="BIGINT" property="sysPlatformExtInvoiceId" />
    <result column="sys_supplier_ext_invoice_id" jdbcType="BIGINT" property="sysSupplierExtInvoiceId" />
    <result column="tax_rate" jdbcType="VARCHAR" property="taxRate" />
    <result column="invoice_number" jdbcType="VARCHAR" property="invoiceNumber" />
    <result column="sale_id" jdbcType="BIGINT" property="saleId" />
    <result column="sale_name" jdbcType="VARCHAR" property="saleName" />
    <result column="sale_is_export" jdbcType="INTEGER" property="saleIsExport" />
    <result column="apply_user_id" jdbcType="BIGINT" property="applyUserId" />
    <result column="apply_user_name" jdbcType="VARCHAR" property="applyUserName" />
    <result column="apply_time" jdbcType="TIMESTAMP" property="applyTime" />
    <result column="audit_user_id" jdbcType="BIGINT" property="auditUserId" />
    <result column="audit_user_name" jdbcType="VARCHAR" property="auditUserName" />
    <result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
    <result column="audit_status" jdbcType="TINYINT" property="auditStatus" />
    <result column="invoice_status" jdbcType="TINYINT" property="invoiceStatus" />
    <result column="invoice_progressing_user_id" jdbcType="BIGINT" property="invoiceProgressingUserId" />
    <result column="invoice_progressing_time" jdbcType="TIMESTAMP" property="invoiceProgressingTime" />
    <result column="make_invoice_user_id" jdbcType="BIGINT" property="makeInvoiceUserId" />
    <result column="make_invoice_user_name" jdbcType="VARCHAR" property="makeInvoiceUserName" />
    <result column="make_invoice_status" jdbcType="TINYINT" property="makeInvoiceStatus" />
    <result column="make_invoice_time" jdbcType="TIMESTAMP" property="makeInvoiceTime" />
    <result column="receive_invoice_status" jdbcType="TINYINT" property="receiveInvoiceStatus" />
    <result column="receive_invoice_user_id" jdbcType="BIGINT" property="receiveInvoiceUserId" />
    <result column="receive_invoice_time" jdbcType="TIMESTAMP" property="receiveInvoiceTime" />
    <result column="express_company_id" jdbcType="BIGINT" property="expressCompanyId" />
    <result column="express_no" jdbcType="VARCHAR" property="expressNo" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="attachment_upload_files_uids" jdbcType="VARCHAR" property="attachmentUploadFilesUids" />
    <result column="mail_tick_time" jdbcType="TIMESTAMP" property="mailTickTime" />
    <result column="mail_tick_user_id" jdbcType="BIGINT" property="mailTickUserId" />
    <result column="mail_tick_status" jdbcType="TINYINT" property="mailTickStatus" />
    <result column="payoff_account_status" jdbcType="TINYINT" property="payoffAccountStatus" />
    <result column="payoff_account_mode_record" jdbcType="TINYINT" property="payoffAccountModeRecord" />
    <result column="payoff_account_user_id" jdbcType="BIGINT" property="payoffAccountUserId" />
    <result column="payoff_account_time" jdbcType="TIMESTAMP" property="payoffAccountTime" />
    <result column="accounting_order_quantity" jdbcType="INTEGER" property="accountingOrderQuantity" />
    <result column="order_quantity" jdbcType="INTEGER" property="orderQuantity" />
    <result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
    <result column="goods_quantity" jdbcType="INTEGER" property="goodsQuantity" />
    <result column="goods_item_quantity" jdbcType="INTEGER" property="goodsItemQuantity" />
    <result column="goods_amount" jdbcType="DECIMAL" property="goodsAmount" />
    <result column="goods_cost_amount" jdbcType="DECIMAL" property="goodsCostAmount" />
    <result column="service_no" jdbcType="VARCHAR" property="serviceNo" />
    <result column="source_from" jdbcType="VARCHAR" property="sourceFrom" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplier">
    <result column="sys_platform_ext_invoice_snapshot" jdbcType="LONGVARCHAR" property="sysPlatformExtInvoiceSnapshot" />
    <result column="sys_supplier_ext_invoice_snapshot" jdbcType="LONGVARCHAR" property="sysSupplierExtInvoiceSnapshot" />
  </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, accounting_order_type, accounting_order_id, accounting_order_sn, dim_create_by, 
    invoice_apply_sn, invoice_apply_amount, invoice_type, invoice_title, sys_platform_ext_invoice_id, 
    sys_supplier_ext_invoice_id, tax_rate, invoice_number, sale_id, sale_name, sale_is_export, 
    apply_user_id, apply_user_name, apply_time, audit_user_id, audit_user_name, audit_time, 
    audit_status, invoice_status, invoice_progressing_user_id, invoice_progressing_time, 
    make_invoice_user_id, make_invoice_user_name, make_invoice_status, make_invoice_time, 
    receive_invoice_status, receive_invoice_user_id, receive_invoice_time, express_company_id, 
    express_no, remark, attachment_upload_files_uids, mail_tick_time, mail_tick_user_id, 
    mail_tick_status, payoff_account_status, payoff_account_mode_record, payoff_account_user_id, 
    payoff_account_time, accounting_order_quantity, order_quantity, order_amount, goods_quantity, 
    goods_item_quantity, goods_amount, goods_cost_amount, service_no, source_from
  </sql>
  <sql id="Blob_Column_List">
    sys_platform_ext_invoice_snapshot, sys_supplier_ext_invoice_snapshot
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplierExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from invoice_apply_supplier
    <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.invoice.supplier.InvoiceApplySupplierExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from invoice_apply_supplier
    <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 invoice_apply_supplier
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from invoice_apply_supplier
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplierExample">
    delete from invoice_apply_supplier
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplier">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into invoice_apply_supplier (accounting_order_type, accounting_order_id, 
      accounting_order_sn, dim_create_by, invoice_apply_sn, 
      invoice_apply_amount, invoice_type, invoice_title, 
      sys_platform_ext_invoice_id, sys_supplier_ext_invoice_id, 
      tax_rate, invoice_number, sale_id, 
      sale_name, sale_is_export, apply_user_id, 
      apply_user_name, apply_time, audit_user_id, 
      audit_user_name, audit_time, audit_status, 
      invoice_status, invoice_progressing_user_id, 
      invoice_progressing_time, make_invoice_user_id, 
      make_invoice_user_name, make_invoice_status, 
      make_invoice_time, receive_invoice_status, 
      receive_invoice_user_id, receive_invoice_time, 
      express_company_id, express_no, remark, 
      attachment_upload_files_uids, mail_tick_time, 
      mail_tick_user_id, mail_tick_status, payoff_account_status, 
      payoff_account_mode_record, payoff_account_user_id, 
      payoff_account_time, accounting_order_quantity, 
      order_quantity, order_amount, goods_quantity, 
      goods_item_quantity, goods_amount, goods_cost_amount, 
      service_no, source_from, sys_platform_ext_invoice_snapshot, 
      sys_supplier_ext_invoice_snapshot)
    values (#{accountingOrderType,jdbcType=TINYINT}, #{accountingOrderId,jdbcType=BIGINT}, 
      #{accountingOrderSn,jdbcType=VARCHAR}, #{dimCreateBy,jdbcType=TINYINT}, #{invoiceApplySn,jdbcType=VARCHAR}, 
      #{invoiceApplyAmount,jdbcType=DECIMAL}, #{invoiceType,jdbcType=TINYINT}, #{invoiceTitle,jdbcType=VARCHAR}, 
      #{sysPlatformExtInvoiceId,jdbcType=BIGINT}, #{sysSupplierExtInvoiceId,jdbcType=BIGINT}, 
      #{taxRate,jdbcType=VARCHAR}, #{invoiceNumber,jdbcType=VARCHAR}, #{saleId,jdbcType=BIGINT}, 
      #{saleName,jdbcType=VARCHAR}, #{saleIsExport,jdbcType=INTEGER}, #{applyUserId,jdbcType=BIGINT}, 
      #{applyUserName,jdbcType=VARCHAR}, #{applyTime,jdbcType=TIMESTAMP}, #{auditUserId,jdbcType=BIGINT}, 
      #{auditUserName,jdbcType=VARCHAR}, #{auditTime,jdbcType=TIMESTAMP}, #{auditStatus,jdbcType=TINYINT}, 
      #{invoiceStatus,jdbcType=TINYINT}, #{invoiceProgressingUserId,jdbcType=BIGINT}, 
      #{invoiceProgressingTime,jdbcType=TIMESTAMP}, #{makeInvoiceUserId,jdbcType=BIGINT}, 
      #{makeInvoiceUserName,jdbcType=VARCHAR}, #{makeInvoiceStatus,jdbcType=TINYINT}, 
      #{makeInvoiceTime,jdbcType=TIMESTAMP}, #{receiveInvoiceStatus,jdbcType=TINYINT}, 
      #{receiveInvoiceUserId,jdbcType=BIGINT}, #{receiveInvoiceTime,jdbcType=TIMESTAMP}, 
      #{expressCompanyId,jdbcType=BIGINT}, #{expressNo,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, 
      #{attachmentUploadFilesUids,jdbcType=VARCHAR}, #{mailTickTime,jdbcType=TIMESTAMP}, 
      #{mailTickUserId,jdbcType=BIGINT}, #{mailTickStatus,jdbcType=TINYINT}, #{payoffAccountStatus,jdbcType=TINYINT}, 
      #{payoffAccountModeRecord,jdbcType=TINYINT}, #{payoffAccountUserId,jdbcType=BIGINT}, 
      #{payoffAccountTime,jdbcType=TIMESTAMP}, #{accountingOrderQuantity,jdbcType=INTEGER}, 
      #{orderQuantity,jdbcType=INTEGER}, #{orderAmount,jdbcType=DECIMAL}, #{goodsQuantity,jdbcType=INTEGER}, 
      #{goodsItemQuantity,jdbcType=INTEGER}, #{goodsAmount,jdbcType=DECIMAL}, #{goodsCostAmount,jdbcType=DECIMAL}, 
      #{serviceNo,jdbcType=VARCHAR}, #{sourceFrom,jdbcType=VARCHAR}, #{sysPlatformExtInvoiceSnapshot,jdbcType=LONGVARCHAR}, 
      #{sysSupplierExtInvoiceSnapshot,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplier">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into invoice_apply_supplier
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="accountingOrderType != null">
        accounting_order_type,
      </if>
      <if test="accountingOrderId != null">
        accounting_order_id,
      </if>
      <if test="accountingOrderSn != null">
        accounting_order_sn,
      </if>
      <if test="dimCreateBy != null">
        dim_create_by,
      </if>
      <if test="invoiceApplySn != null">
        invoice_apply_sn,
      </if>
      <if test="invoiceApplyAmount != null">
        invoice_apply_amount,
      </if>
      <if test="invoiceType != null">
        invoice_type,
      </if>
      <if test="invoiceTitle != null">
        invoice_title,
      </if>
      <if test="sysPlatformExtInvoiceId != null">
        sys_platform_ext_invoice_id,
      </if>
      <if test="sysSupplierExtInvoiceId != null">
        sys_supplier_ext_invoice_id,
      </if>
      <if test="taxRate != null">
        tax_rate,
      </if>
      <if test="invoiceNumber != null">
        invoice_number,
      </if>
      <if test="saleId != null">
        sale_id,
      </if>
      <if test="saleName != null">
        sale_name,
      </if>
      <if test="saleIsExport != null">
        sale_is_export,
      </if>
      <if test="applyUserId != null">
        apply_user_id,
      </if>
      <if test="applyUserName != null">
        apply_user_name,
      </if>
      <if test="applyTime != null">
        apply_time,
      </if>
      <if test="auditUserId != null">
        audit_user_id,
      </if>
      <if test="auditUserName != null">
        audit_user_name,
      </if>
      <if test="auditTime != null">
        audit_time,
      </if>
      <if test="auditStatus != null">
        audit_status,
      </if>
      <if test="invoiceStatus != null">
        invoice_status,
      </if>
      <if test="invoiceProgressingUserId != null">
        invoice_progressing_user_id,
      </if>
      <if test="invoiceProgressingTime != null">
        invoice_progressing_time,
      </if>
      <if test="makeInvoiceUserId != null">
        make_invoice_user_id,
      </if>
      <if test="makeInvoiceUserName != null">
        make_invoice_user_name,
      </if>
      <if test="makeInvoiceStatus != null">
        make_invoice_status,
      </if>
      <if test="makeInvoiceTime != null">
        make_invoice_time,
      </if>
      <if test="receiveInvoiceStatus != null">
        receive_invoice_status,
      </if>
      <if test="receiveInvoiceUserId != null">
        receive_invoice_user_id,
      </if>
      <if test="receiveInvoiceTime != null">
        receive_invoice_time,
      </if>
      <if test="expressCompanyId != null">
        express_company_id,
      </if>
      <if test="expressNo != null">
        express_no,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="attachmentUploadFilesUids != null">
        attachment_upload_files_uids,
      </if>
      <if test="mailTickTime != null">
        mail_tick_time,
      </if>
      <if test="mailTickUserId != null">
        mail_tick_user_id,
      </if>
      <if test="mailTickStatus != null">
        mail_tick_status,
      </if>
      <if test="payoffAccountStatus != null">
        payoff_account_status,
      </if>
      <if test="payoffAccountModeRecord != null">
        payoff_account_mode_record,
      </if>
      <if test="payoffAccountUserId != null">
        payoff_account_user_id,
      </if>
      <if test="payoffAccountTime != null">
        payoff_account_time,
      </if>
      <if test="accountingOrderQuantity != null">
        accounting_order_quantity,
      </if>
      <if test="orderQuantity != null">
        order_quantity,
      </if>
      <if test="orderAmount != null">
        order_amount,
      </if>
      <if test="goodsQuantity != null">
        goods_quantity,
      </if>
      <if test="goodsItemQuantity != null">
        goods_item_quantity,
      </if>
      <if test="goodsAmount != null">
        goods_amount,
      </if>
      <if test="goodsCostAmount != null">
        goods_cost_amount,
      </if>
      <if test="serviceNo != null">
        service_no,
      </if>
      <if test="sourceFrom != null">
        source_from,
      </if>
      <if test="sysPlatformExtInvoiceSnapshot != null">
        sys_platform_ext_invoice_snapshot,
      </if>
      <if test="sysSupplierExtInvoiceSnapshot != null">
        sys_supplier_ext_invoice_snapshot,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="accountingOrderType != null">
        #{accountingOrderType,jdbcType=TINYINT},
      </if>
      <if test="accountingOrderId != null">
        #{accountingOrderId,jdbcType=BIGINT},
      </if>
      <if test="accountingOrderSn != null">
        #{accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="dimCreateBy != null">
        #{dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="invoiceApplySn != null">
        #{invoiceApplySn,jdbcType=VARCHAR},
      </if>
      <if test="invoiceApplyAmount != null">
        #{invoiceApplyAmount,jdbcType=DECIMAL},
      </if>
      <if test="invoiceType != null">
        #{invoiceType,jdbcType=TINYINT},
      </if>
      <if test="invoiceTitle != null">
        #{invoiceTitle,jdbcType=VARCHAR},
      </if>
      <if test="sysPlatformExtInvoiceId != null">
        #{sysPlatformExtInvoiceId,jdbcType=BIGINT},
      </if>
      <if test="sysSupplierExtInvoiceId != null">
        #{sysSupplierExtInvoiceId,jdbcType=BIGINT},
      </if>
      <if test="taxRate != null">
        #{taxRate,jdbcType=VARCHAR},
      </if>
      <if test="invoiceNumber != null">
        #{invoiceNumber,jdbcType=VARCHAR},
      </if>
      <if test="saleId != null">
        #{saleId,jdbcType=BIGINT},
      </if>
      <if test="saleName != null">
        #{saleName,jdbcType=VARCHAR},
      </if>
      <if test="saleIsExport != null">
        #{saleIsExport,jdbcType=INTEGER},
      </if>
      <if test="applyUserId != null">
        #{applyUserId,jdbcType=BIGINT},
      </if>
      <if test="applyUserName != null">
        #{applyUserName,jdbcType=VARCHAR},
      </if>
      <if test="applyTime != null">
        #{applyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="auditUserId != null">
        #{auditUserId,jdbcType=BIGINT},
      </if>
      <if test="auditUserName != null">
        #{auditUserName,jdbcType=VARCHAR},
      </if>
      <if test="auditTime != null">
        #{auditTime,jdbcType=TIMESTAMP},
      </if>
      <if test="auditStatus != null">
        #{auditStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceStatus != null">
        #{invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceProgressingUserId != null">
        #{invoiceProgressingUserId,jdbcType=BIGINT},
      </if>
      <if test="invoiceProgressingTime != null">
        #{invoiceProgressingTime,jdbcType=TIMESTAMP},
      </if>
      <if test="makeInvoiceUserId != null">
        #{makeInvoiceUserId,jdbcType=BIGINT},
      </if>
      <if test="makeInvoiceUserName != null">
        #{makeInvoiceUserName,jdbcType=VARCHAR},
      </if>
      <if test="makeInvoiceStatus != null">
        #{makeInvoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="makeInvoiceTime != null">
        #{makeInvoiceTime,jdbcType=TIMESTAMP},
      </if>
      <if test="receiveInvoiceStatus != null">
        #{receiveInvoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="receiveInvoiceUserId != null">
        #{receiveInvoiceUserId,jdbcType=BIGINT},
      </if>
      <if test="receiveInvoiceTime != null">
        #{receiveInvoiceTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expressCompanyId != null">
        #{expressCompanyId,jdbcType=BIGINT},
      </if>
      <if test="expressNo != null">
        #{expressNo,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="attachmentUploadFilesUids != null">
        #{attachmentUploadFilesUids,jdbcType=VARCHAR},
      </if>
      <if test="mailTickTime != null">
        #{mailTickTime,jdbcType=TIMESTAMP},
      </if>
      <if test="mailTickUserId != null">
        #{mailTickUserId,jdbcType=BIGINT},
      </if>
      <if test="mailTickStatus != null">
        #{mailTickStatus,jdbcType=TINYINT},
      </if>
      <if test="payoffAccountStatus != null">
        #{payoffAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="payoffAccountModeRecord != null">
        #{payoffAccountModeRecord,jdbcType=TINYINT},
      </if>
      <if test="payoffAccountUserId != null">
        #{payoffAccountUserId,jdbcType=BIGINT},
      </if>
      <if test="payoffAccountTime != null">
        #{payoffAccountTime,jdbcType=TIMESTAMP},
      </if>
      <if test="accountingOrderQuantity != null">
        #{accountingOrderQuantity,jdbcType=INTEGER},
      </if>
      <if test="orderQuantity != null">
        #{orderQuantity,jdbcType=INTEGER},
      </if>
      <if test="orderAmount != null">
        #{orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="goodsQuantity != null">
        #{goodsQuantity,jdbcType=INTEGER},
      </if>
      <if test="goodsItemQuantity != null">
        #{goodsItemQuantity,jdbcType=INTEGER},
      </if>
      <if test="goodsAmount != null">
        #{goodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="goodsCostAmount != null">
        #{goodsCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="serviceNo != null">
        #{serviceNo,jdbcType=VARCHAR},
      </if>
      <if test="sourceFrom != null">
        #{sourceFrom,jdbcType=VARCHAR},
      </if>
      <if test="sysPlatformExtInvoiceSnapshot != null">
        #{sysPlatformExtInvoiceSnapshot,jdbcType=LONGVARCHAR},
      </if>
      <if test="sysSupplierExtInvoiceSnapshot != null">
        #{sysSupplierExtInvoiceSnapshot,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplierExample" resultType="java.lang.Long">
    select count(*) from invoice_apply_supplier
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update invoice_apply_supplier
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.accountingOrderType != null">
        accounting_order_type = #{record.accountingOrderType,jdbcType=TINYINT},
      </if>
      <if test="record.accountingOrderId != null">
        accounting_order_id = #{record.accountingOrderId,jdbcType=BIGINT},
      </if>
      <if test="record.accountingOrderSn != null">
        accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.dimCreateBy != null">
        dim_create_by = #{record.dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceApplySn != null">
        invoice_apply_sn = #{record.invoiceApplySn,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceApplyAmount != null">
        invoice_apply_amount = #{record.invoiceApplyAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.invoiceType != null">
        invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceTitle != null">
        invoice_title = #{record.invoiceTitle,jdbcType=VARCHAR},
      </if>
      <if test="record.sysPlatformExtInvoiceId != null">
        sys_platform_ext_invoice_id = #{record.sysPlatformExtInvoiceId,jdbcType=BIGINT},
      </if>
      <if test="record.sysSupplierExtInvoiceId != null">
        sys_supplier_ext_invoice_id = #{record.sysSupplierExtInvoiceId,jdbcType=BIGINT},
      </if>
      <if test="record.taxRate != null">
        tax_rate = #{record.taxRate,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceNumber != null">
        invoice_number = #{record.invoiceNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.saleId != null">
        sale_id = #{record.saleId,jdbcType=BIGINT},
      </if>
      <if test="record.saleName != null">
        sale_name = #{record.saleName,jdbcType=VARCHAR},
      </if>
      <if test="record.saleIsExport != null">
        sale_is_export = #{record.saleIsExport,jdbcType=INTEGER},
      </if>
      <if test="record.applyUserId != null">
        apply_user_id = #{record.applyUserId,jdbcType=BIGINT},
      </if>
      <if test="record.applyUserName != null">
        apply_user_name = #{record.applyUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.applyTime != null">
        apply_time = #{record.applyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.auditUserId != null">
        audit_user_id = #{record.auditUserId,jdbcType=BIGINT},
      </if>
      <if test="record.auditUserName != null">
        audit_user_name = #{record.auditUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.auditTime != null">
        audit_time = #{record.auditTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.auditStatus != null">
        audit_status = #{record.auditStatus,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceStatus != null">
        invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceProgressingUserId != null">
        invoice_progressing_user_id = #{record.invoiceProgressingUserId,jdbcType=BIGINT},
      </if>
      <if test="record.invoiceProgressingTime != null">
        invoice_progressing_time = #{record.invoiceProgressingTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.makeInvoiceUserId != null">
        make_invoice_user_id = #{record.makeInvoiceUserId,jdbcType=BIGINT},
      </if>
      <if test="record.makeInvoiceUserName != null">
        make_invoice_user_name = #{record.makeInvoiceUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.makeInvoiceStatus != null">
        make_invoice_status = #{record.makeInvoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="record.makeInvoiceTime != null">
        make_invoice_time = #{record.makeInvoiceTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.receiveInvoiceStatus != null">
        receive_invoice_status = #{record.receiveInvoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="record.receiveInvoiceUserId != null">
        receive_invoice_user_id = #{record.receiveInvoiceUserId,jdbcType=BIGINT},
      </if>
      <if test="record.receiveInvoiceTime != null">
        receive_invoice_time = #{record.receiveInvoiceTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.expressCompanyId != null">
        express_company_id = #{record.expressCompanyId,jdbcType=BIGINT},
      </if>
      <if test="record.expressNo != null">
        express_no = #{record.expressNo,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.attachmentUploadFilesUids != null">
        attachment_upload_files_uids = #{record.attachmentUploadFilesUids,jdbcType=VARCHAR},
      </if>
      <if test="record.mailTickTime != null">
        mail_tick_time = #{record.mailTickTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.mailTickUserId != null">
        mail_tick_user_id = #{record.mailTickUserId,jdbcType=BIGINT},
      </if>
      <if test="record.mailTickStatus != null">
        mail_tick_status = #{record.mailTickStatus,jdbcType=TINYINT},
      </if>
      <if test="record.payoffAccountStatus != null">
        payoff_account_status = #{record.payoffAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="record.payoffAccountModeRecord != null">
        payoff_account_mode_record = #{record.payoffAccountModeRecord,jdbcType=TINYINT},
      </if>
      <if test="record.payoffAccountUserId != null">
        payoff_account_user_id = #{record.payoffAccountUserId,jdbcType=BIGINT},
      </if>
      <if test="record.payoffAccountTime != null">
        payoff_account_time = #{record.payoffAccountTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.accountingOrderQuantity != null">
        accounting_order_quantity = #{record.accountingOrderQuantity,jdbcType=INTEGER},
      </if>
      <if test="record.orderQuantity != null">
        order_quantity = #{record.orderQuantity,jdbcType=INTEGER},
      </if>
      <if test="record.orderAmount != null">
        order_amount = #{record.orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.goodsQuantity != null">
        goods_quantity = #{record.goodsQuantity,jdbcType=INTEGER},
      </if>
      <if test="record.goodsItemQuantity != null">
        goods_item_quantity = #{record.goodsItemQuantity,jdbcType=INTEGER},
      </if>
      <if test="record.goodsAmount != null">
        goods_amount = #{record.goodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.goodsCostAmount != null">
        goods_cost_amount = #{record.goodsCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.serviceNo != null">
        service_no = #{record.serviceNo,jdbcType=VARCHAR},
      </if>
      <if test="record.sourceFrom != null">
        source_from = #{record.sourceFrom,jdbcType=VARCHAR},
      </if>
      <if test="record.sysPlatformExtInvoiceSnapshot != null">
        sys_platform_ext_invoice_snapshot = #{record.sysPlatformExtInvoiceSnapshot,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.sysSupplierExtInvoiceSnapshot != null">
        sys_supplier_ext_invoice_snapshot = #{record.sysSupplierExtInvoiceSnapshot,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update invoice_apply_supplier
    set id = #{record.id,jdbcType=BIGINT},
      accounting_order_type = #{record.accountingOrderType,jdbcType=TINYINT},
      accounting_order_id = #{record.accountingOrderId,jdbcType=BIGINT},
      accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      dim_create_by = #{record.dimCreateBy,jdbcType=TINYINT},
      invoice_apply_sn = #{record.invoiceApplySn,jdbcType=VARCHAR},
      invoice_apply_amount = #{record.invoiceApplyAmount,jdbcType=DECIMAL},
      invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      invoice_title = #{record.invoiceTitle,jdbcType=VARCHAR},
      sys_platform_ext_invoice_id = #{record.sysPlatformExtInvoiceId,jdbcType=BIGINT},
      sys_supplier_ext_invoice_id = #{record.sysSupplierExtInvoiceId,jdbcType=BIGINT},
      tax_rate = #{record.taxRate,jdbcType=VARCHAR},
      invoice_number = #{record.invoiceNumber,jdbcType=VARCHAR},
      sale_id = #{record.saleId,jdbcType=BIGINT},
      sale_name = #{record.saleName,jdbcType=VARCHAR},
      sale_is_export = #{record.saleIsExport,jdbcType=INTEGER},
      apply_user_id = #{record.applyUserId,jdbcType=BIGINT},
      apply_user_name = #{record.applyUserName,jdbcType=VARCHAR},
      apply_time = #{record.applyTime,jdbcType=TIMESTAMP},
      audit_user_id = #{record.auditUserId,jdbcType=BIGINT},
      audit_user_name = #{record.auditUserName,jdbcType=VARCHAR},
      audit_time = #{record.auditTime,jdbcType=TIMESTAMP},
      audit_status = #{record.auditStatus,jdbcType=TINYINT},
      invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      invoice_progressing_user_id = #{record.invoiceProgressingUserId,jdbcType=BIGINT},
      invoice_progressing_time = #{record.invoiceProgressingTime,jdbcType=TIMESTAMP},
      make_invoice_user_id = #{record.makeInvoiceUserId,jdbcType=BIGINT},
      make_invoice_user_name = #{record.makeInvoiceUserName,jdbcType=VARCHAR},
      make_invoice_status = #{record.makeInvoiceStatus,jdbcType=TINYINT},
      make_invoice_time = #{record.makeInvoiceTime,jdbcType=TIMESTAMP},
      receive_invoice_status = #{record.receiveInvoiceStatus,jdbcType=TINYINT},
      receive_invoice_user_id = #{record.receiveInvoiceUserId,jdbcType=BIGINT},
      receive_invoice_time = #{record.receiveInvoiceTime,jdbcType=TIMESTAMP},
      express_company_id = #{record.expressCompanyId,jdbcType=BIGINT},
      express_no = #{record.expressNo,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      attachment_upload_files_uids = #{record.attachmentUploadFilesUids,jdbcType=VARCHAR},
      mail_tick_time = #{record.mailTickTime,jdbcType=TIMESTAMP},
      mail_tick_user_id = #{record.mailTickUserId,jdbcType=BIGINT},
      mail_tick_status = #{record.mailTickStatus,jdbcType=TINYINT},
      payoff_account_status = #{record.payoffAccountStatus,jdbcType=TINYINT},
      payoff_account_mode_record = #{record.payoffAccountModeRecord,jdbcType=TINYINT},
      payoff_account_user_id = #{record.payoffAccountUserId,jdbcType=BIGINT},
      payoff_account_time = #{record.payoffAccountTime,jdbcType=TIMESTAMP},
      accounting_order_quantity = #{record.accountingOrderQuantity,jdbcType=INTEGER},
      order_quantity = #{record.orderQuantity,jdbcType=INTEGER},
      order_amount = #{record.orderAmount,jdbcType=DECIMAL},
      goods_quantity = #{record.goodsQuantity,jdbcType=INTEGER},
      goods_item_quantity = #{record.goodsItemQuantity,jdbcType=INTEGER},
      goods_amount = #{record.goodsAmount,jdbcType=DECIMAL},
      goods_cost_amount = #{record.goodsCostAmount,jdbcType=DECIMAL},
      service_no = #{record.serviceNo,jdbcType=VARCHAR},
      source_from = #{record.sourceFrom,jdbcType=VARCHAR},
      sys_platform_ext_invoice_snapshot = #{record.sysPlatformExtInvoiceSnapshot,jdbcType=LONGVARCHAR},
      sys_supplier_ext_invoice_snapshot = #{record.sysSupplierExtInvoiceSnapshot,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update invoice_apply_supplier
    set id = #{record.id,jdbcType=BIGINT},
      accounting_order_type = #{record.accountingOrderType,jdbcType=TINYINT},
      accounting_order_id = #{record.accountingOrderId,jdbcType=BIGINT},
      accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      dim_create_by = #{record.dimCreateBy,jdbcType=TINYINT},
      invoice_apply_sn = #{record.invoiceApplySn,jdbcType=VARCHAR},
      invoice_apply_amount = #{record.invoiceApplyAmount,jdbcType=DECIMAL},
      invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      invoice_title = #{record.invoiceTitle,jdbcType=VARCHAR},
      sys_platform_ext_invoice_id = #{record.sysPlatformExtInvoiceId,jdbcType=BIGINT},
      sys_supplier_ext_invoice_id = #{record.sysSupplierExtInvoiceId,jdbcType=BIGINT},
      tax_rate = #{record.taxRate,jdbcType=VARCHAR},
      invoice_number = #{record.invoiceNumber,jdbcType=VARCHAR},
      sale_id = #{record.saleId,jdbcType=BIGINT},
      sale_name = #{record.saleName,jdbcType=VARCHAR},
      sale_is_export = #{record.saleIsExport,jdbcType=INTEGER},
      apply_user_id = #{record.applyUserId,jdbcType=BIGINT},
      apply_user_name = #{record.applyUserName,jdbcType=VARCHAR},
      apply_time = #{record.applyTime,jdbcType=TIMESTAMP},
      audit_user_id = #{record.auditUserId,jdbcType=BIGINT},
      audit_user_name = #{record.auditUserName,jdbcType=VARCHAR},
      audit_time = #{record.auditTime,jdbcType=TIMESTAMP},
      audit_status = #{record.auditStatus,jdbcType=TINYINT},
      invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      invoice_progressing_user_id = #{record.invoiceProgressingUserId,jdbcType=BIGINT},
      invoice_progressing_time = #{record.invoiceProgressingTime,jdbcType=TIMESTAMP},
      make_invoice_user_id = #{record.makeInvoiceUserId,jdbcType=BIGINT},
      make_invoice_user_name = #{record.makeInvoiceUserName,jdbcType=VARCHAR},
      make_invoice_status = #{record.makeInvoiceStatus,jdbcType=TINYINT},
      make_invoice_time = #{record.makeInvoiceTime,jdbcType=TIMESTAMP},
      receive_invoice_status = #{record.receiveInvoiceStatus,jdbcType=TINYINT},
      receive_invoice_user_id = #{record.receiveInvoiceUserId,jdbcType=BIGINT},
      receive_invoice_time = #{record.receiveInvoiceTime,jdbcType=TIMESTAMP},
      express_company_id = #{record.expressCompanyId,jdbcType=BIGINT},
      express_no = #{record.expressNo,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      attachment_upload_files_uids = #{record.attachmentUploadFilesUids,jdbcType=VARCHAR},
      mail_tick_time = #{record.mailTickTime,jdbcType=TIMESTAMP},
      mail_tick_user_id = #{record.mailTickUserId,jdbcType=BIGINT},
      mail_tick_status = #{record.mailTickStatus,jdbcType=TINYINT},
      payoff_account_status = #{record.payoffAccountStatus,jdbcType=TINYINT},
      payoff_account_mode_record = #{record.payoffAccountModeRecord,jdbcType=TINYINT},
      payoff_account_user_id = #{record.payoffAccountUserId,jdbcType=BIGINT},
      payoff_account_time = #{record.payoffAccountTime,jdbcType=TIMESTAMP},
      accounting_order_quantity = #{record.accountingOrderQuantity,jdbcType=INTEGER},
      order_quantity = #{record.orderQuantity,jdbcType=INTEGER},
      order_amount = #{record.orderAmount,jdbcType=DECIMAL},
      goods_quantity = #{record.goodsQuantity,jdbcType=INTEGER},
      goods_item_quantity = #{record.goodsItemQuantity,jdbcType=INTEGER},
      goods_amount = #{record.goodsAmount,jdbcType=DECIMAL},
      goods_cost_amount = #{record.goodsCostAmount,jdbcType=DECIMAL},
      service_no = #{record.serviceNo,jdbcType=VARCHAR},
      source_from = #{record.sourceFrom,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplier">
    update invoice_apply_supplier
    <set>
      <if test="accountingOrderType != null">
        accounting_order_type = #{accountingOrderType,jdbcType=TINYINT},
      </if>
      <if test="accountingOrderId != null">
        accounting_order_id = #{accountingOrderId,jdbcType=BIGINT},
      </if>
      <if test="accountingOrderSn != null">
        accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="dimCreateBy != null">
        dim_create_by = #{dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="invoiceApplySn != null">
        invoice_apply_sn = #{invoiceApplySn,jdbcType=VARCHAR},
      </if>
      <if test="invoiceApplyAmount != null">
        invoice_apply_amount = #{invoiceApplyAmount,jdbcType=DECIMAL},
      </if>
      <if test="invoiceType != null">
        invoice_type = #{invoiceType,jdbcType=TINYINT},
      </if>
      <if test="invoiceTitle != null">
        invoice_title = #{invoiceTitle,jdbcType=VARCHAR},
      </if>
      <if test="sysPlatformExtInvoiceId != null">
        sys_platform_ext_invoice_id = #{sysPlatformExtInvoiceId,jdbcType=BIGINT},
      </if>
      <if test="sysSupplierExtInvoiceId != null">
        sys_supplier_ext_invoice_id = #{sysSupplierExtInvoiceId,jdbcType=BIGINT},
      </if>
      <if test="taxRate != null">
        tax_rate = #{taxRate,jdbcType=VARCHAR},
      </if>
      <if test="invoiceNumber != null">
        invoice_number = #{invoiceNumber,jdbcType=VARCHAR},
      </if>
      <if test="saleId != null">
        sale_id = #{saleId,jdbcType=BIGINT},
      </if>
      <if test="saleName != null">
        sale_name = #{saleName,jdbcType=VARCHAR},
      </if>
      <if test="saleIsExport != null">
        sale_is_export = #{saleIsExport,jdbcType=INTEGER},
      </if>
      <if test="applyUserId != null">
        apply_user_id = #{applyUserId,jdbcType=BIGINT},
      </if>
      <if test="applyUserName != null">
        apply_user_name = #{applyUserName,jdbcType=VARCHAR},
      </if>
      <if test="applyTime != null">
        apply_time = #{applyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="auditUserId != null">
        audit_user_id = #{auditUserId,jdbcType=BIGINT},
      </if>
      <if test="auditUserName != null">
        audit_user_name = #{auditUserName,jdbcType=VARCHAR},
      </if>
      <if test="auditTime != null">
        audit_time = #{auditTime,jdbcType=TIMESTAMP},
      </if>
      <if test="auditStatus != null">
        audit_status = #{auditStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceStatus != null">
        invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceProgressingUserId != null">
        invoice_progressing_user_id = #{invoiceProgressingUserId,jdbcType=BIGINT},
      </if>
      <if test="invoiceProgressingTime != null">
        invoice_progressing_time = #{invoiceProgressingTime,jdbcType=TIMESTAMP},
      </if>
      <if test="makeInvoiceUserId != null">
        make_invoice_user_id = #{makeInvoiceUserId,jdbcType=BIGINT},
      </if>
      <if test="makeInvoiceUserName != null">
        make_invoice_user_name = #{makeInvoiceUserName,jdbcType=VARCHAR},
      </if>
      <if test="makeInvoiceStatus != null">
        make_invoice_status = #{makeInvoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="makeInvoiceTime != null">
        make_invoice_time = #{makeInvoiceTime,jdbcType=TIMESTAMP},
      </if>
      <if test="receiveInvoiceStatus != null">
        receive_invoice_status = #{receiveInvoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="receiveInvoiceUserId != null">
        receive_invoice_user_id = #{receiveInvoiceUserId,jdbcType=BIGINT},
      </if>
      <if test="receiveInvoiceTime != null">
        receive_invoice_time = #{receiveInvoiceTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expressCompanyId != null">
        express_company_id = #{expressCompanyId,jdbcType=BIGINT},
      </if>
      <if test="expressNo != null">
        express_no = #{expressNo,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="attachmentUploadFilesUids != null">
        attachment_upload_files_uids = #{attachmentUploadFilesUids,jdbcType=VARCHAR},
      </if>
      <if test="mailTickTime != null">
        mail_tick_time = #{mailTickTime,jdbcType=TIMESTAMP},
      </if>
      <if test="mailTickUserId != null">
        mail_tick_user_id = #{mailTickUserId,jdbcType=BIGINT},
      </if>
      <if test="mailTickStatus != null">
        mail_tick_status = #{mailTickStatus,jdbcType=TINYINT},
      </if>
      <if test="payoffAccountStatus != null">
        payoff_account_status = #{payoffAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="payoffAccountModeRecord != null">
        payoff_account_mode_record = #{payoffAccountModeRecord,jdbcType=TINYINT},
      </if>
      <if test="payoffAccountUserId != null">
        payoff_account_user_id = #{payoffAccountUserId,jdbcType=BIGINT},
      </if>
      <if test="payoffAccountTime != null">
        payoff_account_time = #{payoffAccountTime,jdbcType=TIMESTAMP},
      </if>
      <if test="accountingOrderQuantity != null">
        accounting_order_quantity = #{accountingOrderQuantity,jdbcType=INTEGER},
      </if>
      <if test="orderQuantity != null">
        order_quantity = #{orderQuantity,jdbcType=INTEGER},
      </if>
      <if test="orderAmount != null">
        order_amount = #{orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="goodsQuantity != null">
        goods_quantity = #{goodsQuantity,jdbcType=INTEGER},
      </if>
      <if test="goodsItemQuantity != null">
        goods_item_quantity = #{goodsItemQuantity,jdbcType=INTEGER},
      </if>
      <if test="goodsAmount != null">
        goods_amount = #{goodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="goodsCostAmount != null">
        goods_cost_amount = #{goodsCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="serviceNo != null">
        service_no = #{serviceNo,jdbcType=VARCHAR},
      </if>
      <if test="sourceFrom != null">
        source_from = #{sourceFrom,jdbcType=VARCHAR},
      </if>
      <if test="sysPlatformExtInvoiceSnapshot != null">
        sys_platform_ext_invoice_snapshot = #{sysPlatformExtInvoiceSnapshot,jdbcType=LONGVARCHAR},
      </if>
      <if test="sysSupplierExtInvoiceSnapshot != null">
        sys_supplier_ext_invoice_snapshot = #{sysSupplierExtInvoiceSnapshot,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplier">
    update invoice_apply_supplier
    set accounting_order_type = #{accountingOrderType,jdbcType=TINYINT},
      accounting_order_id = #{accountingOrderId,jdbcType=BIGINT},
      accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      dim_create_by = #{dimCreateBy,jdbcType=TINYINT},
      invoice_apply_sn = #{invoiceApplySn,jdbcType=VARCHAR},
      invoice_apply_amount = #{invoiceApplyAmount,jdbcType=DECIMAL},
      invoice_type = #{invoiceType,jdbcType=TINYINT},
      invoice_title = #{invoiceTitle,jdbcType=VARCHAR},
      sys_platform_ext_invoice_id = #{sysPlatformExtInvoiceId,jdbcType=BIGINT},
      sys_supplier_ext_invoice_id = #{sysSupplierExtInvoiceId,jdbcType=BIGINT},
      tax_rate = #{taxRate,jdbcType=VARCHAR},
      invoice_number = #{invoiceNumber,jdbcType=VARCHAR},
      sale_id = #{saleId,jdbcType=BIGINT},
      sale_name = #{saleName,jdbcType=VARCHAR},
      sale_is_export = #{saleIsExport,jdbcType=INTEGER},
      apply_user_id = #{applyUserId,jdbcType=BIGINT},
      apply_user_name = #{applyUserName,jdbcType=VARCHAR},
      apply_time = #{applyTime,jdbcType=TIMESTAMP},
      audit_user_id = #{auditUserId,jdbcType=BIGINT},
      audit_user_name = #{auditUserName,jdbcType=VARCHAR},
      audit_time = #{auditTime,jdbcType=TIMESTAMP},
      audit_status = #{auditStatus,jdbcType=TINYINT},
      invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      invoice_progressing_user_id = #{invoiceProgressingUserId,jdbcType=BIGINT},
      invoice_progressing_time = #{invoiceProgressingTime,jdbcType=TIMESTAMP},
      make_invoice_user_id = #{makeInvoiceUserId,jdbcType=BIGINT},
      make_invoice_user_name = #{makeInvoiceUserName,jdbcType=VARCHAR},
      make_invoice_status = #{makeInvoiceStatus,jdbcType=TINYINT},
      make_invoice_time = #{makeInvoiceTime,jdbcType=TIMESTAMP},
      receive_invoice_status = #{receiveInvoiceStatus,jdbcType=TINYINT},
      receive_invoice_user_id = #{receiveInvoiceUserId,jdbcType=BIGINT},
      receive_invoice_time = #{receiveInvoiceTime,jdbcType=TIMESTAMP},
      express_company_id = #{expressCompanyId,jdbcType=BIGINT},
      express_no = #{expressNo,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      attachment_upload_files_uids = #{attachmentUploadFilesUids,jdbcType=VARCHAR},
      mail_tick_time = #{mailTickTime,jdbcType=TIMESTAMP},
      mail_tick_user_id = #{mailTickUserId,jdbcType=BIGINT},
      mail_tick_status = #{mailTickStatus,jdbcType=TINYINT},
      payoff_account_status = #{payoffAccountStatus,jdbcType=TINYINT},
      payoff_account_mode_record = #{payoffAccountModeRecord,jdbcType=TINYINT},
      payoff_account_user_id = #{payoffAccountUserId,jdbcType=BIGINT},
      payoff_account_time = #{payoffAccountTime,jdbcType=TIMESTAMP},
      accounting_order_quantity = #{accountingOrderQuantity,jdbcType=INTEGER},
      order_quantity = #{orderQuantity,jdbcType=INTEGER},
      order_amount = #{orderAmount,jdbcType=DECIMAL},
      goods_quantity = #{goodsQuantity,jdbcType=INTEGER},
      goods_item_quantity = #{goodsItemQuantity,jdbcType=INTEGER},
      goods_amount = #{goodsAmount,jdbcType=DECIMAL},
      goods_cost_amount = #{goodsCostAmount,jdbcType=DECIMAL},
      service_no = #{serviceNo,jdbcType=VARCHAR},
      source_from = #{sourceFrom,jdbcType=VARCHAR},
      sys_platform_ext_invoice_snapshot = #{sysPlatformExtInvoiceSnapshot,jdbcType=LONGVARCHAR},
      sys_supplier_ext_invoice_snapshot = #{sysSupplierExtInvoiceSnapshot,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplier">
    update invoice_apply_supplier
    set accounting_order_type = #{accountingOrderType,jdbcType=TINYINT},
      accounting_order_id = #{accountingOrderId,jdbcType=BIGINT},
      accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      dim_create_by = #{dimCreateBy,jdbcType=TINYINT},
      invoice_apply_sn = #{invoiceApplySn,jdbcType=VARCHAR},
      invoice_apply_amount = #{invoiceApplyAmount,jdbcType=DECIMAL},
      invoice_type = #{invoiceType,jdbcType=TINYINT},
      invoice_title = #{invoiceTitle,jdbcType=VARCHAR},
      sys_platform_ext_invoice_id = #{sysPlatformExtInvoiceId,jdbcType=BIGINT},
      sys_supplier_ext_invoice_id = #{sysSupplierExtInvoiceId,jdbcType=BIGINT},
      tax_rate = #{taxRate,jdbcType=VARCHAR},
      invoice_number = #{invoiceNumber,jdbcType=VARCHAR},
      sale_id = #{saleId,jdbcType=BIGINT},
      sale_name = #{saleName,jdbcType=VARCHAR},
      sale_is_export = #{saleIsExport,jdbcType=INTEGER},
      apply_user_id = #{applyUserId,jdbcType=BIGINT},
      apply_user_name = #{applyUserName,jdbcType=VARCHAR},
      apply_time = #{applyTime,jdbcType=TIMESTAMP},
      audit_user_id = #{auditUserId,jdbcType=BIGINT},
      audit_user_name = #{auditUserName,jdbcType=VARCHAR},
      audit_time = #{auditTime,jdbcType=TIMESTAMP},
      audit_status = #{auditStatus,jdbcType=TINYINT},
      invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      invoice_progressing_user_id = #{invoiceProgressingUserId,jdbcType=BIGINT},
      invoice_progressing_time = #{invoiceProgressingTime,jdbcType=TIMESTAMP},
      make_invoice_user_id = #{makeInvoiceUserId,jdbcType=BIGINT},
      make_invoice_user_name = #{makeInvoiceUserName,jdbcType=VARCHAR},
      make_invoice_status = #{makeInvoiceStatus,jdbcType=TINYINT},
      make_invoice_time = #{makeInvoiceTime,jdbcType=TIMESTAMP},
      receive_invoice_status = #{receiveInvoiceStatus,jdbcType=TINYINT},
      receive_invoice_user_id = #{receiveInvoiceUserId,jdbcType=BIGINT},
      receive_invoice_time = #{receiveInvoiceTime,jdbcType=TIMESTAMP},
      express_company_id = #{expressCompanyId,jdbcType=BIGINT},
      express_no = #{expressNo,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      attachment_upload_files_uids = #{attachmentUploadFilesUids,jdbcType=VARCHAR},
      mail_tick_time = #{mailTickTime,jdbcType=TIMESTAMP},
      mail_tick_user_id = #{mailTickUserId,jdbcType=BIGINT},
      mail_tick_status = #{mailTickStatus,jdbcType=TINYINT},
      payoff_account_status = #{payoffAccountStatus,jdbcType=TINYINT},
      payoff_account_mode_record = #{payoffAccountModeRecord,jdbcType=TINYINT},
      payoff_account_user_id = #{payoffAccountUserId,jdbcType=BIGINT},
      payoff_account_time = #{payoffAccountTime,jdbcType=TIMESTAMP},
      accounting_order_quantity = #{accountingOrderQuantity,jdbcType=INTEGER},
      order_quantity = #{orderQuantity,jdbcType=INTEGER},
      order_amount = #{orderAmount,jdbcType=DECIMAL},
      goods_quantity = #{goodsQuantity,jdbcType=INTEGER},
      goods_item_quantity = #{goodsItemQuantity,jdbcType=INTEGER},
      goods_amount = #{goodsAmount,jdbcType=DECIMAL},
      goods_cost_amount = #{goodsCostAmount,jdbcType=DECIMAL},
      service_no = #{serviceNo,jdbcType=VARCHAR},
      source_from = #{sourceFrom,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>