<?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.customer.AccountingUnifiedCustomerMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomer">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="dim_create_by" jdbcType="TINYINT" property="dimCreateBy" />
    <result column="logic_mode" jdbcType="TINYINT" property="logicMode" />
    <result column="accounting_order_sn" jdbcType="VARCHAR" property="accountingOrderSn" />
    <result column="service_no" jdbcType="VARCHAR" property="serviceNo" />
    <result column="source_from" jdbcType="VARCHAR" property="sourceFrom" />
    <result column="cycle_begin_time" jdbcType="TIMESTAMP" property="cycleBeginTime" />
    <result column="cycle_end_time" jdbcType="TIMESTAMP" property="cycleEndTime" />
    <result column="accounting_amount" jdbcType="DECIMAL" property="accountingAmount" />
    <result column="quantity_order" jdbcType="INTEGER" property="quantityOrder" />
    <result column="quantity_goods" jdbcType="INTEGER" property="quantityGoods" />
    <result column="purchase_user_id" jdbcType="BIGINT" property="purchaseUserId" />
    <result column="purchase_user_name" jdbcType="VARCHAR" property="purchaseUserName" />
    <result column="purchase_phone" jdbcType="VARCHAR" property="purchasePhone" />
    <result column="purchase_address" jdbcType="VARCHAR" property="purchaseAddress" />
    <result column="accounting_status" jdbcType="TINYINT" property="accountingStatus" />
    <result column="invoice_status" jdbcType="TINYINT" property="invoiceStatus" />
    <result column="invoice_type" jdbcType="TINYINT" property="invoiceType" />
    <result column="enterprise_id" jdbcType="BIGINT" property="enterpriseId" />
    <result column="invoice_company_name" jdbcType="VARCHAR" property="invoiceCompanyName" />
    <result column="invoice_taxpayers_i_d_code" jdbcType="VARCHAR" property="invoiceTaxpayersIDCode" />
    <result column="is_send_email" jdbcType="TINYINT" property="isSendEmail" />
    <result column="send_email_time" jdbcType="TIMESTAMP" property="sendEmailTime" />
    <result column="date_type" jdbcType="TINYINT" property="dateType" />
    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
    <result column="bank_info_id" jdbcType="BIGINT" property="bankInfoId" />
    <result column="back_account_status" jdbcType="TINYINT" property="backAccountStatus" />
    <result column="pay_type" jdbcType="TINYINT" property="payType" />
    <result column="pay_status" jdbcType="TINYINT" property="payStatus" />
    <result column="wx_qrcode_imgurl" jdbcType="VARCHAR" property="wxQrcodeImgurl" />
    <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" />
  </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, logic_mode, accounting_order_sn, service_no, source_from, cycle_begin_time, 
    cycle_end_time, accounting_amount, quantity_order, quantity_goods, purchase_user_id, 
    purchase_user_name, purchase_phone, purchase_address, accounting_status, invoice_status, 
    invoice_type, enterprise_id, invoice_company_name, invoice_taxpayers_i_d_code, is_send_email, 
    send_email_time, date_type, start_time, end_time, bank_info_id, back_account_status, 
    pay_type, pay_status, wx_qrcode_imgurl, create_time, create_user_id, update_time, 
    update_user_id, remark
  </sql>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomerExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from accounting_unified_customer
    <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_customer
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from accounting_unified_customer
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomerExample">
    delete from accounting_unified_customer
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomer">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into accounting_unified_customer (dim_create_by, logic_mode, accounting_order_sn, 
      service_no, source_from, cycle_begin_time, 
      cycle_end_time, accounting_amount, quantity_order, 
      quantity_goods, purchase_user_id, purchase_user_name, 
      purchase_phone, purchase_address, accounting_status, 
      invoice_status, invoice_type, enterprise_id, 
      invoice_company_name, invoice_taxpayers_i_d_code, 
      is_send_email, send_email_time, date_type, 
      start_time, end_time, bank_info_id, 
      back_account_status, pay_type, pay_status, 
      wx_qrcode_imgurl, create_time, create_user_id, 
      update_time, update_user_id, remark
      )
    values (#{dimCreateBy,jdbcType=TINYINT}, #{logicMode,jdbcType=TINYINT}, #{accountingOrderSn,jdbcType=VARCHAR}, 
      #{serviceNo,jdbcType=VARCHAR}, #{sourceFrom,jdbcType=VARCHAR}, #{cycleBeginTime,jdbcType=TIMESTAMP}, 
      #{cycleEndTime,jdbcType=TIMESTAMP}, #{accountingAmount,jdbcType=DECIMAL}, #{quantityOrder,jdbcType=INTEGER}, 
      #{quantityGoods,jdbcType=INTEGER}, #{purchaseUserId,jdbcType=BIGINT}, #{purchaseUserName,jdbcType=VARCHAR}, 
      #{purchasePhone,jdbcType=VARCHAR}, #{purchaseAddress,jdbcType=VARCHAR}, #{accountingStatus,jdbcType=TINYINT}, 
      #{invoiceStatus,jdbcType=TINYINT}, #{invoiceType,jdbcType=TINYINT}, #{enterpriseId,jdbcType=BIGINT}, 
      #{invoiceCompanyName,jdbcType=VARCHAR}, #{invoiceTaxpayersIDCode,jdbcType=VARCHAR}, 
      #{isSendEmail,jdbcType=TINYINT}, #{sendEmailTime,jdbcType=TIMESTAMP}, #{dateType,jdbcType=TINYINT}, 
      #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{bankInfoId,jdbcType=BIGINT}, 
      #{backAccountStatus,jdbcType=TINYINT}, #{payType,jdbcType=TINYINT}, #{payStatus,jdbcType=TINYINT}, 
      #{wxQrcodeImgurl,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=BIGINT}, #{remark,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomer">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into accounting_unified_customer
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="dimCreateBy != null">
        dim_create_by,
      </if>
      <if test="logicMode != null">
        logic_mode,
      </if>
      <if test="accountingOrderSn != null">
        accounting_order_sn,
      </if>
      <if test="serviceNo != null">
        service_no,
      </if>
      <if test="sourceFrom != null">
        source_from,
      </if>
      <if test="cycleBeginTime != null">
        cycle_begin_time,
      </if>
      <if test="cycleEndTime != null">
        cycle_end_time,
      </if>
      <if test="accountingAmount != null">
        accounting_amount,
      </if>
      <if test="quantityOrder != null">
        quantity_order,
      </if>
      <if test="quantityGoods != null">
        quantity_goods,
      </if>
      <if test="purchaseUserId != null">
        purchase_user_id,
      </if>
      <if test="purchaseUserName != null">
        purchase_user_name,
      </if>
      <if test="purchasePhone != null">
        purchase_phone,
      </if>
      <if test="purchaseAddress != null">
        purchase_address,
      </if>
      <if test="accountingStatus != null">
        accounting_status,
      </if>
      <if test="invoiceStatus != null">
        invoice_status,
      </if>
      <if test="invoiceType != null">
        invoice_type,
      </if>
      <if test="enterpriseId != null">
        enterprise_id,
      </if>
      <if test="invoiceCompanyName != null">
        invoice_company_name,
      </if>
      <if test="invoiceTaxpayersIDCode != null">
        invoice_taxpayers_i_d_code,
      </if>
      <if test="isSendEmail != null">
        is_send_email,
      </if>
      <if test="sendEmailTime != null">
        send_email_time,
      </if>
      <if test="dateType != null">
        date_type,
      </if>
      <if test="startTime != null">
        start_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="bankInfoId != null">
        bank_info_id,
      </if>
      <if test="backAccountStatus != null">
        back_account_status,
      </if>
      <if test="payType != null">
        pay_type,
      </if>
      <if test="payStatus != null">
        pay_status,
      </if>
      <if test="wxQrcodeImgurl != null">
        wx_qrcode_imgurl,
      </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>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="dimCreateBy != null">
        #{dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="logicMode != null">
        #{logicMode,jdbcType=TINYINT},
      </if>
      <if test="accountingOrderSn != null">
        #{accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="serviceNo != null">
        #{serviceNo,jdbcType=VARCHAR},
      </if>
      <if test="sourceFrom != null">
        #{sourceFrom,jdbcType=VARCHAR},
      </if>
      <if test="cycleBeginTime != null">
        #{cycleBeginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="cycleEndTime != null">
        #{cycleEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="accountingAmount != null">
        #{accountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="quantityOrder != null">
        #{quantityOrder,jdbcType=INTEGER},
      </if>
      <if test="quantityGoods != null">
        #{quantityGoods,jdbcType=INTEGER},
      </if>
      <if test="purchaseUserId != null">
        #{purchaseUserId,jdbcType=BIGINT},
      </if>
      <if test="purchaseUserName != null">
        #{purchaseUserName,jdbcType=VARCHAR},
      </if>
      <if test="purchasePhone != null">
        #{purchasePhone,jdbcType=VARCHAR},
      </if>
      <if test="purchaseAddress != null">
        #{purchaseAddress,jdbcType=VARCHAR},
      </if>
      <if test="accountingStatus != null">
        #{accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceStatus != null">
        #{invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceType != null">
        #{invoiceType,jdbcType=TINYINT},
      </if>
      <if test="enterpriseId != null">
        #{enterpriseId,jdbcType=BIGINT},
      </if>
      <if test="invoiceCompanyName != null">
        #{invoiceCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="invoiceTaxpayersIDCode != null">
        #{invoiceTaxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="isSendEmail != null">
        #{isSendEmail,jdbcType=TINYINT},
      </if>
      <if test="sendEmailTime != null">
        #{sendEmailTime,jdbcType=TIMESTAMP},
      </if>
      <if test="dateType != null">
        #{dateType,jdbcType=TINYINT},
      </if>
      <if test="startTime != null">
        #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="bankInfoId != null">
        #{bankInfoId,jdbcType=BIGINT},
      </if>
      <if test="backAccountStatus != null">
        #{backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="payType != null">
        #{payType,jdbcType=TINYINT},
      </if>
      <if test="payStatus != null">
        #{payStatus,jdbcType=TINYINT},
      </if>
      <if test="wxQrcodeImgurl != null">
        #{wxQrcodeImgurl,jdbcType=VARCHAR},
      </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>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomerExample" resultType="java.lang.Long">
    select count(*) from accounting_unified_customer
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update accounting_unified_customer
    <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.logicMode != null">
        logic_mode = #{record.logicMode,jdbcType=TINYINT},
      </if>
      <if test="record.accountingOrderSn != null">
        accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      </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.cycleBeginTime != null">
        cycle_begin_time = #{record.cycleBeginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.cycleEndTime != null">
        cycle_end_time = #{record.cycleEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.accountingAmount != null">
        accounting_amount = #{record.accountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.quantityOrder != null">
        quantity_order = #{record.quantityOrder,jdbcType=INTEGER},
      </if>
      <if test="record.quantityGoods != null">
        quantity_goods = #{record.quantityGoods,jdbcType=INTEGER},
      </if>
      <if test="record.purchaseUserId != null">
        purchase_user_id = #{record.purchaseUserId,jdbcType=BIGINT},
      </if>
      <if test="record.purchaseUserName != null">
        purchase_user_name = #{record.purchaseUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.purchasePhone != null">
        purchase_phone = #{record.purchasePhone,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaseAddress != null">
        purchase_address = #{record.purchaseAddress,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.invoiceType != null">
        invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      </if>
      <if test="record.enterpriseId != null">
        enterprise_id = #{record.enterpriseId,jdbcType=BIGINT},
      </if>
      <if test="record.invoiceCompanyName != null">
        invoice_company_name = #{record.invoiceCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceTaxpayersIDCode != null">
        invoice_taxpayers_i_d_code = #{record.invoiceTaxpayersIDCode,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.dateType != null">
        date_type = #{record.dateType,jdbcType=TINYINT},
      </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.bankInfoId != null">
        bank_info_id = #{record.bankInfoId,jdbcType=BIGINT},
      </if>
      <if test="record.backAccountStatus != null">
        back_account_status = #{record.backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="record.payType != null">
        pay_type = #{record.payType,jdbcType=TINYINT},
      </if>
      <if test="record.payStatus != null">
        pay_status = #{record.payStatus,jdbcType=TINYINT},
      </if>
      <if test="record.wxQrcodeImgurl != null">
        wx_qrcode_imgurl = #{record.wxQrcodeImgurl,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createUserId != null">
        create_user_id = #{record.createUserId,jdbcType=BIGINT},
      </if>
      <if test="record.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>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update accounting_unified_customer
    set id = #{record.id,jdbcType=BIGINT},
      dim_create_by = #{record.dimCreateBy,jdbcType=TINYINT},
      logic_mode = #{record.logicMode,jdbcType=TINYINT},
      accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      service_no = #{record.serviceNo,jdbcType=VARCHAR},
      source_from = #{record.sourceFrom,jdbcType=VARCHAR},
      cycle_begin_time = #{record.cycleBeginTime,jdbcType=TIMESTAMP},
      cycle_end_time = #{record.cycleEndTime,jdbcType=TIMESTAMP},
      accounting_amount = #{record.accountingAmount,jdbcType=DECIMAL},
      quantity_order = #{record.quantityOrder,jdbcType=INTEGER},
      quantity_goods = #{record.quantityGoods,jdbcType=INTEGER},
      purchase_user_id = #{record.purchaseUserId,jdbcType=BIGINT},
      purchase_user_name = #{record.purchaseUserName,jdbcType=VARCHAR},
      purchase_phone = #{record.purchasePhone,jdbcType=VARCHAR},
      purchase_address = #{record.purchaseAddress,jdbcType=VARCHAR},
      accounting_status = #{record.accountingStatus,jdbcType=TINYINT},
      invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      enterprise_id = #{record.enterpriseId,jdbcType=BIGINT},
      invoice_company_name = #{record.invoiceCompanyName,jdbcType=VARCHAR},
      invoice_taxpayers_i_d_code = #{record.invoiceTaxpayersIDCode,jdbcType=VARCHAR},
      is_send_email = #{record.isSendEmail,jdbcType=TINYINT},
      send_email_time = #{record.sendEmailTime,jdbcType=TIMESTAMP},
      date_type = #{record.dateType,jdbcType=TINYINT},
      start_time = #{record.startTime,jdbcType=TIMESTAMP},
      end_time = #{record.endTime,jdbcType=TIMESTAMP},
      bank_info_id = #{record.bankInfoId,jdbcType=BIGINT},
      back_account_status = #{record.backAccountStatus,jdbcType=TINYINT},
      pay_type = #{record.payType,jdbcType=TINYINT},
      pay_status = #{record.payStatus,jdbcType=TINYINT},
      wx_qrcode_imgurl = #{record.wxQrcodeImgurl,jdbcType=VARCHAR},
      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}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomer">
    update accounting_unified_customer
    <set>
      <if test="dimCreateBy != null">
        dim_create_by = #{dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="logicMode != null">
        logic_mode = #{logicMode,jdbcType=TINYINT},
      </if>
      <if test="accountingOrderSn != null">
        accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="serviceNo != null">
        service_no = #{serviceNo,jdbcType=VARCHAR},
      </if>
      <if test="sourceFrom != null">
        source_from = #{sourceFrom,jdbcType=VARCHAR},
      </if>
      <if test="cycleBeginTime != null">
        cycle_begin_time = #{cycleBeginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="cycleEndTime != null">
        cycle_end_time = #{cycleEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="accountingAmount != null">
        accounting_amount = #{accountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="quantityOrder != null">
        quantity_order = #{quantityOrder,jdbcType=INTEGER},
      </if>
      <if test="quantityGoods != null">
        quantity_goods = #{quantityGoods,jdbcType=INTEGER},
      </if>
      <if test="purchaseUserId != null">
        purchase_user_id = #{purchaseUserId,jdbcType=BIGINT},
      </if>
      <if test="purchaseUserName != null">
        purchase_user_name = #{purchaseUserName,jdbcType=VARCHAR},
      </if>
      <if test="purchasePhone != null">
        purchase_phone = #{purchasePhone,jdbcType=VARCHAR},
      </if>
      <if test="purchaseAddress != null">
        purchase_address = #{purchaseAddress,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="invoiceType != null">
        invoice_type = #{invoiceType,jdbcType=TINYINT},
      </if>
      <if test="enterpriseId != null">
        enterprise_id = #{enterpriseId,jdbcType=BIGINT},
      </if>
      <if test="invoiceCompanyName != null">
        invoice_company_name = #{invoiceCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="invoiceTaxpayersIDCode != null">
        invoice_taxpayers_i_d_code = #{invoiceTaxpayersIDCode,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="dateType != null">
        date_type = #{dateType,jdbcType=TINYINT},
      </if>
      <if test="startTime != null">
        start_time = #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="bankInfoId != null">
        bank_info_id = #{bankInfoId,jdbcType=BIGINT},
      </if>
      <if test="backAccountStatus != null">
        back_account_status = #{backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="payType != null">
        pay_type = #{payType,jdbcType=TINYINT},
      </if>
      <if test="payStatus != null">
        pay_status = #{payStatus,jdbcType=TINYINT},
      </if>
      <if test="wxQrcodeImgurl != null">
        wx_qrcode_imgurl = #{wxQrcodeImgurl,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        create_user_id = #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="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>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomer">
    update accounting_unified_customer
    set dim_create_by = #{dimCreateBy,jdbcType=TINYINT},
      logic_mode = #{logicMode,jdbcType=TINYINT},
      accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      service_no = #{serviceNo,jdbcType=VARCHAR},
      source_from = #{sourceFrom,jdbcType=VARCHAR},
      cycle_begin_time = #{cycleBeginTime,jdbcType=TIMESTAMP},
      cycle_end_time = #{cycleEndTime,jdbcType=TIMESTAMP},
      accounting_amount = #{accountingAmount,jdbcType=DECIMAL},
      quantity_order = #{quantityOrder,jdbcType=INTEGER},
      quantity_goods = #{quantityGoods,jdbcType=INTEGER},
      purchase_user_id = #{purchaseUserId,jdbcType=BIGINT},
      purchase_user_name = #{purchaseUserName,jdbcType=VARCHAR},
      purchase_phone = #{purchasePhone,jdbcType=VARCHAR},
      purchase_address = #{purchaseAddress,jdbcType=VARCHAR},
      accounting_status = #{accountingStatus,jdbcType=TINYINT},
      invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      invoice_type = #{invoiceType,jdbcType=TINYINT},
      enterprise_id = #{enterpriseId,jdbcType=BIGINT},
      invoice_company_name = #{invoiceCompanyName,jdbcType=VARCHAR},
      invoice_taxpayers_i_d_code = #{invoiceTaxpayersIDCode,jdbcType=VARCHAR},
      is_send_email = #{isSendEmail,jdbcType=TINYINT},
      send_email_time = #{sendEmailTime,jdbcType=TIMESTAMP},
      date_type = #{dateType,jdbcType=TINYINT},
      start_time = #{startTime,jdbcType=TIMESTAMP},
      end_time = #{endTime,jdbcType=TIMESTAMP},
      bank_info_id = #{bankInfoId,jdbcType=BIGINT},
      back_account_status = #{backAccountStatus,jdbcType=TINYINT},
      pay_type = #{payType,jdbcType=TINYINT},
      pay_status = #{payStatus,jdbcType=TINYINT},
      wx_qrcode_imgurl = #{wxQrcodeImgurl,jdbcType=VARCHAR},
      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}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>