<?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.accounting.unified.supplier.AccountingUnifiedSupplierMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.accounting.unified.supplier.AccountingUnifiedSupplier">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="dim_create_by" jdbcType="TINYINT" property="dimCreateBy" />
    <result column="accounting_order_sn" jdbcType="VARCHAR" property="accountingOrderSn" />
    <result column="accounting_status" jdbcType="TINYINT" property="accountingStatus" />
    <result column="invoice_status" jdbcType="TINYINT" property="invoiceStatus" />
    <result column="invoice_title" jdbcType="VARCHAR" property="invoiceTitle" />
    <result column="invoice_type" jdbcType="TINYINT" property="invoiceType" />
    <result column="tax_code" jdbcType="VARCHAR" property="taxCode" />
    <result column="address" jdbcType="VARCHAR" property="address" />
    <result column="sale_id" jdbcType="BIGINT" property="saleId" />
    <result column="sale_name" jdbcType="VARCHAR" property="saleName" />
    <result column="is_send_email" jdbcType="TINYINT" property="isSendEmail" />
    <result column="send_email_time" jdbcType="TIMESTAMP" property="sendEmailTime" />
    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
    <result column="back_account_status" jdbcType="TINYINT" property="backAccountStatus" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="invoice_apply_status" jdbcType="TINYINT" property="invoiceApplyStatus" />
    <result column="invoice_apply_user_id" jdbcType="BIGINT" property="invoiceApplyUserId" />
    <result column="invoice_apply_time" jdbcType="TIMESTAMP" property="invoiceApplyTime" />
    <result column="invoice_apply_mode_record" jdbcType="TINYINT" property="invoiceApplyModeRecord" />
    <result column="order_quantity" jdbcType="INTEGER" property="orderQuantity" />
    <result column="goods_quantity" jdbcType="INTEGER" property="goodsQuantity" />
    <result column="goods_item_quantity" jdbcType="INTEGER" property="goodsItemQuantity" />
    <result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
    <result column="refund_order_amount" jdbcType="DECIMAL" property="refundOrderAmount" />
    <result column="goods_amount" jdbcType="DECIMAL" property="goodsAmount" />
    <result column="refund_goods_amount" jdbcType="DECIMAL" property="refundGoodsAmount" />
    <result column="order_cost_amount" jdbcType="DECIMAL" property="orderCostAmount" />
    <result column="refund_order_cost_amount" jdbcType="DECIMAL" property="refundOrderCostAmount" />
    <result column="accounting_order_amount" jdbcType="DECIMAL" property="accountingOrderAmount" />
    <result column="accounting_order_amount_with_freight" jdbcType="DECIMAL" property="accountingOrderAmountWithFreight" />
    <result column="need_revise_mark" jdbcType="TINYINT" property="needReviseMark" />
    <result column="goods_cost_amount" jdbcType="DECIMAL" property="goodsCostAmount" />
    <result column="refund_goods_cost_amount" jdbcType="DECIMAL" property="refundGoodsCostAmount" />
    <result column="goods_transport_amount" jdbcType="DECIMAL" property="goodsTransportAmount" />
    <result column="refund_goods_transport_amount" jdbcType="DECIMAL" property="refundGoodsTransportAmount" />
    <result column="accounting_order_cost_amount" jdbcType="DECIMAL" property="accountingOrderCostAmount" />
    <result column="accounting_order_cost_amount_with_freight" jdbcType="DECIMAL" property="accountingOrderCostAmountWithFreight" />
    <result column="service_no" jdbcType="VARCHAR" property="serviceNo" />
    <result column="source_from" jdbcType="VARCHAR" property="sourceFrom" />
  </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, dim_create_by, accounting_order_sn, accounting_status, invoice_status, invoice_title, 
    invoice_type, tax_code, address, sale_id, sale_name, is_send_email, send_email_time, 
    start_time, end_time, back_account_status, create_time, create_user_id, update_time, 
    update_user_id, remark, invoice_apply_status, invoice_apply_user_id, invoice_apply_time, 
    invoice_apply_mode_record, order_quantity, goods_quantity, goods_item_quantity, order_amount, 
    refund_order_amount, goods_amount, refund_goods_amount, order_cost_amount, refund_order_cost_amount, 
    accounting_order_amount, accounting_order_amount_with_freight, need_revise_mark, 
    goods_cost_amount, refund_goods_cost_amount, goods_transport_amount, refund_goods_transport_amount, 
    accounting_order_cost_amount, accounting_order_cost_amount_with_freight, service_no, 
    source_from
  </sql>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.supplier.AccountingUnifiedSupplierExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from accounting_unified_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="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from accounting_unified_supplier
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from accounting_unified_supplier
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.supplier.AccountingUnifiedSupplierExample">
    delete from accounting_unified_supplier
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.supplier.AccountingUnifiedSupplier">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into accounting_unified_supplier (dim_create_by, accounting_order_sn, accounting_status, 
      invoice_status, invoice_title, invoice_type, 
      tax_code, address, sale_id, 
      sale_name, is_send_email, send_email_time, 
      start_time, end_time, back_account_status, 
      create_time, create_user_id, update_time, 
      update_user_id, remark, invoice_apply_status, 
      invoice_apply_user_id, invoice_apply_time, 
      invoice_apply_mode_record, order_quantity, 
      goods_quantity, goods_item_quantity, order_amount, 
      refund_order_amount, goods_amount, refund_goods_amount, 
      order_cost_amount, refund_order_cost_amount, 
      accounting_order_amount, accounting_order_amount_with_freight, 
      need_revise_mark, goods_cost_amount, refund_goods_cost_amount, 
      goods_transport_amount, refund_goods_transport_amount, 
      accounting_order_cost_amount, accounting_order_cost_amount_with_freight, 
      service_no, source_from)
    values (#{dimCreateBy,jdbcType=TINYINT}, #{accountingOrderSn,jdbcType=VARCHAR}, #{accountingStatus,jdbcType=TINYINT}, 
      #{invoiceStatus,jdbcType=TINYINT}, #{invoiceTitle,jdbcType=VARCHAR}, #{invoiceType,jdbcType=TINYINT}, 
      #{taxCode,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{saleId,jdbcType=BIGINT}, 
      #{saleName,jdbcType=VARCHAR}, #{isSendEmail,jdbcType=TINYINT}, #{sendEmailTime,jdbcType=TIMESTAMP}, 
      #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{backAccountStatus,jdbcType=TINYINT}, 
      #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{updateUserId,jdbcType=BIGINT}, #{remark,jdbcType=VARCHAR}, #{invoiceApplyStatus,jdbcType=TINYINT}, 
      #{invoiceApplyUserId,jdbcType=BIGINT}, #{invoiceApplyTime,jdbcType=TIMESTAMP}, 
      #{invoiceApplyModeRecord,jdbcType=TINYINT}, #{orderQuantity,jdbcType=INTEGER}, 
      #{goodsQuantity,jdbcType=INTEGER}, #{goodsItemQuantity,jdbcType=INTEGER}, #{orderAmount,jdbcType=DECIMAL}, 
      #{refundOrderAmount,jdbcType=DECIMAL}, #{goodsAmount,jdbcType=DECIMAL}, #{refundGoodsAmount,jdbcType=DECIMAL}, 
      #{orderCostAmount,jdbcType=DECIMAL}, #{refundOrderCostAmount,jdbcType=DECIMAL}, 
      #{accountingOrderAmount,jdbcType=DECIMAL}, #{accountingOrderAmountWithFreight,jdbcType=DECIMAL}, 
      #{needReviseMark,jdbcType=TINYINT}, #{goodsCostAmount,jdbcType=DECIMAL}, #{refundGoodsCostAmount,jdbcType=DECIMAL}, 
      #{goodsTransportAmount,jdbcType=DECIMAL}, #{refundGoodsTransportAmount,jdbcType=DECIMAL}, 
      #{accountingOrderCostAmount,jdbcType=DECIMAL}, #{accountingOrderCostAmountWithFreight,jdbcType=DECIMAL}, 
      #{serviceNo,jdbcType=VARCHAR}, #{sourceFrom,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.supplier.AccountingUnifiedSupplier">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into accounting_unified_supplier
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="dimCreateBy != null">
        dim_create_by,
      </if>
      <if test="accountingOrderSn != null">
        accounting_order_sn,
      </if>
      <if test="accountingStatus != null">
        accounting_status,
      </if>
      <if test="invoiceStatus != null">
        invoice_status,
      </if>
      <if test="invoiceTitle != null">
        invoice_title,
      </if>
      <if test="invoiceType != null">
        invoice_type,
      </if>
      <if test="taxCode != null">
        tax_code,
      </if>
      <if test="address != null">
        address,
      </if>
      <if test="saleId != null">
        sale_id,
      </if>
      <if test="saleName != null">
        sale_name,
      </if>
      <if test="isSendEmail != null">
        is_send_email,
      </if>
      <if test="sendEmailTime != null">
        send_email_time,
      </if>
      <if test="startTime != null">
        start_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="backAccountStatus != null">
        back_account_status,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createUserId != null">
        create_user_id,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="updateUserId != null">
        update_user_id,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="invoiceApplyStatus != null">
        invoice_apply_status,
      </if>
      <if test="invoiceApplyUserId != null">
        invoice_apply_user_id,
      </if>
      <if test="invoiceApplyTime != null">
        invoice_apply_time,
      </if>
      <if test="invoiceApplyModeRecord != null">
        invoice_apply_mode_record,
      </if>
      <if test="orderQuantity != null">
        order_quantity,
      </if>
      <if test="goodsQuantity != null">
        goods_quantity,
      </if>
      <if test="goodsItemQuantity != null">
        goods_item_quantity,
      </if>
      <if test="orderAmount != null">
        order_amount,
      </if>
      <if test="refundOrderAmount != null">
        refund_order_amount,
      </if>
      <if test="goodsAmount != null">
        goods_amount,
      </if>
      <if test="refundGoodsAmount != null">
        refund_goods_amount,
      </if>
      <if test="orderCostAmount != null">
        order_cost_amount,
      </if>
      <if test="refundOrderCostAmount != null">
        refund_order_cost_amount,
      </if>
      <if test="accountingOrderAmount != null">
        accounting_order_amount,
      </if>
      <if test="accountingOrderAmountWithFreight != null">
        accounting_order_amount_with_freight,
      </if>
      <if test="needReviseMark != null">
        need_revise_mark,
      </if>
      <if test="goodsCostAmount != null">
        goods_cost_amount,
      </if>
      <if test="refundGoodsCostAmount != null">
        refund_goods_cost_amount,
      </if>
      <if test="goodsTransportAmount != null">
        goods_transport_amount,
      </if>
      <if test="refundGoodsTransportAmount != null">
        refund_goods_transport_amount,
      </if>
      <if test="accountingOrderCostAmount != null">
        accounting_order_cost_amount,
      </if>
      <if test="accountingOrderCostAmountWithFreight != null">
        accounting_order_cost_amount_with_freight,
      </if>
      <if test="serviceNo != null">
        service_no,
      </if>
      <if test="sourceFrom != null">
        source_from,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="dimCreateBy != null">
        #{dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="accountingOrderSn != null">
        #{accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="accountingStatus != null">
        #{accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceStatus != null">
        #{invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceTitle != null">
        #{invoiceTitle,jdbcType=VARCHAR},
      </if>
      <if test="invoiceType != null">
        #{invoiceType,jdbcType=TINYINT},
      </if>
      <if test="taxCode != null">
        #{taxCode,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="saleId != null">
        #{saleId,jdbcType=BIGINT},
      </if>
      <if test="saleName != null">
        #{saleName,jdbcType=VARCHAR},
      </if>
      <if test="isSendEmail != null">
        #{isSendEmail,jdbcType=TINYINT},
      </if>
      <if test="sendEmailTime != null">
        #{sendEmailTime,jdbcType=TIMESTAMP},
      </if>
      <if test="startTime != null">
        #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="backAccountStatus != null">
        #{backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        #{updateUserId,jdbcType=BIGINT},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="invoiceApplyStatus != null">
        #{invoiceApplyStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceApplyUserId != null">
        #{invoiceApplyUserId,jdbcType=BIGINT},
      </if>
      <if test="invoiceApplyTime != null">
        #{invoiceApplyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="invoiceApplyModeRecord != null">
        #{invoiceApplyModeRecord,jdbcType=TINYINT},
      </if>
      <if test="orderQuantity != null">
        #{orderQuantity,jdbcType=INTEGER},
      </if>
      <if test="goodsQuantity != null">
        #{goodsQuantity,jdbcType=INTEGER},
      </if>
      <if test="goodsItemQuantity != null">
        #{goodsItemQuantity,jdbcType=INTEGER},
      </if>
      <if test="orderAmount != null">
        #{orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundOrderAmount != null">
        #{refundOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="goodsAmount != null">
        #{goodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundGoodsAmount != null">
        #{refundGoodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderCostAmount != null">
        #{orderCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundOrderCostAmount != null">
        #{refundOrderCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingOrderAmount != null">
        #{accountingOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingOrderAmountWithFreight != null">
        #{accountingOrderAmountWithFreight,jdbcType=DECIMAL},
      </if>
      <if test="needReviseMark != null">
        #{needReviseMark,jdbcType=TINYINT},
      </if>
      <if test="goodsCostAmount != null">
        #{goodsCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundGoodsCostAmount != null">
        #{refundGoodsCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="goodsTransportAmount != null">
        #{goodsTransportAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundGoodsTransportAmount != null">
        #{refundGoodsTransportAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingOrderCostAmount != null">
        #{accountingOrderCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingOrderCostAmountWithFreight != null">
        #{accountingOrderCostAmountWithFreight,jdbcType=DECIMAL},
      </if>
      <if test="serviceNo != null">
        #{serviceNo,jdbcType=VARCHAR},
      </if>
      <if test="sourceFrom != null">
        #{sourceFrom,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.supplier.AccountingUnifiedSupplierExample" resultType="java.lang.Long">
    select count(*) from accounting_unified_supplier
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update accounting_unified_supplier
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.dimCreateBy != null">
        dim_create_by = #{record.dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="record.accountingOrderSn != null">
        accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.accountingStatus != null">
        accounting_status = #{record.accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceStatus != null">
        invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceTitle != null">
        invoice_title = #{record.invoiceTitle,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceType != null">
        invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      </if>
      <if test="record.taxCode != null">
        tax_code = #{record.taxCode,jdbcType=VARCHAR},
      </if>
      <if test="record.address != null">
        address = #{record.address,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.isSendEmail != null">
        is_send_email = #{record.isSendEmail,jdbcType=TINYINT},
      </if>
      <if test="record.sendEmailTime != null">
        send_email_time = #{record.sendEmailTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.startTime != null">
        start_time = #{record.startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.endTime != null">
        end_time = #{record.endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.backAccountStatus != null">
        back_account_status = #{record.backAccountStatus,jdbcType=TINYINT},
      </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.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.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceApplyStatus != null">
        invoice_apply_status = #{record.invoiceApplyStatus,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceApplyUserId != null">
        invoice_apply_user_id = #{record.invoiceApplyUserId,jdbcType=BIGINT},
      </if>
      <if test="record.invoiceApplyTime != null">
        invoice_apply_time = #{record.invoiceApplyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.invoiceApplyModeRecord != null">
        invoice_apply_mode_record = #{record.invoiceApplyModeRecord,jdbcType=TINYINT},
      </if>
      <if test="record.orderQuantity != null">
        order_quantity = #{record.orderQuantity,jdbcType=INTEGER},
      </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.orderAmount != null">
        order_amount = #{record.orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.refundOrderAmount != null">
        refund_order_amount = #{record.refundOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.goodsAmount != null">
        goods_amount = #{record.goodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.refundGoodsAmount != null">
        refund_goods_amount = #{record.refundGoodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.orderCostAmount != null">
        order_cost_amount = #{record.orderCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.refundOrderCostAmount != null">
        refund_order_cost_amount = #{record.refundOrderCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.accountingOrderAmount != null">
        accounting_order_amount = #{record.accountingOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.accountingOrderAmountWithFreight != null">
        accounting_order_amount_with_freight = #{record.accountingOrderAmountWithFreight,jdbcType=DECIMAL},
      </if>
      <if test="record.needReviseMark != null">
        need_revise_mark = #{record.needReviseMark,jdbcType=TINYINT},
      </if>
      <if test="record.goodsCostAmount != null">
        goods_cost_amount = #{record.goodsCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.refundGoodsCostAmount != null">
        refund_goods_cost_amount = #{record.refundGoodsCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.goodsTransportAmount != null">
        goods_transport_amount = #{record.goodsTransportAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.refundGoodsTransportAmount != null">
        refund_goods_transport_amount = #{record.refundGoodsTransportAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.accountingOrderCostAmount != null">
        accounting_order_cost_amount = #{record.accountingOrderCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.accountingOrderCostAmountWithFreight != null">
        accounting_order_cost_amount_with_freight = #{record.accountingOrderCostAmountWithFreight,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>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update accounting_unified_supplier
    set id = #{record.id,jdbcType=BIGINT},
      dim_create_by = #{record.dimCreateBy,jdbcType=TINYINT},
      accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      accounting_status = #{record.accountingStatus,jdbcType=TINYINT},
      invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      invoice_title = #{record.invoiceTitle,jdbcType=VARCHAR},
      invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      tax_code = #{record.taxCode,jdbcType=VARCHAR},
      address = #{record.address,jdbcType=VARCHAR},
      sale_id = #{record.saleId,jdbcType=BIGINT},
      sale_name = #{record.saleName,jdbcType=VARCHAR},
      is_send_email = #{record.isSendEmail,jdbcType=TINYINT},
      send_email_time = #{record.sendEmailTime,jdbcType=TIMESTAMP},
      start_time = #{record.startTime,jdbcType=TIMESTAMP},
      end_time = #{record.endTime,jdbcType=TIMESTAMP},
      back_account_status = #{record.backAccountStatus,jdbcType=TINYINT},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_user_id = #{record.createUserId,jdbcType=BIGINT},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{record.updateUserId,jdbcType=BIGINT},
      remark = #{record.remark,jdbcType=VARCHAR},
      invoice_apply_status = #{record.invoiceApplyStatus,jdbcType=TINYINT},
      invoice_apply_user_id = #{record.invoiceApplyUserId,jdbcType=BIGINT},
      invoice_apply_time = #{record.invoiceApplyTime,jdbcType=TIMESTAMP},
      invoice_apply_mode_record = #{record.invoiceApplyModeRecord,jdbcType=TINYINT},
      order_quantity = #{record.orderQuantity,jdbcType=INTEGER},
      goods_quantity = #{record.goodsQuantity,jdbcType=INTEGER},
      goods_item_quantity = #{record.goodsItemQuantity,jdbcType=INTEGER},
      order_amount = #{record.orderAmount,jdbcType=DECIMAL},
      refund_order_amount = #{record.refundOrderAmount,jdbcType=DECIMAL},
      goods_amount = #{record.goodsAmount,jdbcType=DECIMAL},
      refund_goods_amount = #{record.refundGoodsAmount,jdbcType=DECIMAL},
      order_cost_amount = #{record.orderCostAmount,jdbcType=DECIMAL},
      refund_order_cost_amount = #{record.refundOrderCostAmount,jdbcType=DECIMAL},
      accounting_order_amount = #{record.accountingOrderAmount,jdbcType=DECIMAL},
      accounting_order_amount_with_freight = #{record.accountingOrderAmountWithFreight,jdbcType=DECIMAL},
      need_revise_mark = #{record.needReviseMark,jdbcType=TINYINT},
      goods_cost_amount = #{record.goodsCostAmount,jdbcType=DECIMAL},
      refund_goods_cost_amount = #{record.refundGoodsCostAmount,jdbcType=DECIMAL},
      goods_transport_amount = #{record.goodsTransportAmount,jdbcType=DECIMAL},
      refund_goods_transport_amount = #{record.refundGoodsTransportAmount,jdbcType=DECIMAL},
      accounting_order_cost_amount = #{record.accountingOrderCostAmount,jdbcType=DECIMAL},
      accounting_order_cost_amount_with_freight = #{record.accountingOrderCostAmountWithFreight,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.accounting.unified.supplier.AccountingUnifiedSupplier">
    update accounting_unified_supplier
    <set>
      <if test="dimCreateBy != null">
        dim_create_by = #{dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="accountingOrderSn != null">
        accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="accountingStatus != null">
        accounting_status = #{accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceStatus != null">
        invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceTitle != null">
        invoice_title = #{invoiceTitle,jdbcType=VARCHAR},
      </if>
      <if test="invoiceType != null">
        invoice_type = #{invoiceType,jdbcType=TINYINT},
      </if>
      <if test="taxCode != null">
        tax_code = #{taxCode,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        address = #{address,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="isSendEmail != null">
        is_send_email = #{isSendEmail,jdbcType=TINYINT},
      </if>
      <if test="sendEmailTime != null">
        send_email_time = #{sendEmailTime,jdbcType=TIMESTAMP},
      </if>
      <if test="startTime != null">
        start_time = #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="backAccountStatus != null">
        back_account_status = #{backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        create_user_id = #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        update_user_id = #{updateUserId,jdbcType=BIGINT},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="invoiceApplyStatus != null">
        invoice_apply_status = #{invoiceApplyStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceApplyUserId != null">
        invoice_apply_user_id = #{invoiceApplyUserId,jdbcType=BIGINT},
      </if>
      <if test="invoiceApplyTime != null">
        invoice_apply_time = #{invoiceApplyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="invoiceApplyModeRecord != null">
        invoice_apply_mode_record = #{invoiceApplyModeRecord,jdbcType=TINYINT},
      </if>
      <if test="orderQuantity != null">
        order_quantity = #{orderQuantity,jdbcType=INTEGER},
      </if>
      <if test="goodsQuantity != null">
        goods_quantity = #{goodsQuantity,jdbcType=INTEGER},
      </if>
      <if test="goodsItemQuantity != null">
        goods_item_quantity = #{goodsItemQuantity,jdbcType=INTEGER},
      </if>
      <if test="orderAmount != null">
        order_amount = #{orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundOrderAmount != null">
        refund_order_amount = #{refundOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="goodsAmount != null">
        goods_amount = #{goodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundGoodsAmount != null">
        refund_goods_amount = #{refundGoodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderCostAmount != null">
        order_cost_amount = #{orderCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundOrderCostAmount != null">
        refund_order_cost_amount = #{refundOrderCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingOrderAmount != null">
        accounting_order_amount = #{accountingOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingOrderAmountWithFreight != null">
        accounting_order_amount_with_freight = #{accountingOrderAmountWithFreight,jdbcType=DECIMAL},
      </if>
      <if test="needReviseMark != null">
        need_revise_mark = #{needReviseMark,jdbcType=TINYINT},
      </if>
      <if test="goodsCostAmount != null">
        goods_cost_amount = #{goodsCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundGoodsCostAmount != null">
        refund_goods_cost_amount = #{refundGoodsCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="goodsTransportAmount != null">
        goods_transport_amount = #{goodsTransportAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundGoodsTransportAmount != null">
        refund_goods_transport_amount = #{refundGoodsTransportAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingOrderCostAmount != null">
        accounting_order_cost_amount = #{accountingOrderCostAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingOrderCostAmountWithFreight != null">
        accounting_order_cost_amount_with_freight = #{accountingOrderCostAmountWithFreight,jdbcType=DECIMAL},
      </if>
      <if test="serviceNo != null">
        service_no = #{serviceNo,jdbcType=VARCHAR},
      </if>
      <if test="sourceFrom != null">
        source_from = #{sourceFrom,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.supplier.AccountingUnifiedSupplier">
    update accounting_unified_supplier
    set dim_create_by = #{dimCreateBy,jdbcType=TINYINT},
      accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      accounting_status = #{accountingStatus,jdbcType=TINYINT},
      invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      invoice_title = #{invoiceTitle,jdbcType=VARCHAR},
      invoice_type = #{invoiceType,jdbcType=TINYINT},
      tax_code = #{taxCode,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR},
      sale_id = #{saleId,jdbcType=BIGINT},
      sale_name = #{saleName,jdbcType=VARCHAR},
      is_send_email = #{isSendEmail,jdbcType=TINYINT},
      send_email_time = #{sendEmailTime,jdbcType=TIMESTAMP},
      start_time = #{startTime,jdbcType=TIMESTAMP},
      end_time = #{endTime,jdbcType=TIMESTAMP},
      back_account_status = #{backAccountStatus,jdbcType=TINYINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      remark = #{remark,jdbcType=VARCHAR},
      invoice_apply_status = #{invoiceApplyStatus,jdbcType=TINYINT},
      invoice_apply_user_id = #{invoiceApplyUserId,jdbcType=BIGINT},
      invoice_apply_time = #{invoiceApplyTime,jdbcType=TIMESTAMP},
      invoice_apply_mode_record = #{invoiceApplyModeRecord,jdbcType=TINYINT},
      order_quantity = #{orderQuantity,jdbcType=INTEGER},
      goods_quantity = #{goodsQuantity,jdbcType=INTEGER},
      goods_item_quantity = #{goodsItemQuantity,jdbcType=INTEGER},
      order_amount = #{orderAmount,jdbcType=DECIMAL},
      refund_order_amount = #{refundOrderAmount,jdbcType=DECIMAL},
      goods_amount = #{goodsAmount,jdbcType=DECIMAL},
      refund_goods_amount = #{refundGoodsAmount,jdbcType=DECIMAL},
      order_cost_amount = #{orderCostAmount,jdbcType=DECIMAL},
      refund_order_cost_amount = #{refundOrderCostAmount,jdbcType=DECIMAL},
      accounting_order_amount = #{accountingOrderAmount,jdbcType=DECIMAL},
      accounting_order_amount_with_freight = #{accountingOrderAmountWithFreight,jdbcType=DECIMAL},
      need_revise_mark = #{needReviseMark,jdbcType=TINYINT},
      goods_cost_amount = #{goodsCostAmount,jdbcType=DECIMAL},
      refund_goods_cost_amount = #{refundGoodsCostAmount,jdbcType=DECIMAL},
      goods_transport_amount = #{goodsTransportAmount,jdbcType=DECIMAL},
      refund_goods_transport_amount = #{refundGoodsTransportAmount,jdbcType=DECIMAL},
      accounting_order_cost_amount = #{accountingOrderCostAmount,jdbcType=DECIMAL},
      accounting_order_cost_amount_with_freight = #{accountingOrderCostAmountWithFreight,jdbcType=DECIMAL},
      service_no = #{serviceNo,jdbcType=VARCHAR},
      source_from = #{sourceFrom,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>