<?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="com.bailuntec.mapper.DcBaseFinanceHandlefeeMapper">
  <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcBaseFinanceHandlefee">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="cw_id" jdbcType="INTEGER" property="cwId" />
    <result column="trad_code" jdbcType="VARCHAR" property="tradCode" />
    <result column="subject_value_from" jdbcType="INTEGER" property="subjectValueFrom" />
    <result column="subject_name_from" jdbcType="VARCHAR" property="subjectNameFrom" />
    <result column="pay_account_iDFrom" jdbcType="INTEGER" property="payAccountIdfrom" />
    <result column="bank_name_from" jdbcType="VARCHAR" property="bankNameFrom" />
    <result column="bank_card_from" jdbcType="VARCHAR" property="bankCardFrom" />
    <result column="bank_card_user_from" jdbcType="VARCHAR" property="bankCardUserFrom" />
    <result column="supplier_iDFrom" jdbcType="INTEGER" property="supplierIdfrom" />
    <result column="supplier_name_from" jdbcType="VARCHAR" property="supplierNameFrom" />
    <result column="trade_type" jdbcType="INTEGER" property="tradeType" />
    <result column="subject_value_to" jdbcType="VARCHAR" property="subjectValueTo" />
    <result column="subject_name_to" jdbcType="VARCHAR" property="subjectNameTo" />
    <result column="pay_account_iDTo" jdbcType="INTEGER" property="payAccountIdto" />
    <result column="bank_name_to" jdbcType="VARCHAR" property="bankNameTo" />
    <result column="bank_card_to" jdbcType="VARCHAR" property="bankCardTo" />
    <result column="bank_card_user_to" jdbcType="VARCHAR" property="bankCardUserTo" />
    <result column="supplier_iDTo" jdbcType="INTEGER" property="supplierIdto" />
    <result column="supplier_name_to" jdbcType="VARCHAR" property="supplierNameTo" />
    <result column="unit_nameto" jdbcType="VARCHAR" property="unitNameto" />
    <result column="unit_codeto" jdbcType="VARCHAR" property="unitCodeto" />
    <result column="rate" jdbcType="DECIMAL" property="rate" />
    <result column="pay_moneyto" jdbcType="DECIMAL" property="payMoneyto" />
    <result column="unit_name" jdbcType="VARCHAR" property="unitName" />
    <result column="unit_code" jdbcType="VARCHAR" property="unitCode" />
    <result column="pay_money" jdbcType="DECIMAL" property="payMoney" />
    <result column="pay_money_rMB" jdbcType="DECIMAL" property="payMoneyRmb" />
    <result column="old_money" jdbcType="DECIMAL" property="oldMoney" />
    <result column="new_money" jdbcType="DECIMAL" property="newMoney" />
    <result column="before_day_money" jdbcType="DECIMAL" property="beforeDayMoney" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="annex" jdbcType="VARCHAR" property="annex" />
    <result column="has_delete" jdbcType="TINYINT" property="hasDelete" />
    <result column="delete_remark" jdbcType="VARCHAR" property="deleteRemark" />
    <result column="create_user_iD" jdbcType="INTEGER" property="createUserId" />
    <result column="create_user_name" jdbcType="VARCHAR" property="createUserName" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="fetter_trade_iD" jdbcType="INTEGER" property="fetterTradeId" />
    <result column="fetter_trade_code" jdbcType="VARCHAR" property="fetterTradeCode" />
    <result column="source" jdbcType="VARCHAR" property="source" />
    <result column="trade_category" jdbcType="VARCHAR" property="tradeCategory" />
    <result column="payment_iD" jdbcType="INTEGER" property="paymentId" />
    <result column="pur_category_iD" jdbcType="INTEGER" property="purCategoryId" />
    <result column="pur_category_name" jdbcType="VARCHAR" property="purCategoryName" />
    <result column="apply_code" jdbcType="VARCHAR" property="applyCode" />
    <result column="original_rate" jdbcType="DECIMAL" property="originalRate" />
    <result column="cashier_source_name" jdbcType="VARCHAR" property="cashierSourceName" />
    <result column="cashier_detail_name" jdbcType="VARCHAR" property="cashierDetailName" />
    <result column="cashier_code" jdbcType="VARCHAR" property="cashierCode" />
    <result column="casher_transaction_type" jdbcType="VARCHAR" property="casherTransactionType" />
    <result column="cashier_id" jdbcType="INTEGER" property="cashierId" />
    <result column="cashier_other_order_code" jdbcType="VARCHAR" property="cashierOtherOrderCode" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, cw_id, trad_code, subject_value_from, subject_name_from, pay_account_iDFrom, 
    bank_name_from, bank_card_from, bank_card_user_from, supplier_iDFrom, supplier_name_from, 
    trade_type, subject_value_to, subject_name_to, pay_account_iDTo, bank_name_to, bank_card_to, 
    bank_card_user_to, supplier_iDTo, supplier_name_to, unit_nameto, unit_codeto, rate, 
    pay_moneyto, unit_name, unit_code, pay_money, pay_money_rMB, old_money, new_money, 
    before_day_money, remark, annex, has_delete, delete_remark, create_user_iD, create_user_name, 
    create_time, fetter_trade_iD, fetter_trade_code, source, trade_category, payment_iD, 
    pur_category_iD, pur_category_name, apply_code, original_rate, cashier_source_name, 
    cashier_detail_name, cashier_code, casher_transaction_type, cashier_id, cashier_other_order_code
  </sql>
  <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceHandlefeeExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from dc_base_finance_handlefee
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    <if test="rows != null">
      <if test="offset != null">
        limit ${offset}, ${rows}
      </if>
      <if test="offset == null">
        limit ${rows}
      </if>
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from dc_base_finance_handlefee
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_base_finance_handlefee
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceHandlefeeExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_base_finance_handlefee
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceHandlefee">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_finance_handlefee (id, cw_id, trad_code, 
      subject_value_from, subject_name_from, pay_account_iDFrom, 
      bank_name_from, bank_card_from, bank_card_user_from, 
      supplier_iDFrom, supplier_name_from, trade_type, 
      subject_value_to, subject_name_to, pay_account_iDTo, 
      bank_name_to, bank_card_to, bank_card_user_to, 
      supplier_iDTo, supplier_name_to, unit_nameto, 
      unit_codeto, rate, pay_moneyto, 
      unit_name, unit_code, pay_money, 
      pay_money_rMB, old_money, new_money, 
      before_day_money, remark, annex, 
      has_delete, delete_remark, create_user_iD, 
      create_user_name, create_time, fetter_trade_iD, 
      fetter_trade_code, source, trade_category, 
      payment_iD, pur_category_iD, pur_category_name, 
      apply_code, original_rate, cashier_source_name, 
      cashier_detail_name, cashier_code, casher_transaction_type, 
      cashier_id, cashier_other_order_code)
    values (#{id,jdbcType=INTEGER}, #{cwId,jdbcType=INTEGER}, #{tradCode,jdbcType=VARCHAR}, 
      #{subjectValueFrom,jdbcType=INTEGER}, #{subjectNameFrom,jdbcType=VARCHAR}, #{payAccountIdfrom,jdbcType=INTEGER}, 
      #{bankNameFrom,jdbcType=VARCHAR}, #{bankCardFrom,jdbcType=VARCHAR}, #{bankCardUserFrom,jdbcType=VARCHAR}, 
      #{supplierIdfrom,jdbcType=INTEGER}, #{supplierNameFrom,jdbcType=VARCHAR}, #{tradeType,jdbcType=INTEGER}, 
      #{subjectValueTo,jdbcType=VARCHAR}, #{subjectNameTo,jdbcType=VARCHAR}, #{payAccountIdto,jdbcType=INTEGER}, 
      #{bankNameTo,jdbcType=VARCHAR}, #{bankCardTo,jdbcType=VARCHAR}, #{bankCardUserTo,jdbcType=VARCHAR}, 
      #{supplierIdto,jdbcType=INTEGER}, #{supplierNameTo,jdbcType=VARCHAR}, #{unitNameto,jdbcType=VARCHAR}, 
      #{unitCodeto,jdbcType=VARCHAR}, #{rate,jdbcType=DECIMAL}, #{payMoneyto,jdbcType=DECIMAL}, 
      #{unitName,jdbcType=VARCHAR}, #{unitCode,jdbcType=VARCHAR}, #{payMoney,jdbcType=DECIMAL}, 
      #{payMoneyRmb,jdbcType=DECIMAL}, #{oldMoney,jdbcType=DECIMAL}, #{newMoney,jdbcType=DECIMAL}, 
      #{beforeDayMoney,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, #{annex,jdbcType=VARCHAR}, 
      #{hasDelete,jdbcType=TINYINT}, #{deleteRemark,jdbcType=VARCHAR}, #{createUserId,jdbcType=INTEGER}, 
      #{createUserName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{fetterTradeId,jdbcType=INTEGER}, 
      #{fetterTradeCode,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{tradeCategory,jdbcType=VARCHAR}, 
      #{paymentId,jdbcType=INTEGER}, #{purCategoryId,jdbcType=INTEGER}, #{purCategoryName,jdbcType=VARCHAR}, 
      #{applyCode,jdbcType=VARCHAR}, #{originalRate,jdbcType=DECIMAL}, #{cashierSourceName,jdbcType=VARCHAR}, 
      #{cashierDetailName,jdbcType=VARCHAR}, #{cashierCode,jdbcType=VARCHAR}, #{casherTransactionType,jdbcType=VARCHAR}, 
      #{cashierId,jdbcType=INTEGER}, #{cashierOtherOrderCode,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceHandlefee">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_finance_handlefee
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="cwId != null">
        cw_id,
      </if>
      <if test="tradCode != null">
        trad_code,
      </if>
      <if test="subjectValueFrom != null">
        subject_value_from,
      </if>
      <if test="subjectNameFrom != null">
        subject_name_from,
      </if>
      <if test="payAccountIdfrom != null">
        pay_account_iDFrom,
      </if>
      <if test="bankNameFrom != null">
        bank_name_from,
      </if>
      <if test="bankCardFrom != null">
        bank_card_from,
      </if>
      <if test="bankCardUserFrom != null">
        bank_card_user_from,
      </if>
      <if test="supplierIdfrom != null">
        supplier_iDFrom,
      </if>
      <if test="supplierNameFrom != null">
        supplier_name_from,
      </if>
      <if test="tradeType != null">
        trade_type,
      </if>
      <if test="subjectValueTo != null">
        subject_value_to,
      </if>
      <if test="subjectNameTo != null">
        subject_name_to,
      </if>
      <if test="payAccountIdto != null">
        pay_account_iDTo,
      </if>
      <if test="bankNameTo != null">
        bank_name_to,
      </if>
      <if test="bankCardTo != null">
        bank_card_to,
      </if>
      <if test="bankCardUserTo != null">
        bank_card_user_to,
      </if>
      <if test="supplierIdto != null">
        supplier_iDTo,
      </if>
      <if test="supplierNameTo != null">
        supplier_name_to,
      </if>
      <if test="unitNameto != null">
        unit_nameto,
      </if>
      <if test="unitCodeto != null">
        unit_codeto,
      </if>
      <if test="rate != null">
        rate,
      </if>
      <if test="payMoneyto != null">
        pay_moneyto,
      </if>
      <if test="unitName != null">
        unit_name,
      </if>
      <if test="unitCode != null">
        unit_code,
      </if>
      <if test="payMoney != null">
        pay_money,
      </if>
      <if test="payMoneyRmb != null">
        pay_money_rMB,
      </if>
      <if test="oldMoney != null">
        old_money,
      </if>
      <if test="newMoney != null">
        new_money,
      </if>
      <if test="beforeDayMoney != null">
        before_day_money,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="annex != null">
        annex,
      </if>
      <if test="hasDelete != null">
        has_delete,
      </if>
      <if test="deleteRemark != null">
        delete_remark,
      </if>
      <if test="createUserId != null">
        create_user_iD,
      </if>
      <if test="createUserName != null">
        create_user_name,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="fetterTradeId != null">
        fetter_trade_iD,
      </if>
      <if test="fetterTradeCode != null">
        fetter_trade_code,
      </if>
      <if test="source != null">
        source,
      </if>
      <if test="tradeCategory != null">
        trade_category,
      </if>
      <if test="paymentId != null">
        payment_iD,
      </if>
      <if test="purCategoryId != null">
        pur_category_iD,
      </if>
      <if test="purCategoryName != null">
        pur_category_name,
      </if>
      <if test="applyCode != null">
        apply_code,
      </if>
      <if test="originalRate != null">
        original_rate,
      </if>
      <if test="cashierSourceName != null">
        cashier_source_name,
      </if>
      <if test="cashierDetailName != null">
        cashier_detail_name,
      </if>
      <if test="cashierCode != null">
        cashier_code,
      </if>
      <if test="casherTransactionType != null">
        casher_transaction_type,
      </if>
      <if test="cashierId != null">
        cashier_id,
      </if>
      <if test="cashierOtherOrderCode != null">
        cashier_other_order_code,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="cwId != null">
        #{cwId,jdbcType=INTEGER},
      </if>
      <if test="tradCode != null">
        #{tradCode,jdbcType=VARCHAR},
      </if>
      <if test="subjectValueFrom != null">
        #{subjectValueFrom,jdbcType=INTEGER},
      </if>
      <if test="subjectNameFrom != null">
        #{subjectNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="payAccountIdfrom != null">
        #{payAccountIdfrom,jdbcType=INTEGER},
      </if>
      <if test="bankNameFrom != null">
        #{bankNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="bankCardFrom != null">
        #{bankCardFrom,jdbcType=VARCHAR},
      </if>
      <if test="bankCardUserFrom != null">
        #{bankCardUserFrom,jdbcType=VARCHAR},
      </if>
      <if test="supplierIdfrom != null">
        #{supplierIdfrom,jdbcType=INTEGER},
      </if>
      <if test="supplierNameFrom != null">
        #{supplierNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="tradeType != null">
        #{tradeType,jdbcType=INTEGER},
      </if>
      <if test="subjectValueTo != null">
        #{subjectValueTo,jdbcType=VARCHAR},
      </if>
      <if test="subjectNameTo != null">
        #{subjectNameTo,jdbcType=VARCHAR},
      </if>
      <if test="payAccountIdto != null">
        #{payAccountIdto,jdbcType=INTEGER},
      </if>
      <if test="bankNameTo != null">
        #{bankNameTo,jdbcType=VARCHAR},
      </if>
      <if test="bankCardTo != null">
        #{bankCardTo,jdbcType=VARCHAR},
      </if>
      <if test="bankCardUserTo != null">
        #{bankCardUserTo,jdbcType=VARCHAR},
      </if>
      <if test="supplierIdto != null">
        #{supplierIdto,jdbcType=INTEGER},
      </if>
      <if test="supplierNameTo != null">
        #{supplierNameTo,jdbcType=VARCHAR},
      </if>
      <if test="unitNameto != null">
        #{unitNameto,jdbcType=VARCHAR},
      </if>
      <if test="unitCodeto != null">
        #{unitCodeto,jdbcType=VARCHAR},
      </if>
      <if test="rate != null">
        #{rate,jdbcType=DECIMAL},
      </if>
      <if test="payMoneyto != null">
        #{payMoneyto,jdbcType=DECIMAL},
      </if>
      <if test="unitName != null">
        #{unitName,jdbcType=VARCHAR},
      </if>
      <if test="unitCode != null">
        #{unitCode,jdbcType=VARCHAR},
      </if>
      <if test="payMoney != null">
        #{payMoney,jdbcType=DECIMAL},
      </if>
      <if test="payMoneyRmb != null">
        #{payMoneyRmb,jdbcType=DECIMAL},
      </if>
      <if test="oldMoney != null">
        #{oldMoney,jdbcType=DECIMAL},
      </if>
      <if test="newMoney != null">
        #{newMoney,jdbcType=DECIMAL},
      </if>
      <if test="beforeDayMoney != null">
        #{beforeDayMoney,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="annex != null">
        #{annex,jdbcType=VARCHAR},
      </if>
      <if test="hasDelete != null">
        #{hasDelete,jdbcType=TINYINT},
      </if>
      <if test="deleteRemark != null">
        #{deleteRemark,jdbcType=VARCHAR},
      </if>
      <if test="createUserId != null">
        #{createUserId,jdbcType=INTEGER},
      </if>
      <if test="createUserName != null">
        #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="fetterTradeId != null">
        #{fetterTradeId,jdbcType=INTEGER},
      </if>
      <if test="fetterTradeCode != null">
        #{fetterTradeCode,jdbcType=VARCHAR},
      </if>
      <if test="source != null">
        #{source,jdbcType=VARCHAR},
      </if>
      <if test="tradeCategory != null">
        #{tradeCategory,jdbcType=VARCHAR},
      </if>
      <if test="paymentId != null">
        #{paymentId,jdbcType=INTEGER},
      </if>
      <if test="purCategoryId != null">
        #{purCategoryId,jdbcType=INTEGER},
      </if>
      <if test="purCategoryName != null">
        #{purCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="applyCode != null">
        #{applyCode,jdbcType=VARCHAR},
      </if>
      <if test="originalRate != null">
        #{originalRate,jdbcType=DECIMAL},
      </if>
      <if test="cashierSourceName != null">
        #{cashierSourceName,jdbcType=VARCHAR},
      </if>
      <if test="cashierDetailName != null">
        #{cashierDetailName,jdbcType=VARCHAR},
      </if>
      <if test="cashierCode != null">
        #{cashierCode,jdbcType=VARCHAR},
      </if>
      <if test="casherTransactionType != null">
        #{casherTransactionType,jdbcType=VARCHAR},
      </if>
      <if test="cashierId != null">
        #{cashierId,jdbcType=INTEGER},
      </if>
      <if test="cashierOtherOrderCode != null">
        #{cashierOtherOrderCode,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceHandlefeeExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from dc_base_finance_handlefee
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_handlefee
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.cwId != null">
        cw_id = #{record.cwId,jdbcType=INTEGER},
      </if>
      <if test="record.tradCode != null">
        trad_code = #{record.tradCode,jdbcType=VARCHAR},
      </if>
      <if test="record.subjectValueFrom != null">
        subject_value_from = #{record.subjectValueFrom,jdbcType=INTEGER},
      </if>
      <if test="record.subjectNameFrom != null">
        subject_name_from = #{record.subjectNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="record.payAccountIdfrom != null">
        pay_account_iDFrom = #{record.payAccountIdfrom,jdbcType=INTEGER},
      </if>
      <if test="record.bankNameFrom != null">
        bank_name_from = #{record.bankNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="record.bankCardFrom != null">
        bank_card_from = #{record.bankCardFrom,jdbcType=VARCHAR},
      </if>
      <if test="record.bankCardUserFrom != null">
        bank_card_user_from = #{record.bankCardUserFrom,jdbcType=VARCHAR},
      </if>
      <if test="record.supplierIdfrom != null">
        supplier_iDFrom = #{record.supplierIdfrom,jdbcType=INTEGER},
      </if>
      <if test="record.supplierNameFrom != null">
        supplier_name_from = #{record.supplierNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="record.tradeType != null">
        trade_type = #{record.tradeType,jdbcType=INTEGER},
      </if>
      <if test="record.subjectValueTo != null">
        subject_value_to = #{record.subjectValueTo,jdbcType=VARCHAR},
      </if>
      <if test="record.subjectNameTo != null">
        subject_name_to = #{record.subjectNameTo,jdbcType=VARCHAR},
      </if>
      <if test="record.payAccountIdto != null">
        pay_account_iDTo = #{record.payAccountIdto,jdbcType=INTEGER},
      </if>
      <if test="record.bankNameTo != null">
        bank_name_to = #{record.bankNameTo,jdbcType=VARCHAR},
      </if>
      <if test="record.bankCardTo != null">
        bank_card_to = #{record.bankCardTo,jdbcType=VARCHAR},
      </if>
      <if test="record.bankCardUserTo != null">
        bank_card_user_to = #{record.bankCardUserTo,jdbcType=VARCHAR},
      </if>
      <if test="record.supplierIdto != null">
        supplier_iDTo = #{record.supplierIdto,jdbcType=INTEGER},
      </if>
      <if test="record.supplierNameTo != null">
        supplier_name_to = #{record.supplierNameTo,jdbcType=VARCHAR},
      </if>
      <if test="record.unitNameto != null">
        unit_nameto = #{record.unitNameto,jdbcType=VARCHAR},
      </if>
      <if test="record.unitCodeto != null">
        unit_codeto = #{record.unitCodeto,jdbcType=VARCHAR},
      </if>
      <if test="record.rate != null">
        rate = #{record.rate,jdbcType=DECIMAL},
      </if>
      <if test="record.payMoneyto != null">
        pay_moneyto = #{record.payMoneyto,jdbcType=DECIMAL},
      </if>
      <if test="record.unitName != null">
        unit_name = #{record.unitName,jdbcType=VARCHAR},
      </if>
      <if test="record.unitCode != null">
        unit_code = #{record.unitCode,jdbcType=VARCHAR},
      </if>
      <if test="record.payMoney != null">
        pay_money = #{record.payMoney,jdbcType=DECIMAL},
      </if>
      <if test="record.payMoneyRmb != null">
        pay_money_rMB = #{record.payMoneyRmb,jdbcType=DECIMAL},
      </if>
      <if test="record.oldMoney != null">
        old_money = #{record.oldMoney,jdbcType=DECIMAL},
      </if>
      <if test="record.newMoney != null">
        new_money = #{record.newMoney,jdbcType=DECIMAL},
      </if>
      <if test="record.beforeDayMoney != null">
        before_day_money = #{record.beforeDayMoney,jdbcType=DECIMAL},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.annex != null">
        annex = #{record.annex,jdbcType=VARCHAR},
      </if>
      <if test="record.hasDelete != null">
        has_delete = #{record.hasDelete,jdbcType=TINYINT},
      </if>
      <if test="record.deleteRemark != null">
        delete_remark = #{record.deleteRemark,jdbcType=VARCHAR},
      </if>
      <if test="record.createUserId != null">
        create_user_iD = #{record.createUserId,jdbcType=INTEGER},
      </if>
      <if test="record.createUserName != null">
        create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.fetterTradeId != null">
        fetter_trade_iD = #{record.fetterTradeId,jdbcType=INTEGER},
      </if>
      <if test="record.fetterTradeCode != null">
        fetter_trade_code = #{record.fetterTradeCode,jdbcType=VARCHAR},
      </if>
      <if test="record.source != null">
        source = #{record.source,jdbcType=VARCHAR},
      </if>
      <if test="record.tradeCategory != null">
        trade_category = #{record.tradeCategory,jdbcType=VARCHAR},
      </if>
      <if test="record.paymentId != null">
        payment_iD = #{record.paymentId,jdbcType=INTEGER},
      </if>
      <if test="record.purCategoryId != null">
        pur_category_iD = #{record.purCategoryId,jdbcType=INTEGER},
      </if>
      <if test="record.purCategoryName != null">
        pur_category_name = #{record.purCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="record.applyCode != null">
        apply_code = #{record.applyCode,jdbcType=VARCHAR},
      </if>
      <if test="record.originalRate != null">
        original_rate = #{record.originalRate,jdbcType=DECIMAL},
      </if>
      <if test="record.cashierSourceName != null">
        cashier_source_name = #{record.cashierSourceName,jdbcType=VARCHAR},
      </if>
      <if test="record.cashierDetailName != null">
        cashier_detail_name = #{record.cashierDetailName,jdbcType=VARCHAR},
      </if>
      <if test="record.cashierCode != null">
        cashier_code = #{record.cashierCode,jdbcType=VARCHAR},
      </if>
      <if test="record.casherTransactionType != null">
        casher_transaction_type = #{record.casherTransactionType,jdbcType=VARCHAR},
      </if>
      <if test="record.cashierId != null">
        cashier_id = #{record.cashierId,jdbcType=INTEGER},
      </if>
      <if test="record.cashierOtherOrderCode != null">
        cashier_other_order_code = #{record.cashierOtherOrderCode,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_handlefee
    set id = #{record.id,jdbcType=INTEGER},
      cw_id = #{record.cwId,jdbcType=INTEGER},
      trad_code = #{record.tradCode,jdbcType=VARCHAR},
      subject_value_from = #{record.subjectValueFrom,jdbcType=INTEGER},
      subject_name_from = #{record.subjectNameFrom,jdbcType=VARCHAR},
      pay_account_iDFrom = #{record.payAccountIdfrom,jdbcType=INTEGER},
      bank_name_from = #{record.bankNameFrom,jdbcType=VARCHAR},
      bank_card_from = #{record.bankCardFrom,jdbcType=VARCHAR},
      bank_card_user_from = #{record.bankCardUserFrom,jdbcType=VARCHAR},
      supplier_iDFrom = #{record.supplierIdfrom,jdbcType=INTEGER},
      supplier_name_from = #{record.supplierNameFrom,jdbcType=VARCHAR},
      trade_type = #{record.tradeType,jdbcType=INTEGER},
      subject_value_to = #{record.subjectValueTo,jdbcType=VARCHAR},
      subject_name_to = #{record.subjectNameTo,jdbcType=VARCHAR},
      pay_account_iDTo = #{record.payAccountIdto,jdbcType=INTEGER},
      bank_name_to = #{record.bankNameTo,jdbcType=VARCHAR},
      bank_card_to = #{record.bankCardTo,jdbcType=VARCHAR},
      bank_card_user_to = #{record.bankCardUserTo,jdbcType=VARCHAR},
      supplier_iDTo = #{record.supplierIdto,jdbcType=INTEGER},
      supplier_name_to = #{record.supplierNameTo,jdbcType=VARCHAR},
      unit_nameto = #{record.unitNameto,jdbcType=VARCHAR},
      unit_codeto = #{record.unitCodeto,jdbcType=VARCHAR},
      rate = #{record.rate,jdbcType=DECIMAL},
      pay_moneyto = #{record.payMoneyto,jdbcType=DECIMAL},
      unit_name = #{record.unitName,jdbcType=VARCHAR},
      unit_code = #{record.unitCode,jdbcType=VARCHAR},
      pay_money = #{record.payMoney,jdbcType=DECIMAL},
      pay_money_rMB = #{record.payMoneyRmb,jdbcType=DECIMAL},
      old_money = #{record.oldMoney,jdbcType=DECIMAL},
      new_money = #{record.newMoney,jdbcType=DECIMAL},
      before_day_money = #{record.beforeDayMoney,jdbcType=DECIMAL},
      remark = #{record.remark,jdbcType=VARCHAR},
      annex = #{record.annex,jdbcType=VARCHAR},
      has_delete = #{record.hasDelete,jdbcType=TINYINT},
      delete_remark = #{record.deleteRemark,jdbcType=VARCHAR},
      create_user_iD = #{record.createUserId,jdbcType=INTEGER},
      create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      fetter_trade_iD = #{record.fetterTradeId,jdbcType=INTEGER},
      fetter_trade_code = #{record.fetterTradeCode,jdbcType=VARCHAR},
      source = #{record.source,jdbcType=VARCHAR},
      trade_category = #{record.tradeCategory,jdbcType=VARCHAR},
      payment_iD = #{record.paymentId,jdbcType=INTEGER},
      pur_category_iD = #{record.purCategoryId,jdbcType=INTEGER},
      pur_category_name = #{record.purCategoryName,jdbcType=VARCHAR},
      apply_code = #{record.applyCode,jdbcType=VARCHAR},
      original_rate = #{record.originalRate,jdbcType=DECIMAL},
      cashier_source_name = #{record.cashierSourceName,jdbcType=VARCHAR},
      cashier_detail_name = #{record.cashierDetailName,jdbcType=VARCHAR},
      cashier_code = #{record.cashierCode,jdbcType=VARCHAR},
      casher_transaction_type = #{record.casherTransactionType,jdbcType=VARCHAR},
      cashier_id = #{record.cashierId,jdbcType=INTEGER},
      cashier_other_order_code = #{record.cashierOtherOrderCode,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceHandlefee">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_handlefee
    <set>
      <if test="cwId != null">
        cw_id = #{cwId,jdbcType=INTEGER},
      </if>
      <if test="tradCode != null">
        trad_code = #{tradCode,jdbcType=VARCHAR},
      </if>
      <if test="subjectValueFrom != null">
        subject_value_from = #{subjectValueFrom,jdbcType=INTEGER},
      </if>
      <if test="subjectNameFrom != null">
        subject_name_from = #{subjectNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="payAccountIdfrom != null">
        pay_account_iDFrom = #{payAccountIdfrom,jdbcType=INTEGER},
      </if>
      <if test="bankNameFrom != null">
        bank_name_from = #{bankNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="bankCardFrom != null">
        bank_card_from = #{bankCardFrom,jdbcType=VARCHAR},
      </if>
      <if test="bankCardUserFrom != null">
        bank_card_user_from = #{bankCardUserFrom,jdbcType=VARCHAR},
      </if>
      <if test="supplierIdfrom != null">
        supplier_iDFrom = #{supplierIdfrom,jdbcType=INTEGER},
      </if>
      <if test="supplierNameFrom != null">
        supplier_name_from = #{supplierNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="tradeType != null">
        trade_type = #{tradeType,jdbcType=INTEGER},
      </if>
      <if test="subjectValueTo != null">
        subject_value_to = #{subjectValueTo,jdbcType=VARCHAR},
      </if>
      <if test="subjectNameTo != null">
        subject_name_to = #{subjectNameTo,jdbcType=VARCHAR},
      </if>
      <if test="payAccountIdto != null">
        pay_account_iDTo = #{payAccountIdto,jdbcType=INTEGER},
      </if>
      <if test="bankNameTo != null">
        bank_name_to = #{bankNameTo,jdbcType=VARCHAR},
      </if>
      <if test="bankCardTo != null">
        bank_card_to = #{bankCardTo,jdbcType=VARCHAR},
      </if>
      <if test="bankCardUserTo != null">
        bank_card_user_to = #{bankCardUserTo,jdbcType=VARCHAR},
      </if>
      <if test="supplierIdto != null">
        supplier_iDTo = #{supplierIdto,jdbcType=INTEGER},
      </if>
      <if test="supplierNameTo != null">
        supplier_name_to = #{supplierNameTo,jdbcType=VARCHAR},
      </if>
      <if test="unitNameto != null">
        unit_nameto = #{unitNameto,jdbcType=VARCHAR},
      </if>
      <if test="unitCodeto != null">
        unit_codeto = #{unitCodeto,jdbcType=VARCHAR},
      </if>
      <if test="rate != null">
        rate = #{rate,jdbcType=DECIMAL},
      </if>
      <if test="payMoneyto != null">
        pay_moneyto = #{payMoneyto,jdbcType=DECIMAL},
      </if>
      <if test="unitName != null">
        unit_name = #{unitName,jdbcType=VARCHAR},
      </if>
      <if test="unitCode != null">
        unit_code = #{unitCode,jdbcType=VARCHAR},
      </if>
      <if test="payMoney != null">
        pay_money = #{payMoney,jdbcType=DECIMAL},
      </if>
      <if test="payMoneyRmb != null">
        pay_money_rMB = #{payMoneyRmb,jdbcType=DECIMAL},
      </if>
      <if test="oldMoney != null">
        old_money = #{oldMoney,jdbcType=DECIMAL},
      </if>
      <if test="newMoney != null">
        new_money = #{newMoney,jdbcType=DECIMAL},
      </if>
      <if test="beforeDayMoney != null">
        before_day_money = #{beforeDayMoney,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="annex != null">
        annex = #{annex,jdbcType=VARCHAR},
      </if>
      <if test="hasDelete != null">
        has_delete = #{hasDelete,jdbcType=TINYINT},
      </if>
      <if test="deleteRemark != null">
        delete_remark = #{deleteRemark,jdbcType=VARCHAR},
      </if>
      <if test="createUserId != null">
        create_user_iD = #{createUserId,jdbcType=INTEGER},
      </if>
      <if test="createUserName != null">
        create_user_name = #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="fetterTradeId != null">
        fetter_trade_iD = #{fetterTradeId,jdbcType=INTEGER},
      </if>
      <if test="fetterTradeCode != null">
        fetter_trade_code = #{fetterTradeCode,jdbcType=VARCHAR},
      </if>
      <if test="source != null">
        source = #{source,jdbcType=VARCHAR},
      </if>
      <if test="tradeCategory != null">
        trade_category = #{tradeCategory,jdbcType=VARCHAR},
      </if>
      <if test="paymentId != null">
        payment_iD = #{paymentId,jdbcType=INTEGER},
      </if>
      <if test="purCategoryId != null">
        pur_category_iD = #{purCategoryId,jdbcType=INTEGER},
      </if>
      <if test="purCategoryName != null">
        pur_category_name = #{purCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="applyCode != null">
        apply_code = #{applyCode,jdbcType=VARCHAR},
      </if>
      <if test="originalRate != null">
        original_rate = #{originalRate,jdbcType=DECIMAL},
      </if>
      <if test="cashierSourceName != null">
        cashier_source_name = #{cashierSourceName,jdbcType=VARCHAR},
      </if>
      <if test="cashierDetailName != null">
        cashier_detail_name = #{cashierDetailName,jdbcType=VARCHAR},
      </if>
      <if test="cashierCode != null">
        cashier_code = #{cashierCode,jdbcType=VARCHAR},
      </if>
      <if test="casherTransactionType != null">
        casher_transaction_type = #{casherTransactionType,jdbcType=VARCHAR},
      </if>
      <if test="cashierId != null">
        cashier_id = #{cashierId,jdbcType=INTEGER},
      </if>
      <if test="cashierOtherOrderCode != null">
        cashier_other_order_code = #{cashierOtherOrderCode,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcBaseFinanceHandlefee">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_handlefee
    set cw_id = #{cwId,jdbcType=INTEGER},
      trad_code = #{tradCode,jdbcType=VARCHAR},
      subject_value_from = #{subjectValueFrom,jdbcType=INTEGER},
      subject_name_from = #{subjectNameFrom,jdbcType=VARCHAR},
      pay_account_iDFrom = #{payAccountIdfrom,jdbcType=INTEGER},
      bank_name_from = #{bankNameFrom,jdbcType=VARCHAR},
      bank_card_from = #{bankCardFrom,jdbcType=VARCHAR},
      bank_card_user_from = #{bankCardUserFrom,jdbcType=VARCHAR},
      supplier_iDFrom = #{supplierIdfrom,jdbcType=INTEGER},
      supplier_name_from = #{supplierNameFrom,jdbcType=VARCHAR},
      trade_type = #{tradeType,jdbcType=INTEGER},
      subject_value_to = #{subjectValueTo,jdbcType=VARCHAR},
      subject_name_to = #{subjectNameTo,jdbcType=VARCHAR},
      pay_account_iDTo = #{payAccountIdto,jdbcType=INTEGER},
      bank_name_to = #{bankNameTo,jdbcType=VARCHAR},
      bank_card_to = #{bankCardTo,jdbcType=VARCHAR},
      bank_card_user_to = #{bankCardUserTo,jdbcType=VARCHAR},
      supplier_iDTo = #{supplierIdto,jdbcType=INTEGER},
      supplier_name_to = #{supplierNameTo,jdbcType=VARCHAR},
      unit_nameto = #{unitNameto,jdbcType=VARCHAR},
      unit_codeto = #{unitCodeto,jdbcType=VARCHAR},
      rate = #{rate,jdbcType=DECIMAL},
      pay_moneyto = #{payMoneyto,jdbcType=DECIMAL},
      unit_name = #{unitName,jdbcType=VARCHAR},
      unit_code = #{unitCode,jdbcType=VARCHAR},
      pay_money = #{payMoney,jdbcType=DECIMAL},
      pay_money_rMB = #{payMoneyRmb,jdbcType=DECIMAL},
      old_money = #{oldMoney,jdbcType=DECIMAL},
      new_money = #{newMoney,jdbcType=DECIMAL},
      before_day_money = #{beforeDayMoney,jdbcType=DECIMAL},
      remark = #{remark,jdbcType=VARCHAR},
      annex = #{annex,jdbcType=VARCHAR},
      has_delete = #{hasDelete,jdbcType=TINYINT},
      delete_remark = #{deleteRemark,jdbcType=VARCHAR},
      create_user_iD = #{createUserId,jdbcType=INTEGER},
      create_user_name = #{createUserName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      fetter_trade_iD = #{fetterTradeId,jdbcType=INTEGER},
      fetter_trade_code = #{fetterTradeCode,jdbcType=VARCHAR},
      source = #{source,jdbcType=VARCHAR},
      trade_category = #{tradeCategory,jdbcType=VARCHAR},
      payment_iD = #{paymentId,jdbcType=INTEGER},
      pur_category_iD = #{purCategoryId,jdbcType=INTEGER},
      pur_category_name = #{purCategoryName,jdbcType=VARCHAR},
      apply_code = #{applyCode,jdbcType=VARCHAR},
      original_rate = #{originalRate,jdbcType=DECIMAL},
      cashier_source_name = #{cashierSourceName,jdbcType=VARCHAR},
      cashier_detail_name = #{cashierDetailName,jdbcType=VARCHAR},
      cashier_code = #{cashierCode,jdbcType=VARCHAR},
      casher_transaction_type = #{casherTransactionType,jdbcType=VARCHAR},
      cashier_id = #{cashierId,jdbcType=INTEGER},
      cashier_other_order_code = #{cashierOtherOrderCode,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceHandlefee">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    insert into dc_base_finance_handlefee
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="cwId != null">
        cw_id,
      </if>
      <if test="tradCode != null">
        trad_code,
      </if>
      <if test="subjectValueFrom != null">
        subject_value_from,
      </if>
      <if test="subjectNameFrom != null">
        subject_name_from,
      </if>
      <if test="payAccountIdfrom != null">
        pay_account_iDFrom,
      </if>
      <if test="bankNameFrom != null">
        bank_name_from,
      </if>
      <if test="bankCardFrom != null">
        bank_card_from,
      </if>
      <if test="bankCardUserFrom != null">
        bank_card_user_from,
      </if>
      <if test="supplierIdfrom != null">
        supplier_iDFrom,
      </if>
      <if test="supplierNameFrom != null">
        supplier_name_from,
      </if>
      <if test="tradeType != null">
        trade_type,
      </if>
      <if test="subjectValueTo != null">
        subject_value_to,
      </if>
      <if test="subjectNameTo != null">
        subject_name_to,
      </if>
      <if test="payAccountIdto != null">
        pay_account_iDTo,
      </if>
      <if test="bankNameTo != null">
        bank_name_to,
      </if>
      <if test="bankCardTo != null">
        bank_card_to,
      </if>
      <if test="bankCardUserTo != null">
        bank_card_user_to,
      </if>
      <if test="supplierIdto != null">
        supplier_iDTo,
      </if>
      <if test="supplierNameTo != null">
        supplier_name_to,
      </if>
      <if test="unitNameto != null">
        unit_nameto,
      </if>
      <if test="unitCodeto != null">
        unit_codeto,
      </if>
      <if test="rate != null">
        rate,
      </if>
      <if test="payMoneyto != null">
        pay_moneyto,
      </if>
      <if test="unitName != null">
        unit_name,
      </if>
      <if test="unitCode != null">
        unit_code,
      </if>
      <if test="payMoney != null">
        pay_money,
      </if>
      <if test="payMoneyRmb != null">
        pay_money_rMB,
      </if>
      <if test="oldMoney != null">
        old_money,
      </if>
      <if test="newMoney != null">
        new_money,
      </if>
      <if test="beforeDayMoney != null">
        before_day_money,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="annex != null">
        annex,
      </if>
      <if test="hasDelete != null">
        has_delete,
      </if>
      <if test="deleteRemark != null">
        delete_remark,
      </if>
      <if test="createUserId != null">
        create_user_iD,
      </if>
      <if test="createUserName != null">
        create_user_name,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="fetterTradeId != null">
        fetter_trade_iD,
      </if>
      <if test="fetterTradeCode != null">
        fetter_trade_code,
      </if>
      <if test="source != null">
        source,
      </if>
      <if test="tradeCategory != null">
        trade_category,
      </if>
      <if test="paymentId != null">
        payment_iD,
      </if>
      <if test="purCategoryId != null">
        pur_category_iD,
      </if>
      <if test="purCategoryName != null">
        pur_category_name,
      </if>
      <if test="applyCode != null">
        apply_code,
      </if>
      <if test="originalRate != null">
        original_rate,
      </if>
      <if test="cashierSourceName != null">
        cashier_source_name,
      </if>
      <if test="cashierDetailName != null">
        cashier_detail_name,
      </if>
      <if test="cashierCode != null">
        cashier_code,
      </if>
      <if test="casherTransactionType != null">
        casher_transaction_type,
      </if>
      <if test="cashierId != null">
        cashier_id,
      </if>
      <if test="cashierOtherOrderCode != null">
        cashier_other_order_code,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="cwId != null">
        #{cwId,jdbcType=INTEGER},
      </if>
      <if test="tradCode != null">
        #{tradCode,jdbcType=VARCHAR},
      </if>
      <if test="subjectValueFrom != null">
        #{subjectValueFrom,jdbcType=INTEGER},
      </if>
      <if test="subjectNameFrom != null">
        #{subjectNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="payAccountIdfrom != null">
        #{payAccountIdfrom,jdbcType=INTEGER},
      </if>
      <if test="bankNameFrom != null">
        #{bankNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="bankCardFrom != null">
        #{bankCardFrom,jdbcType=VARCHAR},
      </if>
      <if test="bankCardUserFrom != null">
        #{bankCardUserFrom,jdbcType=VARCHAR},
      </if>
      <if test="supplierIdfrom != null">
        #{supplierIdfrom,jdbcType=INTEGER},
      </if>
      <if test="supplierNameFrom != null">
        #{supplierNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="tradeType != null">
        #{tradeType,jdbcType=INTEGER},
      </if>
      <if test="subjectValueTo != null">
        #{subjectValueTo,jdbcType=VARCHAR},
      </if>
      <if test="subjectNameTo != null">
        #{subjectNameTo,jdbcType=VARCHAR},
      </if>
      <if test="payAccountIdto != null">
        #{payAccountIdto,jdbcType=INTEGER},
      </if>
      <if test="bankNameTo != null">
        #{bankNameTo,jdbcType=VARCHAR},
      </if>
      <if test="bankCardTo != null">
        #{bankCardTo,jdbcType=VARCHAR},
      </if>
      <if test="bankCardUserTo != null">
        #{bankCardUserTo,jdbcType=VARCHAR},
      </if>
      <if test="supplierIdto != null">
        #{supplierIdto,jdbcType=INTEGER},
      </if>
      <if test="supplierNameTo != null">
        #{supplierNameTo,jdbcType=VARCHAR},
      </if>
      <if test="unitNameto != null">
        #{unitNameto,jdbcType=VARCHAR},
      </if>
      <if test="unitCodeto != null">
        #{unitCodeto,jdbcType=VARCHAR},
      </if>
      <if test="rate != null">
        #{rate,jdbcType=DECIMAL},
      </if>
      <if test="payMoneyto != null">
        #{payMoneyto,jdbcType=DECIMAL},
      </if>
      <if test="unitName != null">
        #{unitName,jdbcType=VARCHAR},
      </if>
      <if test="unitCode != null">
        #{unitCode,jdbcType=VARCHAR},
      </if>
      <if test="payMoney != null">
        #{payMoney,jdbcType=DECIMAL},
      </if>
      <if test="payMoneyRmb != null">
        #{payMoneyRmb,jdbcType=DECIMAL},
      </if>
      <if test="oldMoney != null">
        #{oldMoney,jdbcType=DECIMAL},
      </if>
      <if test="newMoney != null">
        #{newMoney,jdbcType=DECIMAL},
      </if>
      <if test="beforeDayMoney != null">
        #{beforeDayMoney,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="annex != null">
        #{annex,jdbcType=VARCHAR},
      </if>
      <if test="hasDelete != null">
        #{hasDelete,jdbcType=TINYINT},
      </if>
      <if test="deleteRemark != null">
        #{deleteRemark,jdbcType=VARCHAR},
      </if>
      <if test="createUserId != null">
        #{createUserId,jdbcType=INTEGER},
      </if>
      <if test="createUserName != null">
        #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="fetterTradeId != null">
        #{fetterTradeId,jdbcType=INTEGER},
      </if>
      <if test="fetterTradeCode != null">
        #{fetterTradeCode,jdbcType=VARCHAR},
      </if>
      <if test="source != null">
        #{source,jdbcType=VARCHAR},
      </if>
      <if test="tradeCategory != null">
        #{tradeCategory,jdbcType=VARCHAR},
      </if>
      <if test="paymentId != null">
        #{paymentId,jdbcType=INTEGER},
      </if>
      <if test="purCategoryId != null">
        #{purCategoryId,jdbcType=INTEGER},
      </if>
      <if test="purCategoryName != null">
        #{purCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="applyCode != null">
        #{applyCode,jdbcType=VARCHAR},
      </if>
      <if test="originalRate != null">
        #{originalRate,jdbcType=DECIMAL},
      </if>
      <if test="cashierSourceName != null">
        #{cashierSourceName,jdbcType=VARCHAR},
      </if>
      <if test="cashierDetailName != null">
        #{cashierDetailName,jdbcType=VARCHAR},
      </if>
      <if test="cashierCode != null">
        #{cashierCode,jdbcType=VARCHAR},
      </if>
      <if test="casherTransactionType != null">
        #{casherTransactionType,jdbcType=VARCHAR},
      </if>
      <if test="cashierId != null">
        #{cashierId,jdbcType=INTEGER},
      </if>
      <if test="cashierOtherOrderCode != null">
        #{cashierOtherOrderCode,jdbcType=VARCHAR},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="cwId != null">
        cw_id = #{cwId,jdbcType=INTEGER},
      </if>
      <if test="tradCode != null">
        trad_code = #{tradCode,jdbcType=VARCHAR},
      </if>
      <if test="subjectValueFrom != null">
        subject_value_from = #{subjectValueFrom,jdbcType=INTEGER},
      </if>
      <if test="subjectNameFrom != null">
        subject_name_from = #{subjectNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="payAccountIdfrom != null">
        pay_account_iDFrom = #{payAccountIdfrom,jdbcType=INTEGER},
      </if>
      <if test="bankNameFrom != null">
        bank_name_from = #{bankNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="bankCardFrom != null">
        bank_card_from = #{bankCardFrom,jdbcType=VARCHAR},
      </if>
      <if test="bankCardUserFrom != null">
        bank_card_user_from = #{bankCardUserFrom,jdbcType=VARCHAR},
      </if>
      <if test="supplierIdfrom != null">
        supplier_iDFrom = #{supplierIdfrom,jdbcType=INTEGER},
      </if>
      <if test="supplierNameFrom != null">
        supplier_name_from = #{supplierNameFrom,jdbcType=VARCHAR},
      </if>
      <if test="tradeType != null">
        trade_type = #{tradeType,jdbcType=INTEGER},
      </if>
      <if test="subjectValueTo != null">
        subject_value_to = #{subjectValueTo,jdbcType=VARCHAR},
      </if>
      <if test="subjectNameTo != null">
        subject_name_to = #{subjectNameTo,jdbcType=VARCHAR},
      </if>
      <if test="payAccountIdto != null">
        pay_account_iDTo = #{payAccountIdto,jdbcType=INTEGER},
      </if>
      <if test="bankNameTo != null">
        bank_name_to = #{bankNameTo,jdbcType=VARCHAR},
      </if>
      <if test="bankCardTo != null">
        bank_card_to = #{bankCardTo,jdbcType=VARCHAR},
      </if>
      <if test="bankCardUserTo != null">
        bank_card_user_to = #{bankCardUserTo,jdbcType=VARCHAR},
      </if>
      <if test="supplierIdto != null">
        supplier_iDTo = #{supplierIdto,jdbcType=INTEGER},
      </if>
      <if test="supplierNameTo != null">
        supplier_name_to = #{supplierNameTo,jdbcType=VARCHAR},
      </if>
      <if test="unitNameto != null">
        unit_nameto = #{unitNameto,jdbcType=VARCHAR},
      </if>
      <if test="unitCodeto != null">
        unit_codeto = #{unitCodeto,jdbcType=VARCHAR},
      </if>
      <if test="rate != null">
        rate = #{rate,jdbcType=DECIMAL},
      </if>
      <if test="payMoneyto != null">
        pay_moneyto = #{payMoneyto,jdbcType=DECIMAL},
      </if>
      <if test="unitName != null">
        unit_name = #{unitName,jdbcType=VARCHAR},
      </if>
      <if test="unitCode != null">
        unit_code = #{unitCode,jdbcType=VARCHAR},
      </if>
      <if test="payMoney != null">
        pay_money = #{payMoney,jdbcType=DECIMAL},
      </if>
      <if test="payMoneyRmb != null">
        pay_money_rMB = #{payMoneyRmb,jdbcType=DECIMAL},
      </if>
      <if test="oldMoney != null">
        old_money = #{oldMoney,jdbcType=DECIMAL},
      </if>
      <if test="newMoney != null">
        new_money = #{newMoney,jdbcType=DECIMAL},
      </if>
      <if test="beforeDayMoney != null">
        before_day_money = #{beforeDayMoney,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="annex != null">
        annex = #{annex,jdbcType=VARCHAR},
      </if>
      <if test="hasDelete != null">
        has_delete = #{hasDelete,jdbcType=TINYINT},
      </if>
      <if test="deleteRemark != null">
        delete_remark = #{deleteRemark,jdbcType=VARCHAR},
      </if>
      <if test="createUserId != null">
        create_user_iD = #{createUserId,jdbcType=INTEGER},
      </if>
      <if test="createUserName != null">
        create_user_name = #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="fetterTradeId != null">
        fetter_trade_iD = #{fetterTradeId,jdbcType=INTEGER},
      </if>
      <if test="fetterTradeCode != null">
        fetter_trade_code = #{fetterTradeCode,jdbcType=VARCHAR},
      </if>
      <if test="source != null">
        source = #{source,jdbcType=VARCHAR},
      </if>
      <if test="tradeCategory != null">
        trade_category = #{tradeCategory,jdbcType=VARCHAR},
      </if>
      <if test="paymentId != null">
        payment_iD = #{paymentId,jdbcType=INTEGER},
      </if>
      <if test="purCategoryId != null">
        pur_category_iD = #{purCategoryId,jdbcType=INTEGER},
      </if>
      <if test="purCategoryName != null">
        pur_category_name = #{purCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="applyCode != null">
        apply_code = #{applyCode,jdbcType=VARCHAR},
      </if>
      <if test="originalRate != null">
        original_rate = #{originalRate,jdbcType=DECIMAL},
      </if>
      <if test="cashierSourceName != null">
        cashier_source_name = #{cashierSourceName,jdbcType=VARCHAR},
      </if>
      <if test="cashierDetailName != null">
        cashier_detail_name = #{cashierDetailName,jdbcType=VARCHAR},
      </if>
      <if test="cashierCode != null">
        cashier_code = #{cashierCode,jdbcType=VARCHAR},
      </if>
      <if test="casherTransactionType != null">
        casher_transaction_type = #{casherTransactionType,jdbcType=VARCHAR},
      </if>
      <if test="cashierId != null">
        cashier_id = #{cashierId,jdbcType=INTEGER},
      </if>
      <if test="cashierOtherOrderCode != null">
        cashier_other_order_code = #{cashierOtherOrderCode,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceHandlefee">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    insert into dc_base_finance_handlefee
    (id, cw_id, trad_code, subject_value_from, subject_name_from, pay_account_iDFrom, 
      bank_name_from, bank_card_from, bank_card_user_from, supplier_iDFrom, supplier_name_from, 
      trade_type, subject_value_to, subject_name_to, pay_account_iDTo, bank_name_to, 
      bank_card_to, bank_card_user_to, supplier_iDTo, supplier_name_to, unit_nameto, 
      unit_codeto, rate, pay_moneyto, unit_name, unit_code, pay_money, pay_money_rMB, 
      old_money, new_money, before_day_money, remark, annex, has_delete, delete_remark, 
      create_user_iD, create_user_name, create_time, fetter_trade_iD, fetter_trade_code, 
      source, trade_category, payment_iD, pur_category_iD, pur_category_name, apply_code, 
      original_rate, cashier_source_name, cashier_detail_name, cashier_code, casher_transaction_type, 
      cashier_id, cashier_other_order_code)
    values
    (#{id,jdbcType=INTEGER}, #{cwId,jdbcType=INTEGER}, #{tradCode,jdbcType=VARCHAR}, 
      #{subjectValueFrom,jdbcType=INTEGER}, #{subjectNameFrom,jdbcType=VARCHAR}, #{payAccountIdfrom,jdbcType=INTEGER}, 
      #{bankNameFrom,jdbcType=VARCHAR}, #{bankCardFrom,jdbcType=VARCHAR}, #{bankCardUserFrom,jdbcType=VARCHAR}, 
      #{supplierIdfrom,jdbcType=INTEGER}, #{supplierNameFrom,jdbcType=VARCHAR}, #{tradeType,jdbcType=INTEGER}, 
      #{subjectValueTo,jdbcType=VARCHAR}, #{subjectNameTo,jdbcType=VARCHAR}, #{payAccountIdto,jdbcType=INTEGER}, 
      #{bankNameTo,jdbcType=VARCHAR}, #{bankCardTo,jdbcType=VARCHAR}, #{bankCardUserTo,jdbcType=VARCHAR}, 
      #{supplierIdto,jdbcType=INTEGER}, #{supplierNameTo,jdbcType=VARCHAR}, #{unitNameto,jdbcType=VARCHAR}, 
      #{unitCodeto,jdbcType=VARCHAR}, #{rate,jdbcType=DECIMAL}, #{payMoneyto,jdbcType=DECIMAL}, 
      #{unitName,jdbcType=VARCHAR}, #{unitCode,jdbcType=VARCHAR}, #{payMoney,jdbcType=DECIMAL}, 
      #{payMoneyRmb,jdbcType=DECIMAL}, #{oldMoney,jdbcType=DECIMAL}, #{newMoney,jdbcType=DECIMAL}, 
      #{beforeDayMoney,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, #{annex,jdbcType=VARCHAR}, 
      #{hasDelete,jdbcType=TINYINT}, #{deleteRemark,jdbcType=VARCHAR}, #{createUserId,jdbcType=INTEGER}, 
      #{createUserName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{fetterTradeId,jdbcType=INTEGER}, 
      #{fetterTradeCode,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{tradeCategory,jdbcType=VARCHAR}, 
      #{paymentId,jdbcType=INTEGER}, #{purCategoryId,jdbcType=INTEGER}, #{purCategoryName,jdbcType=VARCHAR}, 
      #{applyCode,jdbcType=VARCHAR}, #{originalRate,jdbcType=DECIMAL}, #{cashierSourceName,jdbcType=VARCHAR}, 
      #{cashierDetailName,jdbcType=VARCHAR}, #{cashierCode,jdbcType=VARCHAR}, #{casherTransactionType,jdbcType=VARCHAR}, 
      #{cashierId,jdbcType=INTEGER}, #{cashierOtherOrderCode,jdbcType=VARCHAR})
    on duplicate key update 
    id = #{id,jdbcType=INTEGER}, 
    cw_id = #{cwId,jdbcType=INTEGER}, 
    trad_code = #{tradCode,jdbcType=VARCHAR}, 
    subject_value_from = #{subjectValueFrom,jdbcType=INTEGER}, 
    subject_name_from = #{subjectNameFrom,jdbcType=VARCHAR}, 
    pay_account_iDFrom = #{payAccountIdfrom,jdbcType=INTEGER}, 
    bank_name_from = #{bankNameFrom,jdbcType=VARCHAR}, 
    bank_card_from = #{bankCardFrom,jdbcType=VARCHAR}, 
    bank_card_user_from = #{bankCardUserFrom,jdbcType=VARCHAR}, 
    supplier_iDFrom = #{supplierIdfrom,jdbcType=INTEGER}, 
    supplier_name_from = #{supplierNameFrom,jdbcType=VARCHAR}, 
    trade_type = #{tradeType,jdbcType=INTEGER}, 
    subject_value_to = #{subjectValueTo,jdbcType=VARCHAR}, 
    subject_name_to = #{subjectNameTo,jdbcType=VARCHAR}, 
    pay_account_iDTo = #{payAccountIdto,jdbcType=INTEGER}, 
    bank_name_to = #{bankNameTo,jdbcType=VARCHAR}, 
    bank_card_to = #{bankCardTo,jdbcType=VARCHAR}, 
    bank_card_user_to = #{bankCardUserTo,jdbcType=VARCHAR}, 
    supplier_iDTo = #{supplierIdto,jdbcType=INTEGER}, 
    supplier_name_to = #{supplierNameTo,jdbcType=VARCHAR}, 
    unit_nameto = #{unitNameto,jdbcType=VARCHAR}, 
    unit_codeto = #{unitCodeto,jdbcType=VARCHAR}, 
    rate = #{rate,jdbcType=DECIMAL}, 
    pay_moneyto = #{payMoneyto,jdbcType=DECIMAL}, 
    unit_name = #{unitName,jdbcType=VARCHAR}, 
    unit_code = #{unitCode,jdbcType=VARCHAR}, 
    pay_money = #{payMoney,jdbcType=DECIMAL}, 
    pay_money_rMB = #{payMoneyRmb,jdbcType=DECIMAL}, 
    old_money = #{oldMoney,jdbcType=DECIMAL}, 
    new_money = #{newMoney,jdbcType=DECIMAL}, 
    before_day_money = #{beforeDayMoney,jdbcType=DECIMAL}, 
    remark = #{remark,jdbcType=VARCHAR}, 
    annex = #{annex,jdbcType=VARCHAR}, 
    has_delete = #{hasDelete,jdbcType=TINYINT}, 
    delete_remark = #{deleteRemark,jdbcType=VARCHAR}, 
    create_user_iD = #{createUserId,jdbcType=INTEGER}, 
    create_user_name = #{createUserName,jdbcType=VARCHAR}, 
    create_time = #{createTime,jdbcType=TIMESTAMP}, 
    fetter_trade_iD = #{fetterTradeId,jdbcType=INTEGER}, 
    fetter_trade_code = #{fetterTradeCode,jdbcType=VARCHAR}, 
    source = #{source,jdbcType=VARCHAR}, 
    trade_category = #{tradeCategory,jdbcType=VARCHAR}, 
    payment_iD = #{paymentId,jdbcType=INTEGER}, 
    pur_category_iD = #{purCategoryId,jdbcType=INTEGER}, 
    pur_category_name = #{purCategoryName,jdbcType=VARCHAR}, 
    apply_code = #{applyCode,jdbcType=VARCHAR}, 
    original_rate = #{originalRate,jdbcType=DECIMAL}, 
    cashier_source_name = #{cashierSourceName,jdbcType=VARCHAR}, 
    cashier_detail_name = #{cashierDetailName,jdbcType=VARCHAR}, 
    cashier_code = #{cashierCode,jdbcType=VARCHAR}, 
    casher_transaction_type = #{casherTransactionType,jdbcType=VARCHAR}, 
    cashier_id = #{cashierId,jdbcType=INTEGER}, 
    cashier_other_order_code = #{cashierOtherOrderCode,jdbcType=VARCHAR}
  </insert>
  <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceHandlefeeExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <include refid="Base_Column_List" />
    from dc_base_finance_handlefee
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
</mapper>