<?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.score.customer.AccountingScoreCustomerMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.accounting.score.customer.AccountingScoreCustomer">
    <id column="id" jdbcType="BIGINT" property="id" />
    <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="credit_type" jdbcType="VARCHAR" property="creditType" />
    <result column="credit_name" jdbcType="VARCHAR" property="creditName" />
    <result column="batchs" jdbcType="VARCHAR" property="batchs" />
    <result column="quantity_order" jdbcType="INTEGER" property="quantityOrder" />
    <result column="quantity_order_goods" jdbcType="INTEGER" property="quantityOrderGoods" />
    <result column="quantity_order_credit" jdbcType="INTEGER" property="quantityOrderCredit" />
    <result column="accounting_amount" jdbcType="DECIMAL" property="accountingAmount" />
    <result column="statistics_total_amount" jdbcType="DECIMAL" property="statisticsTotalAmount" />
    <result column="un_accounting_amount" jdbcType="DECIMAL" property="unAccountingAmount" />
    <result column="accounting_status" jdbcType="TINYINT" property="accountingStatus" />
    <result column="invoice_type" jdbcType="TINYINT" property="invoiceType" />
    <result column="invoice_status" jdbcType="TINYINT" property="invoiceStatus" />
    <result column="invoice_company_name" jdbcType="VARCHAR" property="invoiceCompanyName" />
    <result column="invoice_taxpayers_i_d_code" jdbcType="VARCHAR" property="invoiceTaxpayersIDCode" />
    <result column="enterprise_id" jdbcType="BIGINT" property="enterpriseId" />
    <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="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="back_account_status" jdbcType="TINYINT" property="backAccountStatus" />
    <result column="bank_info_id" jdbcType="BIGINT" property="bankInfoId" />
    <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="pay_type" jdbcType="TINYINT" property="payType" />
    <result column="pay_status" jdbcType="TINYINT" property="payStatus" />
    <result column="wx_qrcode_img_url" jdbcType="VARCHAR" property="wxQrcodeImgUrl" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="need_revise_mark" jdbcType="TINYINT" property="needReviseMark" />
    <result column="express_company_id" jdbcType="BIGINT" property="expressCompanyId" />
    <result column="express_no" jdbcType="VARCHAR" property="expressNo" />
    <result column="attachment_upload_files_uids" jdbcType="VARCHAR" property="attachmentUploadFilesUids" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.superdesk.uniorder.dao.entity.accounting.score.customer.AccountingScoreCustomer">
    <result column="credit_type_struct" jdbcType="LONGVARCHAR" property="creditTypeStruct" />
    <result column="invoice_bank_info_snapshot" jdbcType="LONGVARCHAR" property="invoiceBankInfoSnapshot" />
  </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, service_no, source_from, credit_type, credit_name, batchs, 
    quantity_order, quantity_order_goods, quantity_order_credit, accounting_amount, statistics_total_amount, 
    un_accounting_amount, accounting_status, invoice_type, invoice_status, invoice_company_name, 
    invoice_taxpayers_i_d_code, enterprise_id, purchase_user_id, purchase_user_name, 
    purchase_phone, purchase_address, is_send_email, send_email_time, date_type, start_time, 
    end_time, back_account_status, bank_info_id, create_time, create_user_id, update_time, 
    update_user_id, pay_type, pay_status, wx_qrcode_img_url, deleted, remark, need_revise_mark, 
    express_company_id, express_no, attachment_upload_files_uids
  </sql>
  <sql id="Blob_Column_List">
    credit_type_struct, invoice_bank_info_snapshot
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.accounting.score.customer.AccountingScoreCustomerExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from accounting_score_customer
    <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.score.customer.AccountingScoreCustomerExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from accounting_score_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="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from accounting_score_customer
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from accounting_score_customer
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.accounting.score.customer.AccountingScoreCustomerExample">
    delete from accounting_score_customer
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.accounting.score.customer.AccountingScoreCustomer">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into accounting_score_customer (accounting_order_sn, service_no, source_from, 
      credit_type, credit_name, batchs, 
      quantity_order, quantity_order_goods, quantity_order_credit, 
      accounting_amount, statistics_total_amount, 
      un_accounting_amount, accounting_status, invoice_type, 
      invoice_status, invoice_company_name, invoice_taxpayers_i_d_code, 
      enterprise_id, purchase_user_id, purchase_user_name, 
      purchase_phone, purchase_address, is_send_email, 
      send_email_time, date_type, start_time, 
      end_time, back_account_status, bank_info_id, 
      create_time, create_user_id, update_time, 
      update_user_id, pay_type, pay_status, 
      wx_qrcode_img_url, deleted, remark, 
      need_revise_mark, express_company_id, express_no, 
      attachment_upload_files_uids, credit_type_struct, 
      invoice_bank_info_snapshot)
    values (#{accountingOrderSn,jdbcType=VARCHAR}, #{serviceNo,jdbcType=VARCHAR}, #{sourceFrom,jdbcType=VARCHAR}, 
      #{creditType,jdbcType=VARCHAR}, #{creditName,jdbcType=VARCHAR}, #{batchs,jdbcType=VARCHAR}, 
      #{quantityOrder,jdbcType=INTEGER}, #{quantityOrderGoods,jdbcType=INTEGER}, #{quantityOrderCredit,jdbcType=INTEGER}, 
      #{accountingAmount,jdbcType=DECIMAL}, #{statisticsTotalAmount,jdbcType=DECIMAL}, 
      #{unAccountingAmount,jdbcType=DECIMAL}, #{accountingStatus,jdbcType=TINYINT}, #{invoiceType,jdbcType=TINYINT}, 
      #{invoiceStatus,jdbcType=TINYINT}, #{invoiceCompanyName,jdbcType=VARCHAR}, #{invoiceTaxpayersIDCode,jdbcType=VARCHAR}, 
      #{enterpriseId,jdbcType=BIGINT}, #{purchaseUserId,jdbcType=BIGINT}, #{purchaseUserName,jdbcType=VARCHAR}, 
      #{purchasePhone,jdbcType=VARCHAR}, #{purchaseAddress,jdbcType=VARCHAR}, #{isSendEmail,jdbcType=TINYINT}, 
      #{sendEmailTime,jdbcType=TIMESTAMP}, #{dateType,jdbcType=TINYINT}, #{startTime,jdbcType=TIMESTAMP}, 
      #{endTime,jdbcType=TIMESTAMP}, #{backAccountStatus,jdbcType=TINYINT}, #{bankInfoId,jdbcType=BIGINT}, 
      #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{updateUserId,jdbcType=BIGINT}, #{payType,jdbcType=TINYINT}, #{payStatus,jdbcType=TINYINT}, 
      #{wxQrcodeImgUrl,jdbcType=VARCHAR}, #{deleted,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, 
      #{needReviseMark,jdbcType=TINYINT}, #{expressCompanyId,jdbcType=BIGINT}, #{expressNo,jdbcType=VARCHAR}, 
      #{attachmentUploadFilesUids,jdbcType=VARCHAR}, #{creditTypeStruct,jdbcType=LONGVARCHAR}, 
      #{invoiceBankInfoSnapshot,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.accounting.score.customer.AccountingScoreCustomer">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into accounting_score_customer
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="accountingOrderSn != null">
        accounting_order_sn,
      </if>
      <if test="serviceNo != null">
        service_no,
      </if>
      <if test="sourceFrom != null">
        source_from,
      </if>
      <if test="creditType != null">
        credit_type,
      </if>
      <if test="creditName != null">
        credit_name,
      </if>
      <if test="batchs != null">
        batchs,
      </if>
      <if test="quantityOrder != null">
        quantity_order,
      </if>
      <if test="quantityOrderGoods != null">
        quantity_order_goods,
      </if>
      <if test="quantityOrderCredit != null">
        quantity_order_credit,
      </if>
      <if test="accountingAmount != null">
        accounting_amount,
      </if>
      <if test="statisticsTotalAmount != null">
        statistics_total_amount,
      </if>
      <if test="unAccountingAmount != null">
        un_accounting_amount,
      </if>
      <if test="accountingStatus != null">
        accounting_status,
      </if>
      <if test="invoiceType != null">
        invoice_type,
      </if>
      <if test="invoiceStatus != null">
        invoice_status,
      </if>
      <if test="invoiceCompanyName != null">
        invoice_company_name,
      </if>
      <if test="invoiceTaxpayersIDCode != null">
        invoice_taxpayers_i_d_code,
      </if>
      <if test="enterpriseId != null">
        enterprise_id,
      </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="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="backAccountStatus != null">
        back_account_status,
      </if>
      <if test="bankInfoId != null">
        bank_info_id,
      </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="payType != null">
        pay_type,
      </if>
      <if test="payStatus != null">
        pay_status,
      </if>
      <if test="wxQrcodeImgUrl != null">
        wx_qrcode_img_url,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="needReviseMark != null">
        need_revise_mark,
      </if>
      <if test="expressCompanyId != null">
        express_company_id,
      </if>
      <if test="expressNo != null">
        express_no,
      </if>
      <if test="attachmentUploadFilesUids != null">
        attachment_upload_files_uids,
      </if>
      <if test="creditTypeStruct != null">
        credit_type_struct,
      </if>
      <if test="invoiceBankInfoSnapshot != null">
        invoice_bank_info_snapshot,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <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="creditType != null">
        #{creditType,jdbcType=VARCHAR},
      </if>
      <if test="creditName != null">
        #{creditName,jdbcType=VARCHAR},
      </if>
      <if test="batchs != null">
        #{batchs,jdbcType=VARCHAR},
      </if>
      <if test="quantityOrder != null">
        #{quantityOrder,jdbcType=INTEGER},
      </if>
      <if test="quantityOrderGoods != null">
        #{quantityOrderGoods,jdbcType=INTEGER},
      </if>
      <if test="quantityOrderCredit != null">
        #{quantityOrderCredit,jdbcType=INTEGER},
      </if>
      <if test="accountingAmount != null">
        #{accountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="statisticsTotalAmount != null">
        #{statisticsTotalAmount,jdbcType=DECIMAL},
      </if>
      <if test="unAccountingAmount != null">
        #{unAccountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingStatus != null">
        #{accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceType != null">
        #{invoiceType,jdbcType=TINYINT},
      </if>
      <if test="invoiceStatus != null">
        #{invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceCompanyName != null">
        #{invoiceCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="invoiceTaxpayersIDCode != null">
        #{invoiceTaxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="enterpriseId != null">
        #{enterpriseId,jdbcType=BIGINT},
      </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="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="backAccountStatus != null">
        #{backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="bankInfoId != null">
        #{bankInfoId,jdbcType=BIGINT},
      </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="payType != null">
        #{payType,jdbcType=TINYINT},
      </if>
      <if test="payStatus != null">
        #{payStatus,jdbcType=TINYINT},
      </if>
      <if test="wxQrcodeImgUrl != null">
        #{wxQrcodeImgUrl,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="needReviseMark != null">
        #{needReviseMark,jdbcType=TINYINT},
      </if>
      <if test="expressCompanyId != null">
        #{expressCompanyId,jdbcType=BIGINT},
      </if>
      <if test="expressNo != null">
        #{expressNo,jdbcType=VARCHAR},
      </if>
      <if test="attachmentUploadFilesUids != null">
        #{attachmentUploadFilesUids,jdbcType=VARCHAR},
      </if>
      <if test="creditTypeStruct != null">
        #{creditTypeStruct,jdbcType=LONGVARCHAR},
      </if>
      <if test="invoiceBankInfoSnapshot != null">
        #{invoiceBankInfoSnapshot,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.accounting.score.customer.AccountingScoreCustomerExample" resultType="java.lang.Long">
    select count(*) from accounting_score_customer
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update accounting_score_customer
    <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.serviceNo != null">
        service_no = #{record.serviceNo,jdbcType=VARCHAR},
      </if>
      <if test="record.sourceFrom != null">
        source_from = #{record.sourceFrom,jdbcType=VARCHAR},
      </if>
      <if test="record.creditType != null">
        credit_type = #{record.creditType,jdbcType=VARCHAR},
      </if>
      <if test="record.creditName != null">
        credit_name = #{record.creditName,jdbcType=VARCHAR},
      </if>
      <if test="record.batchs != null">
        batchs = #{record.batchs,jdbcType=VARCHAR},
      </if>
      <if test="record.quantityOrder != null">
        quantity_order = #{record.quantityOrder,jdbcType=INTEGER},
      </if>
      <if test="record.quantityOrderGoods != null">
        quantity_order_goods = #{record.quantityOrderGoods,jdbcType=INTEGER},
      </if>
      <if test="record.quantityOrderCredit != null">
        quantity_order_credit = #{record.quantityOrderCredit,jdbcType=INTEGER},
      </if>
      <if test="record.accountingAmount != null">
        accounting_amount = #{record.accountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.statisticsTotalAmount != null">
        statistics_total_amount = #{record.statisticsTotalAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.unAccountingAmount != null">
        un_accounting_amount = #{record.unAccountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.accountingStatus != null">
        accounting_status = #{record.accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceType != null">
        invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceStatus != null">
        invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      </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.enterpriseId != null">
        enterprise_id = #{record.enterpriseId,jdbcType=BIGINT},
      </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.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.backAccountStatus != null">
        back_account_status = #{record.backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="record.bankInfoId != null">
        bank_info_id = #{record.bankInfoId,jdbcType=BIGINT},
      </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.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_img_url = #{record.wxQrcodeImgUrl,jdbcType=VARCHAR},
      </if>
      <if test="record.deleted != null">
        deleted = #{record.deleted,jdbcType=TINYINT},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.needReviseMark != null">
        need_revise_mark = #{record.needReviseMark,jdbcType=TINYINT},
      </if>
      <if test="record.expressCompanyId != null">
        express_company_id = #{record.expressCompanyId,jdbcType=BIGINT},
      </if>
      <if test="record.expressNo != null">
        express_no = #{record.expressNo,jdbcType=VARCHAR},
      </if>
      <if test="record.attachmentUploadFilesUids != null">
        attachment_upload_files_uids = #{record.attachmentUploadFilesUids,jdbcType=VARCHAR},
      </if>
      <if test="record.creditTypeStruct != null">
        credit_type_struct = #{record.creditTypeStruct,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.invoiceBankInfoSnapshot != null">
        invoice_bank_info_snapshot = #{record.invoiceBankInfoSnapshot,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update accounting_score_customer
    set id = #{record.id,jdbcType=BIGINT},
      accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      service_no = #{record.serviceNo,jdbcType=VARCHAR},
      source_from = #{record.sourceFrom,jdbcType=VARCHAR},
      credit_type = #{record.creditType,jdbcType=VARCHAR},
      credit_name = #{record.creditName,jdbcType=VARCHAR},
      batchs = #{record.batchs,jdbcType=VARCHAR},
      quantity_order = #{record.quantityOrder,jdbcType=INTEGER},
      quantity_order_goods = #{record.quantityOrderGoods,jdbcType=INTEGER},
      quantity_order_credit = #{record.quantityOrderCredit,jdbcType=INTEGER},
      accounting_amount = #{record.accountingAmount,jdbcType=DECIMAL},
      statistics_total_amount = #{record.statisticsTotalAmount,jdbcType=DECIMAL},
      un_accounting_amount = #{record.unAccountingAmount,jdbcType=DECIMAL},
      accounting_status = #{record.accountingStatus,jdbcType=TINYINT},
      invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      invoice_company_name = #{record.invoiceCompanyName,jdbcType=VARCHAR},
      invoice_taxpayers_i_d_code = #{record.invoiceTaxpayersIDCode,jdbcType=VARCHAR},
      enterprise_id = #{record.enterpriseId,jdbcType=BIGINT},
      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},
      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},
      back_account_status = #{record.backAccountStatus,jdbcType=TINYINT},
      bank_info_id = #{record.bankInfoId,jdbcType=BIGINT},
      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},
      pay_type = #{record.payType,jdbcType=TINYINT},
      pay_status = #{record.payStatus,jdbcType=TINYINT},
      wx_qrcode_img_url = #{record.wxQrcodeImgUrl,jdbcType=VARCHAR},
      deleted = #{record.deleted,jdbcType=TINYINT},
      remark = #{record.remark,jdbcType=VARCHAR},
      need_revise_mark = #{record.needReviseMark,jdbcType=TINYINT},
      express_company_id = #{record.expressCompanyId,jdbcType=BIGINT},
      express_no = #{record.expressNo,jdbcType=VARCHAR},
      attachment_upload_files_uids = #{record.attachmentUploadFilesUids,jdbcType=VARCHAR},
      credit_type_struct = #{record.creditTypeStruct,jdbcType=LONGVARCHAR},
      invoice_bank_info_snapshot = #{record.invoiceBankInfoSnapshot,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update accounting_score_customer
    set id = #{record.id,jdbcType=BIGINT},
      accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      service_no = #{record.serviceNo,jdbcType=VARCHAR},
      source_from = #{record.sourceFrom,jdbcType=VARCHAR},
      credit_type = #{record.creditType,jdbcType=VARCHAR},
      credit_name = #{record.creditName,jdbcType=VARCHAR},
      batchs = #{record.batchs,jdbcType=VARCHAR},
      quantity_order = #{record.quantityOrder,jdbcType=INTEGER},
      quantity_order_goods = #{record.quantityOrderGoods,jdbcType=INTEGER},
      quantity_order_credit = #{record.quantityOrderCredit,jdbcType=INTEGER},
      accounting_amount = #{record.accountingAmount,jdbcType=DECIMAL},
      statistics_total_amount = #{record.statisticsTotalAmount,jdbcType=DECIMAL},
      un_accounting_amount = #{record.unAccountingAmount,jdbcType=DECIMAL},
      accounting_status = #{record.accountingStatus,jdbcType=TINYINT},
      invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      invoice_company_name = #{record.invoiceCompanyName,jdbcType=VARCHAR},
      invoice_taxpayers_i_d_code = #{record.invoiceTaxpayersIDCode,jdbcType=VARCHAR},
      enterprise_id = #{record.enterpriseId,jdbcType=BIGINT},
      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},
      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},
      back_account_status = #{record.backAccountStatus,jdbcType=TINYINT},
      bank_info_id = #{record.bankInfoId,jdbcType=BIGINT},
      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},
      pay_type = #{record.payType,jdbcType=TINYINT},
      pay_status = #{record.payStatus,jdbcType=TINYINT},
      wx_qrcode_img_url = #{record.wxQrcodeImgUrl,jdbcType=VARCHAR},
      deleted = #{record.deleted,jdbcType=TINYINT},
      remark = #{record.remark,jdbcType=VARCHAR},
      need_revise_mark = #{record.needReviseMark,jdbcType=TINYINT},
      express_company_id = #{record.expressCompanyId,jdbcType=BIGINT},
      express_no = #{record.expressNo,jdbcType=VARCHAR},
      attachment_upload_files_uids = #{record.attachmentUploadFilesUids,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.score.customer.AccountingScoreCustomer">
    update accounting_score_customer
    <set>
      <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="creditType != null">
        credit_type = #{creditType,jdbcType=VARCHAR},
      </if>
      <if test="creditName != null">
        credit_name = #{creditName,jdbcType=VARCHAR},
      </if>
      <if test="batchs != null">
        batchs = #{batchs,jdbcType=VARCHAR},
      </if>
      <if test="quantityOrder != null">
        quantity_order = #{quantityOrder,jdbcType=INTEGER},
      </if>
      <if test="quantityOrderGoods != null">
        quantity_order_goods = #{quantityOrderGoods,jdbcType=INTEGER},
      </if>
      <if test="quantityOrderCredit != null">
        quantity_order_credit = #{quantityOrderCredit,jdbcType=INTEGER},
      </if>
      <if test="accountingAmount != null">
        accounting_amount = #{accountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="statisticsTotalAmount != null">
        statistics_total_amount = #{statisticsTotalAmount,jdbcType=DECIMAL},
      </if>
      <if test="unAccountingAmount != null">
        un_accounting_amount = #{unAccountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingStatus != null">
        accounting_status = #{accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceType != null">
        invoice_type = #{invoiceType,jdbcType=TINYINT},
      </if>
      <if test="invoiceStatus != null">
        invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      </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="enterpriseId != null">
        enterprise_id = #{enterpriseId,jdbcType=BIGINT},
      </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="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="backAccountStatus != null">
        back_account_status = #{backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="bankInfoId != null">
        bank_info_id = #{bankInfoId,jdbcType=BIGINT},
      </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="payType != null">
        pay_type = #{payType,jdbcType=TINYINT},
      </if>
      <if test="payStatus != null">
        pay_status = #{payStatus,jdbcType=TINYINT},
      </if>
      <if test="wxQrcodeImgUrl != null">
        wx_qrcode_img_url = #{wxQrcodeImgUrl,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="needReviseMark != null">
        need_revise_mark = #{needReviseMark,jdbcType=TINYINT},
      </if>
      <if test="expressCompanyId != null">
        express_company_id = #{expressCompanyId,jdbcType=BIGINT},
      </if>
      <if test="expressNo != null">
        express_no = #{expressNo,jdbcType=VARCHAR},
      </if>
      <if test="attachmentUploadFilesUids != null">
        attachment_upload_files_uids = #{attachmentUploadFilesUids,jdbcType=VARCHAR},
      </if>
      <if test="creditTypeStruct != null">
        credit_type_struct = #{creditTypeStruct,jdbcType=LONGVARCHAR},
      </if>
      <if test="invoiceBankInfoSnapshot != null">
        invoice_bank_info_snapshot = #{invoiceBankInfoSnapshot,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.accounting.score.customer.AccountingScoreCustomer">
    update accounting_score_customer
    set accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      service_no = #{serviceNo,jdbcType=VARCHAR},
      source_from = #{sourceFrom,jdbcType=VARCHAR},
      credit_type = #{creditType,jdbcType=VARCHAR},
      credit_name = #{creditName,jdbcType=VARCHAR},
      batchs = #{batchs,jdbcType=VARCHAR},
      quantity_order = #{quantityOrder,jdbcType=INTEGER},
      quantity_order_goods = #{quantityOrderGoods,jdbcType=INTEGER},
      quantity_order_credit = #{quantityOrderCredit,jdbcType=INTEGER},
      accounting_amount = #{accountingAmount,jdbcType=DECIMAL},
      statistics_total_amount = #{statisticsTotalAmount,jdbcType=DECIMAL},
      un_accounting_amount = #{unAccountingAmount,jdbcType=DECIMAL},
      accounting_status = #{accountingStatus,jdbcType=TINYINT},
      invoice_type = #{invoiceType,jdbcType=TINYINT},
      invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      invoice_company_name = #{invoiceCompanyName,jdbcType=VARCHAR},
      invoice_taxpayers_i_d_code = #{invoiceTaxpayersIDCode,jdbcType=VARCHAR},
      enterprise_id = #{enterpriseId,jdbcType=BIGINT},
      purchase_user_id = #{purchaseUserId,jdbcType=BIGINT},
      purchase_user_name = #{purchaseUserName,jdbcType=VARCHAR},
      purchase_phone = #{purchasePhone,jdbcType=VARCHAR},
      purchase_address = #{purchaseAddress,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},
      back_account_status = #{backAccountStatus,jdbcType=TINYINT},
      bank_info_id = #{bankInfoId,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      pay_type = #{payType,jdbcType=TINYINT},
      pay_status = #{payStatus,jdbcType=TINYINT},
      wx_qrcode_img_url = #{wxQrcodeImgUrl,jdbcType=VARCHAR},
      deleted = #{deleted,jdbcType=TINYINT},
      remark = #{remark,jdbcType=VARCHAR},
      need_revise_mark = #{needReviseMark,jdbcType=TINYINT},
      express_company_id = #{expressCompanyId,jdbcType=BIGINT},
      express_no = #{expressNo,jdbcType=VARCHAR},
      attachment_upload_files_uids = #{attachmentUploadFilesUids,jdbcType=VARCHAR},
      credit_type_struct = #{creditTypeStruct,jdbcType=LONGVARCHAR},
      invoice_bank_info_snapshot = #{invoiceBankInfoSnapshot,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.accounting.score.customer.AccountingScoreCustomer">
    update accounting_score_customer
    set accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      service_no = #{serviceNo,jdbcType=VARCHAR},
      source_from = #{sourceFrom,jdbcType=VARCHAR},
      credit_type = #{creditType,jdbcType=VARCHAR},
      credit_name = #{creditName,jdbcType=VARCHAR},
      batchs = #{batchs,jdbcType=VARCHAR},
      quantity_order = #{quantityOrder,jdbcType=INTEGER},
      quantity_order_goods = #{quantityOrderGoods,jdbcType=INTEGER},
      quantity_order_credit = #{quantityOrderCredit,jdbcType=INTEGER},
      accounting_amount = #{accountingAmount,jdbcType=DECIMAL},
      statistics_total_amount = #{statisticsTotalAmount,jdbcType=DECIMAL},
      un_accounting_amount = #{unAccountingAmount,jdbcType=DECIMAL},
      accounting_status = #{accountingStatus,jdbcType=TINYINT},
      invoice_type = #{invoiceType,jdbcType=TINYINT},
      invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      invoice_company_name = #{invoiceCompanyName,jdbcType=VARCHAR},
      invoice_taxpayers_i_d_code = #{invoiceTaxpayersIDCode,jdbcType=VARCHAR},
      enterprise_id = #{enterpriseId,jdbcType=BIGINT},
      purchase_user_id = #{purchaseUserId,jdbcType=BIGINT},
      purchase_user_name = #{purchaseUserName,jdbcType=VARCHAR},
      purchase_phone = #{purchasePhone,jdbcType=VARCHAR},
      purchase_address = #{purchaseAddress,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},
      back_account_status = #{backAccountStatus,jdbcType=TINYINT},
      bank_info_id = #{bankInfoId,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      pay_type = #{payType,jdbcType=TINYINT},
      pay_status = #{payStatus,jdbcType=TINYINT},
      wx_qrcode_img_url = #{wxQrcodeImgUrl,jdbcType=VARCHAR},
      deleted = #{deleted,jdbcType=TINYINT},
      remark = #{remark,jdbcType=VARCHAR},
      need_revise_mark = #{needReviseMark,jdbcType=TINYINT},
      express_company_id = #{expressCompanyId,jdbcType=BIGINT},
      express_no = #{expressNo,jdbcType=VARCHAR},
      attachment_upload_files_uids = #{attachmentUploadFilesUids,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>