<?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.operator.AccountingUnifiedOperatorMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.accounting.unified.operator.AccountingUnifiedOperator">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="accounting_order_sn" jdbcType="VARCHAR" property="accountingOrderSn" />
    <result column="accounting_status" jdbcType="TINYINT" property="accountingStatus" />
    <result column="customer_id" jdbcType="BIGINT" property="customerId" />
    <result column="customer_name" jdbcType="VARCHAR" property="customerName" />
    <result column="customer_code" jdbcType="VARCHAR" property="customerCode" />
    <result column="invoice_title_id" jdbcType="BIGINT" property="invoiceTitleId" />
    <result column="biz_personnel_id" jdbcType="BIGINT" property="bizPersonnelId" />
    <result column="biz_personnel_name" jdbcType="VARCHAR" property="bizPersonnelName" />
    <result column="biz_personnel_mobile" jdbcType="VARCHAR" property="bizPersonnelMobile" />
    <result column="settlement_plan_id" jdbcType="BIGINT" property="settlementPlanId" />
    <result column="start_time" jdbcType="DATE" property="startTime" />
    <result column="end_time" jdbcType="DATE" property="endTime" />
    <result column="rel_order_types" jdbcType="VARCHAR" property="relOrderTypes" />
    <result column="order_count" jdbcType="INTEGER" property="orderCount" />
    <result column="order_goods_count" jdbcType="INTEGER" property="orderGoodsCount" />
    <result column="order_credit_count" jdbcType="INTEGER" property="orderCreditCount" />
    <result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
    <result column="order_settlement_amoun" jdbcType="DECIMAL" property="orderSettlementAmoun" />
    <result column="order_non_settlement_amount" jdbcType="DECIMAL" property="orderNonSettlementAmount" />
    <result column="share_profit" jdbcType="DECIMAL" property="shareProfit" />
    <result column="service_charge" jdbcType="DECIMAL" property="serviceCharge" />
    <result column="accounting_amount" jdbcType="DECIMAL" property="accountingAmount" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="email_status" jdbcType="TINYINT" property="emailStatus" />
    <result column="cancel_reason" jdbcType="VARCHAR" property="cancelReason" />
    <result column="reject_reson" jdbcType="VARCHAR" property="rejectReson" />
    <result column="submit_user_id" jdbcType="BIGINT" property="submitUserId" />
    <result column="submit_time" jdbcType="TIMESTAMP" property="submitTime" />
    <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="deleted" jdbcType="TINYINT" property="deleted" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.superdesk.uniorder.dao.entity.accounting.unified.operator.AccountingUnifiedOperatorWithBLOBs">
    <result column="invoice_title_snapshot" jdbcType="LONGVARCHAR" property="invoiceTitleSnapshot" />
    <result column="settlement_plat_snapshot" jdbcType="LONGVARCHAR" property="settlementPlatSnapshot" />
    <result column="rel_operators" jdbcType="LONGVARCHAR" property="relOperators" />
    <result column="rel_projects" jdbcType="LONGVARCHAR" property="relProjects" />
  </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_sn, accounting_status, customer_id, customer_name, customer_code, 
    invoice_title_id, biz_personnel_id, biz_personnel_name, biz_personnel_mobile, settlement_plan_id, 
    start_time, end_time, rel_order_types, order_count, order_goods_count, order_credit_count, 
    order_amount, order_settlement_amoun, order_non_settlement_amount, share_profit, 
    service_charge, accounting_amount, remark, email_status, cancel_reason, reject_reson, 
    submit_user_id, submit_time, create_time, create_user_id, update_time, update_user_id, 
    deleted
  </sql>
  <sql id="Blob_Column_List">
    invoice_title_snapshot, settlement_plat_snapshot, rel_operators, rel_projects
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.operator.AccountingUnifiedOperatorExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from accounting_unified_operator
    <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.accounting.unified.operator.AccountingUnifiedOperatorExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from accounting_unified_operator
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from accounting_unified_operator
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from accounting_unified_operator
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.operator.AccountingUnifiedOperatorExample">
    delete from accounting_unified_operator
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.operator.AccountingUnifiedOperatorWithBLOBs">
    insert into accounting_unified_operator (id, accounting_order_sn, accounting_status, 
      customer_id, customer_name, customer_code, 
      invoice_title_id, biz_personnel_id, biz_personnel_name, 
      biz_personnel_mobile, settlement_plan_id, start_time, 
      end_time, rel_order_types, order_count, 
      order_goods_count, order_credit_count, order_amount, 
      order_settlement_amoun, order_non_settlement_amount, 
      share_profit, service_charge, accounting_amount, 
      remark, email_status, cancel_reason, 
      reject_reson, submit_user_id, submit_time, 
      create_time, create_user_id, update_time, 
      update_user_id, deleted, invoice_title_snapshot, 
      settlement_plat_snapshot, rel_operators, 
      rel_projects)
    values (#{id,jdbcType=BIGINT}, #{accountingOrderSn,jdbcType=VARCHAR}, #{accountingStatus,jdbcType=TINYINT}, 
      #{customerId,jdbcType=BIGINT}, #{customerName,jdbcType=VARCHAR}, #{customerCode,jdbcType=VARCHAR}, 
      #{invoiceTitleId,jdbcType=BIGINT}, #{bizPersonnelId,jdbcType=BIGINT}, #{bizPersonnelName,jdbcType=VARCHAR}, 
      #{bizPersonnelMobile,jdbcType=VARCHAR}, #{settlementPlanId,jdbcType=BIGINT}, #{startTime,jdbcType=DATE}, 
      #{endTime,jdbcType=DATE}, #{relOrderTypes,jdbcType=VARCHAR}, #{orderCount,jdbcType=INTEGER}, 
      #{orderGoodsCount,jdbcType=INTEGER}, #{orderCreditCount,jdbcType=INTEGER}, #{orderAmount,jdbcType=DECIMAL}, 
      #{orderSettlementAmoun,jdbcType=DECIMAL}, #{orderNonSettlementAmount,jdbcType=DECIMAL}, 
      #{shareProfit,jdbcType=DECIMAL}, #{serviceCharge,jdbcType=DECIMAL}, #{accountingAmount,jdbcType=DECIMAL}, 
      #{remark,jdbcType=VARCHAR}, #{emailStatus,jdbcType=TINYINT}, #{cancelReason,jdbcType=VARCHAR}, 
      #{rejectReson,jdbcType=VARCHAR}, #{submitUserId,jdbcType=BIGINT}, #{submitTime,jdbcType=TIMESTAMP}, 
      #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{updateUserId,jdbcType=BIGINT}, #{deleted,jdbcType=TINYINT}, #{invoiceTitleSnapshot,jdbcType=LONGVARCHAR}, 
      #{settlementPlatSnapshot,jdbcType=LONGVARCHAR}, #{relOperators,jdbcType=LONGVARCHAR}, 
      #{relProjects,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.operator.AccountingUnifiedOperatorWithBLOBs">
    insert into accounting_unified_operator
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="accountingOrderSn != null">
        accounting_order_sn,
      </if>
      <if test="accountingStatus != null">
        accounting_status,
      </if>
      <if test="customerId != null">
        customer_id,
      </if>
      <if test="customerName != null">
        customer_name,
      </if>
      <if test="customerCode != null">
        customer_code,
      </if>
      <if test="invoiceTitleId != null">
        invoice_title_id,
      </if>
      <if test="bizPersonnelId != null">
        biz_personnel_id,
      </if>
      <if test="bizPersonnelName != null">
        biz_personnel_name,
      </if>
      <if test="bizPersonnelMobile != null">
        biz_personnel_mobile,
      </if>
      <if test="settlementPlanId != null">
        settlement_plan_id,
      </if>
      <if test="startTime != null">
        start_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="relOrderTypes != null">
        rel_order_types,
      </if>
      <if test="orderCount != null">
        order_count,
      </if>
      <if test="orderGoodsCount != null">
        order_goods_count,
      </if>
      <if test="orderCreditCount != null">
        order_credit_count,
      </if>
      <if test="orderAmount != null">
        order_amount,
      </if>
      <if test="orderSettlementAmoun != null">
        order_settlement_amoun,
      </if>
      <if test="orderNonSettlementAmount != null">
        order_non_settlement_amount,
      </if>
      <if test="shareProfit != null">
        share_profit,
      </if>
      <if test="serviceCharge != null">
        service_charge,
      </if>
      <if test="accountingAmount != null">
        accounting_amount,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="emailStatus != null">
        email_status,
      </if>
      <if test="cancelReason != null">
        cancel_reason,
      </if>
      <if test="rejectReson != null">
        reject_reson,
      </if>
      <if test="submitUserId != null">
        submit_user_id,
      </if>
      <if test="submitTime != null">
        submit_time,
      </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="deleted != null">
        deleted,
      </if>
      <if test="invoiceTitleSnapshot != null">
        invoice_title_snapshot,
      </if>
      <if test="settlementPlatSnapshot != null">
        settlement_plat_snapshot,
      </if>
      <if test="relOperators != null">
        rel_operators,
      </if>
      <if test="relProjects != null">
        rel_projects,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="accountingOrderSn != null">
        #{accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="accountingStatus != null">
        #{accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="customerId != null">
        #{customerId,jdbcType=BIGINT},
      </if>
      <if test="customerName != null">
        #{customerName,jdbcType=VARCHAR},
      </if>
      <if test="customerCode != null">
        #{customerCode,jdbcType=VARCHAR},
      </if>
      <if test="invoiceTitleId != null">
        #{invoiceTitleId,jdbcType=BIGINT},
      </if>
      <if test="bizPersonnelId != null">
        #{bizPersonnelId,jdbcType=BIGINT},
      </if>
      <if test="bizPersonnelName != null">
        #{bizPersonnelName,jdbcType=VARCHAR},
      </if>
      <if test="bizPersonnelMobile != null">
        #{bizPersonnelMobile,jdbcType=VARCHAR},
      </if>
      <if test="settlementPlanId != null">
        #{settlementPlanId,jdbcType=BIGINT},
      </if>
      <if test="startTime != null">
        #{startTime,jdbcType=DATE},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=DATE},
      </if>
      <if test="relOrderTypes != null">
        #{relOrderTypes,jdbcType=VARCHAR},
      </if>
      <if test="orderCount != null">
        #{orderCount,jdbcType=INTEGER},
      </if>
      <if test="orderGoodsCount != null">
        #{orderGoodsCount,jdbcType=INTEGER},
      </if>
      <if test="orderCreditCount != null">
        #{orderCreditCount,jdbcType=INTEGER},
      </if>
      <if test="orderAmount != null">
        #{orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderSettlementAmoun != null">
        #{orderSettlementAmoun,jdbcType=DECIMAL},
      </if>
      <if test="orderNonSettlementAmount != null">
        #{orderNonSettlementAmount,jdbcType=DECIMAL},
      </if>
      <if test="shareProfit != null">
        #{shareProfit,jdbcType=DECIMAL},
      </if>
      <if test="serviceCharge != null">
        #{serviceCharge,jdbcType=DECIMAL},
      </if>
      <if test="accountingAmount != null">
        #{accountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="emailStatus != null">
        #{emailStatus,jdbcType=TINYINT},
      </if>
      <if test="cancelReason != null">
        #{cancelReason,jdbcType=VARCHAR},
      </if>
      <if test="rejectReson != null">
        #{rejectReson,jdbcType=VARCHAR},
      </if>
      <if test="submitUserId != null">
        #{submitUserId,jdbcType=BIGINT},
      </if>
      <if test="submitTime != null">
        #{submitTime,jdbcType=TIMESTAMP},
      </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="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
      <if test="invoiceTitleSnapshot != null">
        #{invoiceTitleSnapshot,jdbcType=LONGVARCHAR},
      </if>
      <if test="settlementPlatSnapshot != null">
        #{settlementPlatSnapshot,jdbcType=LONGVARCHAR},
      </if>
      <if test="relOperators != null">
        #{relOperators,jdbcType=LONGVARCHAR},
      </if>
      <if test="relProjects != null">
        #{relProjects,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.operator.AccountingUnifiedOperatorExample" resultType="java.lang.Long">
    select count(*) from accounting_unified_operator
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update accounting_unified_operator
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </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.customerId != null">
        customer_id = #{record.customerId,jdbcType=BIGINT},
      </if>
      <if test="record.customerName != null">
        customer_name = #{record.customerName,jdbcType=VARCHAR},
      </if>
      <if test="record.customerCode != null">
        customer_code = #{record.customerCode,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceTitleId != null">
        invoice_title_id = #{record.invoiceTitleId,jdbcType=BIGINT},
      </if>
      <if test="record.bizPersonnelId != null">
        biz_personnel_id = #{record.bizPersonnelId,jdbcType=BIGINT},
      </if>
      <if test="record.bizPersonnelName != null">
        biz_personnel_name = #{record.bizPersonnelName,jdbcType=VARCHAR},
      </if>
      <if test="record.bizPersonnelMobile != null">
        biz_personnel_mobile = #{record.bizPersonnelMobile,jdbcType=VARCHAR},
      </if>
      <if test="record.settlementPlanId != null">
        settlement_plan_id = #{record.settlementPlanId,jdbcType=BIGINT},
      </if>
      <if test="record.startTime != null">
        start_time = #{record.startTime,jdbcType=DATE},
      </if>
      <if test="record.endTime != null">
        end_time = #{record.endTime,jdbcType=DATE},
      </if>
      <if test="record.relOrderTypes != null">
        rel_order_types = #{record.relOrderTypes,jdbcType=VARCHAR},
      </if>
      <if test="record.orderCount != null">
        order_count = #{record.orderCount,jdbcType=INTEGER},
      </if>
      <if test="record.orderGoodsCount != null">
        order_goods_count = #{record.orderGoodsCount,jdbcType=INTEGER},
      </if>
      <if test="record.orderCreditCount != null">
        order_credit_count = #{record.orderCreditCount,jdbcType=INTEGER},
      </if>
      <if test="record.orderAmount != null">
        order_amount = #{record.orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.orderSettlementAmoun != null">
        order_settlement_amoun = #{record.orderSettlementAmoun,jdbcType=DECIMAL},
      </if>
      <if test="record.orderNonSettlementAmount != null">
        order_non_settlement_amount = #{record.orderNonSettlementAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.shareProfit != null">
        share_profit = #{record.shareProfit,jdbcType=DECIMAL},
      </if>
      <if test="record.serviceCharge != null">
        service_charge = #{record.serviceCharge,jdbcType=DECIMAL},
      </if>
      <if test="record.accountingAmount != null">
        accounting_amount = #{record.accountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.emailStatus != null">
        email_status = #{record.emailStatus,jdbcType=TINYINT},
      </if>
      <if test="record.cancelReason != null">
        cancel_reason = #{record.cancelReason,jdbcType=VARCHAR},
      </if>
      <if test="record.rejectReson != null">
        reject_reson = #{record.rejectReson,jdbcType=VARCHAR},
      </if>
      <if test="record.submitUserId != null">
        submit_user_id = #{record.submitUserId,jdbcType=BIGINT},
      </if>
      <if test="record.submitTime != null">
        submit_time = #{record.submitTime,jdbcType=TIMESTAMP},
      </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.deleted != null">
        deleted = #{record.deleted,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceTitleSnapshot != null">
        invoice_title_snapshot = #{record.invoiceTitleSnapshot,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.settlementPlatSnapshot != null">
        settlement_plat_snapshot = #{record.settlementPlatSnapshot,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.relOperators != null">
        rel_operators = #{record.relOperators,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.relProjects != null">
        rel_projects = #{record.relProjects,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update accounting_unified_operator
    set id = #{record.id,jdbcType=BIGINT},
      accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      accounting_status = #{record.accountingStatus,jdbcType=TINYINT},
      customer_id = #{record.customerId,jdbcType=BIGINT},
      customer_name = #{record.customerName,jdbcType=VARCHAR},
      customer_code = #{record.customerCode,jdbcType=VARCHAR},
      invoice_title_id = #{record.invoiceTitleId,jdbcType=BIGINT},
      biz_personnel_id = #{record.bizPersonnelId,jdbcType=BIGINT},
      biz_personnel_name = #{record.bizPersonnelName,jdbcType=VARCHAR},
      biz_personnel_mobile = #{record.bizPersonnelMobile,jdbcType=VARCHAR},
      settlement_plan_id = #{record.settlementPlanId,jdbcType=BIGINT},
      start_time = #{record.startTime,jdbcType=DATE},
      end_time = #{record.endTime,jdbcType=DATE},
      rel_order_types = #{record.relOrderTypes,jdbcType=VARCHAR},
      order_count = #{record.orderCount,jdbcType=INTEGER},
      order_goods_count = #{record.orderGoodsCount,jdbcType=INTEGER},
      order_credit_count = #{record.orderCreditCount,jdbcType=INTEGER},
      order_amount = #{record.orderAmount,jdbcType=DECIMAL},
      order_settlement_amoun = #{record.orderSettlementAmoun,jdbcType=DECIMAL},
      order_non_settlement_amount = #{record.orderNonSettlementAmount,jdbcType=DECIMAL},
      share_profit = #{record.shareProfit,jdbcType=DECIMAL},
      service_charge = #{record.serviceCharge,jdbcType=DECIMAL},
      accounting_amount = #{record.accountingAmount,jdbcType=DECIMAL},
      remark = #{record.remark,jdbcType=VARCHAR},
      email_status = #{record.emailStatus,jdbcType=TINYINT},
      cancel_reason = #{record.cancelReason,jdbcType=VARCHAR},
      reject_reson = #{record.rejectReson,jdbcType=VARCHAR},
      submit_user_id = #{record.submitUserId,jdbcType=BIGINT},
      submit_time = #{record.submitTime,jdbcType=TIMESTAMP},
      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},
      deleted = #{record.deleted,jdbcType=TINYINT},
      invoice_title_snapshot = #{record.invoiceTitleSnapshot,jdbcType=LONGVARCHAR},
      settlement_plat_snapshot = #{record.settlementPlatSnapshot,jdbcType=LONGVARCHAR},
      rel_operators = #{record.relOperators,jdbcType=LONGVARCHAR},
      rel_projects = #{record.relProjects,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update accounting_unified_operator
    set id = #{record.id,jdbcType=BIGINT},
      accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      accounting_status = #{record.accountingStatus,jdbcType=TINYINT},
      customer_id = #{record.customerId,jdbcType=BIGINT},
      customer_name = #{record.customerName,jdbcType=VARCHAR},
      customer_code = #{record.customerCode,jdbcType=VARCHAR},
      invoice_title_id = #{record.invoiceTitleId,jdbcType=BIGINT},
      biz_personnel_id = #{record.bizPersonnelId,jdbcType=BIGINT},
      biz_personnel_name = #{record.bizPersonnelName,jdbcType=VARCHAR},
      biz_personnel_mobile = #{record.bizPersonnelMobile,jdbcType=VARCHAR},
      settlement_plan_id = #{record.settlementPlanId,jdbcType=BIGINT},
      start_time = #{record.startTime,jdbcType=DATE},
      end_time = #{record.endTime,jdbcType=DATE},
      rel_order_types = #{record.relOrderTypes,jdbcType=VARCHAR},
      order_count = #{record.orderCount,jdbcType=INTEGER},
      order_goods_count = #{record.orderGoodsCount,jdbcType=INTEGER},
      order_credit_count = #{record.orderCreditCount,jdbcType=INTEGER},
      order_amount = #{record.orderAmount,jdbcType=DECIMAL},
      order_settlement_amoun = #{record.orderSettlementAmoun,jdbcType=DECIMAL},
      order_non_settlement_amount = #{record.orderNonSettlementAmount,jdbcType=DECIMAL},
      share_profit = #{record.shareProfit,jdbcType=DECIMAL},
      service_charge = #{record.serviceCharge,jdbcType=DECIMAL},
      accounting_amount = #{record.accountingAmount,jdbcType=DECIMAL},
      remark = #{record.remark,jdbcType=VARCHAR},
      email_status = #{record.emailStatus,jdbcType=TINYINT},
      cancel_reason = #{record.cancelReason,jdbcType=VARCHAR},
      reject_reson = #{record.rejectReson,jdbcType=VARCHAR},
      submit_user_id = #{record.submitUserId,jdbcType=BIGINT},
      submit_time = #{record.submitTime,jdbcType=TIMESTAMP},
      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},
      deleted = #{record.deleted,jdbcType=TINYINT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.operator.AccountingUnifiedOperatorWithBLOBs">
    update accounting_unified_operator
    <set>
      <if test="accountingOrderSn != null">
        accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="accountingStatus != null">
        accounting_status = #{accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="customerId != null">
        customer_id = #{customerId,jdbcType=BIGINT},
      </if>
      <if test="customerName != null">
        customer_name = #{customerName,jdbcType=VARCHAR},
      </if>
      <if test="customerCode != null">
        customer_code = #{customerCode,jdbcType=VARCHAR},
      </if>
      <if test="invoiceTitleId != null">
        invoice_title_id = #{invoiceTitleId,jdbcType=BIGINT},
      </if>
      <if test="bizPersonnelId != null">
        biz_personnel_id = #{bizPersonnelId,jdbcType=BIGINT},
      </if>
      <if test="bizPersonnelName != null">
        biz_personnel_name = #{bizPersonnelName,jdbcType=VARCHAR},
      </if>
      <if test="bizPersonnelMobile != null">
        biz_personnel_mobile = #{bizPersonnelMobile,jdbcType=VARCHAR},
      </if>
      <if test="settlementPlanId != null">
        settlement_plan_id = #{settlementPlanId,jdbcType=BIGINT},
      </if>
      <if test="startTime != null">
        start_time = #{startTime,jdbcType=DATE},
      </if>
      <if test="endTime != null">
        end_time = #{endTime,jdbcType=DATE},
      </if>
      <if test="relOrderTypes != null">
        rel_order_types = #{relOrderTypes,jdbcType=VARCHAR},
      </if>
      <if test="orderCount != null">
        order_count = #{orderCount,jdbcType=INTEGER},
      </if>
      <if test="orderGoodsCount != null">
        order_goods_count = #{orderGoodsCount,jdbcType=INTEGER},
      </if>
      <if test="orderCreditCount != null">
        order_credit_count = #{orderCreditCount,jdbcType=INTEGER},
      </if>
      <if test="orderAmount != null">
        order_amount = #{orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderSettlementAmoun != null">
        order_settlement_amoun = #{orderSettlementAmoun,jdbcType=DECIMAL},
      </if>
      <if test="orderNonSettlementAmount != null">
        order_non_settlement_amount = #{orderNonSettlementAmount,jdbcType=DECIMAL},
      </if>
      <if test="shareProfit != null">
        share_profit = #{shareProfit,jdbcType=DECIMAL},
      </if>
      <if test="serviceCharge != null">
        service_charge = #{serviceCharge,jdbcType=DECIMAL},
      </if>
      <if test="accountingAmount != null">
        accounting_amount = #{accountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="emailStatus != null">
        email_status = #{emailStatus,jdbcType=TINYINT},
      </if>
      <if test="cancelReason != null">
        cancel_reason = #{cancelReason,jdbcType=VARCHAR},
      </if>
      <if test="rejectReson != null">
        reject_reson = #{rejectReson,jdbcType=VARCHAR},
      </if>
      <if test="submitUserId != null">
        submit_user_id = #{submitUserId,jdbcType=BIGINT},
      </if>
      <if test="submitTime != null">
        submit_time = #{submitTime,jdbcType=TIMESTAMP},
      </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="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
      <if test="invoiceTitleSnapshot != null">
        invoice_title_snapshot = #{invoiceTitleSnapshot,jdbcType=LONGVARCHAR},
      </if>
      <if test="settlementPlatSnapshot != null">
        settlement_plat_snapshot = #{settlementPlatSnapshot,jdbcType=LONGVARCHAR},
      </if>
      <if test="relOperators != null">
        rel_operators = #{relOperators,jdbcType=LONGVARCHAR},
      </if>
      <if test="relProjects != null">
        rel_projects = #{relProjects,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.operator.AccountingUnifiedOperatorWithBLOBs">
    update accounting_unified_operator
    set accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      accounting_status = #{accountingStatus,jdbcType=TINYINT},
      customer_id = #{customerId,jdbcType=BIGINT},
      customer_name = #{customerName,jdbcType=VARCHAR},
      customer_code = #{customerCode,jdbcType=VARCHAR},
      invoice_title_id = #{invoiceTitleId,jdbcType=BIGINT},
      biz_personnel_id = #{bizPersonnelId,jdbcType=BIGINT},
      biz_personnel_name = #{bizPersonnelName,jdbcType=VARCHAR},
      biz_personnel_mobile = #{bizPersonnelMobile,jdbcType=VARCHAR},
      settlement_plan_id = #{settlementPlanId,jdbcType=BIGINT},
      start_time = #{startTime,jdbcType=DATE},
      end_time = #{endTime,jdbcType=DATE},
      rel_order_types = #{relOrderTypes,jdbcType=VARCHAR},
      order_count = #{orderCount,jdbcType=INTEGER},
      order_goods_count = #{orderGoodsCount,jdbcType=INTEGER},
      order_credit_count = #{orderCreditCount,jdbcType=INTEGER},
      order_amount = #{orderAmount,jdbcType=DECIMAL},
      order_settlement_amoun = #{orderSettlementAmoun,jdbcType=DECIMAL},
      order_non_settlement_amount = #{orderNonSettlementAmount,jdbcType=DECIMAL},
      share_profit = #{shareProfit,jdbcType=DECIMAL},
      service_charge = #{serviceCharge,jdbcType=DECIMAL},
      accounting_amount = #{accountingAmount,jdbcType=DECIMAL},
      remark = #{remark,jdbcType=VARCHAR},
      email_status = #{emailStatus,jdbcType=TINYINT},
      cancel_reason = #{cancelReason,jdbcType=VARCHAR},
      reject_reson = #{rejectReson,jdbcType=VARCHAR},
      submit_user_id = #{submitUserId,jdbcType=BIGINT},
      submit_time = #{submitTime,jdbcType=TIMESTAMP},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      deleted = #{deleted,jdbcType=TINYINT},
      invoice_title_snapshot = #{invoiceTitleSnapshot,jdbcType=LONGVARCHAR},
      settlement_plat_snapshot = #{settlementPlatSnapshot,jdbcType=LONGVARCHAR},
      rel_operators = #{relOperators,jdbcType=LONGVARCHAR},
      rel_projects = #{relProjects,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.operator.AccountingUnifiedOperator">
    update accounting_unified_operator
    set accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      accounting_status = #{accountingStatus,jdbcType=TINYINT},
      customer_id = #{customerId,jdbcType=BIGINT},
      customer_name = #{customerName,jdbcType=VARCHAR},
      customer_code = #{customerCode,jdbcType=VARCHAR},
      invoice_title_id = #{invoiceTitleId,jdbcType=BIGINT},
      biz_personnel_id = #{bizPersonnelId,jdbcType=BIGINT},
      biz_personnel_name = #{bizPersonnelName,jdbcType=VARCHAR},
      biz_personnel_mobile = #{bizPersonnelMobile,jdbcType=VARCHAR},
      settlement_plan_id = #{settlementPlanId,jdbcType=BIGINT},
      start_time = #{startTime,jdbcType=DATE},
      end_time = #{endTime,jdbcType=DATE},
      rel_order_types = #{relOrderTypes,jdbcType=VARCHAR},
      order_count = #{orderCount,jdbcType=INTEGER},
      order_goods_count = #{orderGoodsCount,jdbcType=INTEGER},
      order_credit_count = #{orderCreditCount,jdbcType=INTEGER},
      order_amount = #{orderAmount,jdbcType=DECIMAL},
      order_settlement_amoun = #{orderSettlementAmoun,jdbcType=DECIMAL},
      order_non_settlement_amount = #{orderNonSettlementAmount,jdbcType=DECIMAL},
      share_profit = #{shareProfit,jdbcType=DECIMAL},
      service_charge = #{serviceCharge,jdbcType=DECIMAL},
      accounting_amount = #{accountingAmount,jdbcType=DECIMAL},
      remark = #{remark,jdbcType=VARCHAR},
      email_status = #{emailStatus,jdbcType=TINYINT},
      cancel_reason = #{cancelReason,jdbcType=VARCHAR},
      reject_reson = #{rejectReson,jdbcType=VARCHAR},
      submit_user_id = #{submitUserId,jdbcType=BIGINT},
      submit_time = #{submitTime,jdbcType=TIMESTAMP},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      deleted = #{deleted,jdbcType=TINYINT}
    where id = #{id,jdbcType=BIGINT}
  </update>

</mapper>