<?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.DcBaseFinanceFeeMapper">
    <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcBaseFinanceFee">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="cost_plan_no" jdbcType="VARCHAR" property="costPlanNo"/>
        <result column="cost_no" jdbcType="VARCHAR" property="costNo"/>
        <result column="cost_reason" jdbcType="VARCHAR" property="costReason"/>
        <result column="cost_form" jdbcType="INTEGER" property="costForm"/>
        <result column="company_no" jdbcType="VARCHAR" property="companyNo"/>
        <result column="company_name" jdbcType="VARCHAR" property="companyName"/>
        <result column="type_no" jdbcType="VARCHAR" property="typeNo"/>
        <result column="type_name" jdbcType="VARCHAR" property="typeName"/>
        <result column="kind_no" jdbcType="VARCHAR" property="kindNo"/>
        <result column="kind_name" jdbcType="VARCHAR" property="kindName"/>
        <result column="create_userid" jdbcType="INTEGER" property="createUserid"/>
        <result column="create_usercode" jdbcType="VARCHAR" property="createUsercode"/>
        <result column="create_username" jdbcType="VARCHAR" property="createUsername"/>
        <result column="cost_remark" jdbcType="VARCHAR" property="costRemark"/>
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
        <result column="cost_status" jdbcType="INTEGER" property="costStatus"/>
        <result column="file_path" jdbcType="VARCHAR" property="filePath"/>
        <result column="mor_file_path" jdbcType="VARCHAR" property="morFilePath"/>
        <result column="amount" jdbcType="DECIMAL" property="amount"/>
        <result column="bank_name" jdbcType="VARCHAR" property="bankName"/>
        <result column="bank_card" jdbcType="VARCHAR" property="bankCard"/>
        <result column="bank_card_user" jdbcType="VARCHAR" property="bankCardUser"/>
        <result column="bank_company" jdbcType="VARCHAR" property="bankCompany"/>
        <result column="mor_remark" jdbcType="VARCHAR" property="morRemark"/>
        <result column="son_cost_no" jdbcType="VARCHAR" property="sonCostNo"/>
        <result column="sup_cost_no" jdbcType="VARCHAR" property="supCostNo"/>
        <result column="is_lend" jdbcType="INTEGER" property="isLend"/>
        <result column="had_pay" jdbcType="DECIMAL" property="hadPay"/>
        <result column="lend_status" jdbcType="INTEGER" property="lendStatus"/>
        <result column="compensate" jdbcType="DECIMAL" property="compensate"/>
        <result column="counteract" jdbcType="DECIMAL" property="counteract"/>
        <result column="lend_balance" jdbcType="DECIMAL" property="lendBalance"/>
        <result column="reject_reason" jdbcType="VARCHAR" property="rejectReason"/>
        <result column="dic" jdbcType="VARCHAR" property="dic"/>
        <result column="pay_counteract" jdbcType="DECIMAL" property="payCounteract"/>
        <result column="pay_lend_balance" jdbcType="DECIMAL" property="payLendBalance"/>
        <result column="pay_plan_amount" jdbcType="DECIMAL" property="payPlanAmount"/>
        <result column="pay_dic" jdbcType="VARCHAR" property="payDic"/>
        <result column="pay_cur" jdbcType="DECIMAL" property="payCur"/>
        <result column="is_tax" jdbcType="INTEGER" property="isTax"/>
        <result column="detail_key" jdbcType="VARCHAR" property="detailKey"/>
        <result column="pay_user_id" jdbcType="INTEGER" property="payUserId"/>
        <result column="pay_time" jdbcType="TIMESTAMP" property="payTime"/>
        <result column="amount_rmb" jdbcType="DECIMAL" property="amountRmb"/>
        <result column="to_rmb_rate" jdbcType="DECIMAL" property="toRmbRate"/>
        <result column="sub_logistics_supplier_id" jdbcType="INTEGER" property="subLogisticsSupplierId"/>
        <result column="logistics_supplier_id" jdbcType="INTEGER" property="logisticsSupplierId"/>
        <result column="subject_code" jdbcType="VARCHAR" property="subjectCode"/>
        <result column="company_value" jdbcType="INTEGER" property="companyValue"/>
        <result column="audit_time" jdbcType="TIMESTAMP" property="auditTime"/>
        <result column="last_modify_date" jdbcType="TIMESTAMP" property="lastModifyDate"/>
        <result column="bj_create" jdbcType="TIMESTAMP" property="bjCreate"/>
        <result column="bj_modified" jdbcType="TIMESTAMP" property="bjModified"/>
    </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, cost_plan_no, cost_no, cost_reason, cost_form, company_no, company_name, type_no,
        type_name, kind_no, kind_name, create_userid, create_usercode, create_username, cost_remark,
        create_time, cost_status, file_path, mor_file_path, amount, bank_name, bank_card,
        bank_card_user, bank_company, mor_remark, son_cost_no, sup_cost_no, is_lend, had_pay,
        lend_status, compensate, counteract, lend_balance, reject_reason, dic, pay_counteract,
        pay_lend_balance, pay_plan_amount, pay_dic, pay_cur, is_tax, detail_key, pay_user_id,
        pay_time, amount_rmb, to_rmb_rate, sub_logistics_supplier_id, logistics_supplier_id,
        subject_code, company_value, audit_time, last_modify_date, bj_create, bj_modified
    </sql>
    <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceFeeExample"
            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_fee
        <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_fee
        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_fee
        where id = #{id,jdbcType=INTEGER}
    </delete>
    <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceFeeExample">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        delete from dc_base_finance_fee
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
    </delete>
    <insert id="insert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceFee">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into dc_base_finance_fee (id, cost_plan_no, cost_no,
        cost_reason, cost_form, company_no,
        company_name, type_no, type_name,
        kind_no, kind_name, create_userid,
        create_usercode, create_username, cost_remark,
        create_time, cost_status, file_path,
        mor_file_path, amount, bank_name,
        bank_card, bank_card_user, bank_company,
        mor_remark, son_cost_no, sup_cost_no,
        is_lend, had_pay, lend_status,
        compensate, counteract, lend_balance,
        reject_reason, dic, pay_counteract,
        pay_lend_balance, pay_plan_amount, pay_dic,
        pay_cur, is_tax, detail_key,
        pay_user_id, pay_time, amount_rmb,
        to_rmb_rate, sub_logistics_supplier_id, logistics_supplier_id,
        subject_code, company_value, audit_time,
        last_modify_date, bj_create, bj_modified
        )
        values (#{id,jdbcType=INTEGER}, #{costPlanNo,jdbcType=VARCHAR}, #{costNo,jdbcType=VARCHAR},
        #{costReason,jdbcType=VARCHAR}, #{costForm,jdbcType=INTEGER}, #{companyNo,jdbcType=VARCHAR},
        #{companyName,jdbcType=VARCHAR}, #{typeNo,jdbcType=VARCHAR}, #{typeName,jdbcType=VARCHAR},
        #{kindNo,jdbcType=VARCHAR}, #{kindName,jdbcType=VARCHAR}, #{createUserid,jdbcType=INTEGER},
        #{createUsercode,jdbcType=VARCHAR}, #{createUsername,jdbcType=VARCHAR}, #{costRemark,jdbcType=VARCHAR},
        #{createTime,jdbcType=TIMESTAMP}, #{costStatus,jdbcType=INTEGER}, #{filePath,jdbcType=VARCHAR},
        #{morFilePath,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{bankName,jdbcType=VARCHAR},
        #{bankCard,jdbcType=VARCHAR}, #{bankCardUser,jdbcType=VARCHAR}, #{bankCompany,jdbcType=VARCHAR},
        #{morRemark,jdbcType=VARCHAR}, #{sonCostNo,jdbcType=VARCHAR}, #{supCostNo,jdbcType=VARCHAR},
        #{isLend,jdbcType=INTEGER}, #{hadPay,jdbcType=DECIMAL}, #{lendStatus,jdbcType=INTEGER},
        #{compensate,jdbcType=DECIMAL}, #{counteract,jdbcType=DECIMAL}, #{lendBalance,jdbcType=DECIMAL},
        #{rejectReason,jdbcType=VARCHAR}, #{dic,jdbcType=VARCHAR}, #{payCounteract,jdbcType=DECIMAL},
        #{payLendBalance,jdbcType=DECIMAL}, #{payPlanAmount,jdbcType=DECIMAL}, #{payDic,jdbcType=VARCHAR},
        #{payCur,jdbcType=DECIMAL}, #{isTax,jdbcType=INTEGER}, #{detailKey,jdbcType=VARCHAR},
        #{payUserId,jdbcType=INTEGER}, #{payTime,jdbcType=TIMESTAMP}, #{amountRmb,jdbcType=DECIMAL},
        #{toRmbRate,jdbcType=DECIMAL}, #{subLogisticsSupplierId,jdbcType=INTEGER},
        #{logisticsSupplierId,jdbcType=INTEGER},
        #{subjectCode,jdbcType=VARCHAR}, #{companyValue,jdbcType=INTEGER}, #{auditTime,jdbcType=TIMESTAMP},
        #{lastModifyDate,jdbcType=TIMESTAMP}, #{bjCreate,jdbcType=TIMESTAMP}, #{bjModified,jdbcType=TIMESTAMP}
        )
    </insert>
    <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceFee">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into dc_base_finance_fee
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="costPlanNo != null">
                cost_plan_no,
            </if>
            <if test="costNo != null">
                cost_no,
            </if>
            <if test="costReason != null">
                cost_reason,
            </if>
            <if test="costForm != null">
                cost_form,
            </if>
            <if test="companyNo != null">
                company_no,
            </if>
            <if test="companyName != null">
                company_name,
            </if>
            <if test="typeNo != null">
                type_no,
            </if>
            <if test="typeName != null">
                type_name,
            </if>
            <if test="kindNo != null">
                kind_no,
            </if>
            <if test="kindName != null">
                kind_name,
            </if>
            <if test="createUserid != null">
                create_userid,
            </if>
            <if test="createUsercode != null">
                create_usercode,
            </if>
            <if test="createUsername != null">
                create_username,
            </if>
            <if test="costRemark != null">
                cost_remark,
            </if>
            <if test="createTime != null">
                create_time,
            </if>
            <if test="costStatus != null">
                cost_status,
            </if>
            <if test="filePath != null">
                file_path,
            </if>
            <if test="morFilePath != null">
                mor_file_path,
            </if>
            <if test="amount != null">
                amount,
            </if>
            <if test="bankName != null">
                bank_name,
            </if>
            <if test="bankCard != null">
                bank_card,
            </if>
            <if test="bankCardUser != null">
                bank_card_user,
            </if>
            <if test="bankCompany != null">
                bank_company,
            </if>
            <if test="morRemark != null">
                mor_remark,
            </if>
            <if test="sonCostNo != null">
                son_cost_no,
            </if>
            <if test="supCostNo != null">
                sup_cost_no,
            </if>
            <if test="isLend != null">
                is_lend,
            </if>
            <if test="hadPay != null">
                had_pay,
            </if>
            <if test="lendStatus != null">
                lend_status,
            </if>
            <if test="compensate != null">
                compensate,
            </if>
            <if test="counteract != null">
                counteract,
            </if>
            <if test="lendBalance != null">
                lend_balance,
            </if>
            <if test="rejectReason != null">
                reject_reason,
            </if>
            <if test="dic != null">
                dic,
            </if>
            <if test="payCounteract != null">
                pay_counteract,
            </if>
            <if test="payLendBalance != null">
                pay_lend_balance,
            </if>
            <if test="payPlanAmount != null">
                pay_plan_amount,
            </if>
            <if test="payDic != null">
                pay_dic,
            </if>
            <if test="payCur != null">
                pay_cur,
            </if>
            <if test="isTax != null">
                is_tax,
            </if>
            <if test="detailKey != null">
                detail_key,
            </if>
            <if test="payUserId != null">
                pay_user_id,
            </if>
            <if test="payTime != null">
                pay_time,
            </if>
            <if test="amountRmb != null">
                amount_rmb,
            </if>
            <if test="toRmbRate != null">
                to_rmb_rate,
            </if>
            <if test="subLogisticsSupplierId != null">
                sub_logistics_supplier_id,
            </if>
            <if test="logisticsSupplierId != null">
                logistics_supplier_id,
            </if>
            <if test="subjectCode != null">
                subject_code,
            </if>
            <if test="companyValue != null">
                company_value,
            </if>
            <if test="auditTime != null">
                audit_time,
            </if>
            <if test="lastModifyDate != null">
                last_modify_date,
            </if>
            <if test="bjCreate != null">
                bj_create,
            </if>
            <if test="bjModified != null">
                bj_modified,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=INTEGER},
            </if>
            <if test="costPlanNo != null">
                #{costPlanNo,jdbcType=VARCHAR},
            </if>
            <if test="costNo != null">
                #{costNo,jdbcType=VARCHAR},
            </if>
            <if test="costReason != null">
                #{costReason,jdbcType=VARCHAR},
            </if>
            <if test="costForm != null">
                #{costForm,jdbcType=INTEGER},
            </if>
            <if test="companyNo != null">
                #{companyNo,jdbcType=VARCHAR},
            </if>
            <if test="companyName != null">
                #{companyName,jdbcType=VARCHAR},
            </if>
            <if test="typeNo != null">
                #{typeNo,jdbcType=VARCHAR},
            </if>
            <if test="typeName != null">
                #{typeName,jdbcType=VARCHAR},
            </if>
            <if test="kindNo != null">
                #{kindNo,jdbcType=VARCHAR},
            </if>
            <if test="kindName != null">
                #{kindName,jdbcType=VARCHAR},
            </if>
            <if test="createUserid != null">
                #{createUserid,jdbcType=INTEGER},
            </if>
            <if test="createUsercode != null">
                #{createUsercode,jdbcType=VARCHAR},
            </if>
            <if test="createUsername != null">
                #{createUsername,jdbcType=VARCHAR},
            </if>
            <if test="costRemark != null">
                #{costRemark,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="costStatus != null">
                #{costStatus,jdbcType=INTEGER},
            </if>
            <if test="filePath != null">
                #{filePath,jdbcType=VARCHAR},
            </if>
            <if test="morFilePath != null">
                #{morFilePath,jdbcType=VARCHAR},
            </if>
            <if test="amount != null">
                #{amount,jdbcType=DECIMAL},
            </if>
            <if test="bankName != null">
                #{bankName,jdbcType=VARCHAR},
            </if>
            <if test="bankCard != null">
                #{bankCard,jdbcType=VARCHAR},
            </if>
            <if test="bankCardUser != null">
                #{bankCardUser,jdbcType=VARCHAR},
            </if>
            <if test="bankCompany != null">
                #{bankCompany,jdbcType=VARCHAR},
            </if>
            <if test="morRemark != null">
                #{morRemark,jdbcType=VARCHAR},
            </if>
            <if test="sonCostNo != null">
                #{sonCostNo,jdbcType=VARCHAR},
            </if>
            <if test="supCostNo != null">
                #{supCostNo,jdbcType=VARCHAR},
            </if>
            <if test="isLend != null">
                #{isLend,jdbcType=INTEGER},
            </if>
            <if test="hadPay != null">
                #{hadPay,jdbcType=DECIMAL},
            </if>
            <if test="lendStatus != null">
                #{lendStatus,jdbcType=INTEGER},
            </if>
            <if test="compensate != null">
                #{compensate,jdbcType=DECIMAL},
            </if>
            <if test="counteract != null">
                #{counteract,jdbcType=DECIMAL},
            </if>
            <if test="lendBalance != null">
                #{lendBalance,jdbcType=DECIMAL},
            </if>
            <if test="rejectReason != null">
                #{rejectReason,jdbcType=VARCHAR},
            </if>
            <if test="dic != null">
                #{dic,jdbcType=VARCHAR},
            </if>
            <if test="payCounteract != null">
                #{payCounteract,jdbcType=DECIMAL},
            </if>
            <if test="payLendBalance != null">
                #{payLendBalance,jdbcType=DECIMAL},
            </if>
            <if test="payPlanAmount != null">
                #{payPlanAmount,jdbcType=DECIMAL},
            </if>
            <if test="payDic != null">
                #{payDic,jdbcType=VARCHAR},
            </if>
            <if test="payCur != null">
                #{payCur,jdbcType=DECIMAL},
            </if>
            <if test="isTax != null">
                #{isTax,jdbcType=INTEGER},
            </if>
            <if test="detailKey != null">
                #{detailKey,jdbcType=VARCHAR},
            </if>
            <if test="payUserId != null">
                #{payUserId,jdbcType=INTEGER},
            </if>
            <if test="payTime != null">
                #{payTime,jdbcType=TIMESTAMP},
            </if>
            <if test="amountRmb != null">
                #{amountRmb,jdbcType=DECIMAL},
            </if>
            <if test="toRmbRate != null">
                #{toRmbRate,jdbcType=DECIMAL},
            </if>
            <if test="subLogisticsSupplierId != null">
                #{subLogisticsSupplierId,jdbcType=INTEGER},
            </if>
            <if test="logisticsSupplierId != null">
                #{logisticsSupplierId,jdbcType=INTEGER},
            </if>
            <if test="subjectCode != null">
                #{subjectCode,jdbcType=VARCHAR},
            </if>
            <if test="companyValue != null">
                #{companyValue,jdbcType=INTEGER},
            </if>
            <if test="auditTime != null">
                #{auditTime,jdbcType=TIMESTAMP},
            </if>
            <if test="lastModifyDate != null">
                #{lastModifyDate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjCreate != null">
                #{bjCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjModified != null">
                #{bjModified,jdbcType=TIMESTAMP},
            </if>
        </trim>
    </insert>
    <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceFeeExample"
            resultType="java.lang.Long">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        select count(*) from dc_base_finance_fee
        <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_fee
        <set>
            <if test="record.id != null">
                id = #{record.id,jdbcType=INTEGER},
            </if>
            <if test="record.costPlanNo != null">
                cost_plan_no = #{record.costPlanNo,jdbcType=VARCHAR},
            </if>
            <if test="record.costNo != null">
                cost_no = #{record.costNo,jdbcType=VARCHAR},
            </if>
            <if test="record.costReason != null">
                cost_reason = #{record.costReason,jdbcType=VARCHAR},
            </if>
            <if test="record.costForm != null">
                cost_form = #{record.costForm,jdbcType=INTEGER},
            </if>
            <if test="record.companyNo != null">
                company_no = #{record.companyNo,jdbcType=VARCHAR},
            </if>
            <if test="record.companyName != null">
                company_name = #{record.companyName,jdbcType=VARCHAR},
            </if>
            <if test="record.typeNo != null">
                type_no = #{record.typeNo,jdbcType=VARCHAR},
            </if>
            <if test="record.typeName != null">
                type_name = #{record.typeName,jdbcType=VARCHAR},
            </if>
            <if test="record.kindNo != null">
                kind_no = #{record.kindNo,jdbcType=VARCHAR},
            </if>
            <if test="record.kindName != null">
                kind_name = #{record.kindName,jdbcType=VARCHAR},
            </if>
            <if test="record.createUserid != null">
                create_userid = #{record.createUserid,jdbcType=INTEGER},
            </if>
            <if test="record.createUsercode != null">
                create_usercode = #{record.createUsercode,jdbcType=VARCHAR},
            </if>
            <if test="record.createUsername != null">
                create_username = #{record.createUsername,jdbcType=VARCHAR},
            </if>
            <if test="record.costRemark != null">
                cost_remark = #{record.costRemark,jdbcType=VARCHAR},
            </if>
            <if test="record.createTime != null">
                create_time = #{record.createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="record.costStatus != null">
                cost_status = #{record.costStatus,jdbcType=INTEGER},
            </if>
            <if test="record.filePath != null">
                file_path = #{record.filePath,jdbcType=VARCHAR},
            </if>
            <if test="record.morFilePath != null">
                mor_file_path = #{record.morFilePath,jdbcType=VARCHAR},
            </if>
            <if test="record.amount != null">
                amount = #{record.amount,jdbcType=DECIMAL},
            </if>
            <if test="record.bankName != null">
                bank_name = #{record.bankName,jdbcType=VARCHAR},
            </if>
            <if test="record.bankCard != null">
                bank_card = #{record.bankCard,jdbcType=VARCHAR},
            </if>
            <if test="record.bankCardUser != null">
                bank_card_user = #{record.bankCardUser,jdbcType=VARCHAR},
            </if>
            <if test="record.bankCompany != null">
                bank_company = #{record.bankCompany,jdbcType=VARCHAR},
            </if>
            <if test="record.morRemark != null">
                mor_remark = #{record.morRemark,jdbcType=VARCHAR},
            </if>
            <if test="record.sonCostNo != null">
                son_cost_no = #{record.sonCostNo,jdbcType=VARCHAR},
            </if>
            <if test="record.supCostNo != null">
                sup_cost_no = #{record.supCostNo,jdbcType=VARCHAR},
            </if>
            <if test="record.isLend != null">
                is_lend = #{record.isLend,jdbcType=INTEGER},
            </if>
            <if test="record.hadPay != null">
                had_pay = #{record.hadPay,jdbcType=DECIMAL},
            </if>
            <if test="record.lendStatus != null">
                lend_status = #{record.lendStatus,jdbcType=INTEGER},
            </if>
            <if test="record.compensate != null">
                compensate = #{record.compensate,jdbcType=DECIMAL},
            </if>
            <if test="record.counteract != null">
                counteract = #{record.counteract,jdbcType=DECIMAL},
            </if>
            <if test="record.lendBalance != null">
                lend_balance = #{record.lendBalance,jdbcType=DECIMAL},
            </if>
            <if test="record.rejectReason != null">
                reject_reason = #{record.rejectReason,jdbcType=VARCHAR},
            </if>
            <if test="record.dic != null">
                dic = #{record.dic,jdbcType=VARCHAR},
            </if>
            <if test="record.payCounteract != null">
                pay_counteract = #{record.payCounteract,jdbcType=DECIMAL},
            </if>
            <if test="record.payLendBalance != null">
                pay_lend_balance = #{record.payLendBalance,jdbcType=DECIMAL},
            </if>
            <if test="record.payPlanAmount != null">
                pay_plan_amount = #{record.payPlanAmount,jdbcType=DECIMAL},
            </if>
            <if test="record.payDic != null">
                pay_dic = #{record.payDic,jdbcType=VARCHAR},
            </if>
            <if test="record.payCur != null">
                pay_cur = #{record.payCur,jdbcType=DECIMAL},
            </if>
            <if test="record.isTax != null">
                is_tax = #{record.isTax,jdbcType=INTEGER},
            </if>
            <if test="record.detailKey != null">
                detail_key = #{record.detailKey,jdbcType=VARCHAR},
            </if>
            <if test="record.payUserId != null">
                pay_user_id = #{record.payUserId,jdbcType=INTEGER},
            </if>
            <if test="record.payTime != null">
                pay_time = #{record.payTime,jdbcType=TIMESTAMP},
            </if>
            <if test="record.amountRmb != null">
                amount_rmb = #{record.amountRmb,jdbcType=DECIMAL},
            </if>
            <if test="record.toRmbRate != null">
                to_rmb_rate = #{record.toRmbRate,jdbcType=DECIMAL},
            </if>
            <if test="record.subLogisticsSupplierId != null">
                sub_logistics_supplier_id = #{record.subLogisticsSupplierId,jdbcType=INTEGER},
            </if>
            <if test="record.logisticsSupplierId != null">
                logistics_supplier_id = #{record.logisticsSupplierId,jdbcType=INTEGER},
            </if>
            <if test="record.subjectCode != null">
                subject_code = #{record.subjectCode,jdbcType=VARCHAR},
            </if>
            <if test="record.companyValue != null">
                company_value = #{record.companyValue,jdbcType=INTEGER},
            </if>
            <if test="record.auditTime != null">
                audit_time = #{record.auditTime,jdbcType=TIMESTAMP},
            </if>
            <if test="record.lastModifyDate != null">
                last_modify_date = #{record.lastModifyDate,jdbcType=TIMESTAMP},
            </if>
            <if test="record.bjCreate != null">
                bj_create = #{record.bjCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="record.bjModified != null">
                bj_modified = #{record.bjModified,jdbcType=TIMESTAMP},
            </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_fee
        set id = #{record.id,jdbcType=INTEGER},
        cost_plan_no = #{record.costPlanNo,jdbcType=VARCHAR},
        cost_no = #{record.costNo,jdbcType=VARCHAR},
        cost_reason = #{record.costReason,jdbcType=VARCHAR},
        cost_form = #{record.costForm,jdbcType=INTEGER},
        company_no = #{record.companyNo,jdbcType=VARCHAR},
        company_name = #{record.companyName,jdbcType=VARCHAR},
        type_no = #{record.typeNo,jdbcType=VARCHAR},
        type_name = #{record.typeName,jdbcType=VARCHAR},
        kind_no = #{record.kindNo,jdbcType=VARCHAR},
        kind_name = #{record.kindName,jdbcType=VARCHAR},
        create_userid = #{record.createUserid,jdbcType=INTEGER},
        create_usercode = #{record.createUsercode,jdbcType=VARCHAR},
        create_username = #{record.createUsername,jdbcType=VARCHAR},
        cost_remark = #{record.costRemark,jdbcType=VARCHAR},
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
        cost_status = #{record.costStatus,jdbcType=INTEGER},
        file_path = #{record.filePath,jdbcType=VARCHAR},
        mor_file_path = #{record.morFilePath,jdbcType=VARCHAR},
        amount = #{record.amount,jdbcType=DECIMAL},
        bank_name = #{record.bankName,jdbcType=VARCHAR},
        bank_card = #{record.bankCard,jdbcType=VARCHAR},
        bank_card_user = #{record.bankCardUser,jdbcType=VARCHAR},
        bank_company = #{record.bankCompany,jdbcType=VARCHAR},
        mor_remark = #{record.morRemark,jdbcType=VARCHAR},
        son_cost_no = #{record.sonCostNo,jdbcType=VARCHAR},
        sup_cost_no = #{record.supCostNo,jdbcType=VARCHAR},
        is_lend = #{record.isLend,jdbcType=INTEGER},
        had_pay = #{record.hadPay,jdbcType=DECIMAL},
        lend_status = #{record.lendStatus,jdbcType=INTEGER},
        compensate = #{record.compensate,jdbcType=DECIMAL},
        counteract = #{record.counteract,jdbcType=DECIMAL},
        lend_balance = #{record.lendBalance,jdbcType=DECIMAL},
        reject_reason = #{record.rejectReason,jdbcType=VARCHAR},
        dic = #{record.dic,jdbcType=VARCHAR},
        pay_counteract = #{record.payCounteract,jdbcType=DECIMAL},
        pay_lend_balance = #{record.payLendBalance,jdbcType=DECIMAL},
        pay_plan_amount = #{record.payPlanAmount,jdbcType=DECIMAL},
        pay_dic = #{record.payDic,jdbcType=VARCHAR},
        pay_cur = #{record.payCur,jdbcType=DECIMAL},
        is_tax = #{record.isTax,jdbcType=INTEGER},
        detail_key = #{record.detailKey,jdbcType=VARCHAR},
        pay_user_id = #{record.payUserId,jdbcType=INTEGER},
        pay_time = #{record.payTime,jdbcType=TIMESTAMP},
        amount_rmb = #{record.amountRmb,jdbcType=DECIMAL},
        to_rmb_rate = #{record.toRmbRate,jdbcType=DECIMAL},
        sub_logistics_supplier_id = #{record.subLogisticsSupplierId,jdbcType=INTEGER},
        logistics_supplier_id = #{record.logisticsSupplierId,jdbcType=INTEGER},
        subject_code = #{record.subjectCode,jdbcType=VARCHAR},
        company_value = #{record.companyValue,jdbcType=INTEGER},
        audit_time = #{record.auditTime,jdbcType=TIMESTAMP},
        last_modify_date = #{record.lastModifyDate,jdbcType=TIMESTAMP},
        bj_create = #{record.bjCreate,jdbcType=TIMESTAMP},
        bj_modified = #{record.bjModified,jdbcType=TIMESTAMP}
        <if test="_parameter != null">
            <include refid="Update_By_Example_Where_Clause"/>
        </if>
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceFee">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update dc_base_finance_fee
        <set>
            <if test="costPlanNo != null">
                cost_plan_no = #{costPlanNo,jdbcType=VARCHAR},
            </if>
            <if test="costNo != null">
                cost_no = #{costNo,jdbcType=VARCHAR},
            </if>
            <if test="costReason != null">
                cost_reason = #{costReason,jdbcType=VARCHAR},
            </if>
            <if test="costForm != null">
                cost_form = #{costForm,jdbcType=INTEGER},
            </if>
            <if test="companyNo != null">
                company_no = #{companyNo,jdbcType=VARCHAR},
            </if>
            <if test="companyName != null">
                company_name = #{companyName,jdbcType=VARCHAR},
            </if>
            <if test="typeNo != null">
                type_no = #{typeNo,jdbcType=VARCHAR},
            </if>
            <if test="typeName != null">
                type_name = #{typeName,jdbcType=VARCHAR},
            </if>
            <if test="kindNo != null">
                kind_no = #{kindNo,jdbcType=VARCHAR},
            </if>
            <if test="kindName != null">
                kind_name = #{kindName,jdbcType=VARCHAR},
            </if>
            <if test="createUserid != null">
                create_userid = #{createUserid,jdbcType=INTEGER},
            </if>
            <if test="createUsercode != null">
                create_usercode = #{createUsercode,jdbcType=VARCHAR},
            </if>
            <if test="createUsername != null">
                create_username = #{createUsername,jdbcType=VARCHAR},
            </if>
            <if test="costRemark != null">
                cost_remark = #{costRemark,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                create_time = #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="costStatus != null">
                cost_status = #{costStatus,jdbcType=INTEGER},
            </if>
            <if test="filePath != null">
                file_path = #{filePath,jdbcType=VARCHAR},
            </if>
            <if test="morFilePath != null">
                mor_file_path = #{morFilePath,jdbcType=VARCHAR},
            </if>
            <if test="amount != null">
                amount = #{amount,jdbcType=DECIMAL},
            </if>
            <if test="bankName != null">
                bank_name = #{bankName,jdbcType=VARCHAR},
            </if>
            <if test="bankCard != null">
                bank_card = #{bankCard,jdbcType=VARCHAR},
            </if>
            <if test="bankCardUser != null">
                bank_card_user = #{bankCardUser,jdbcType=VARCHAR},
            </if>
            <if test="bankCompany != null">
                bank_company = #{bankCompany,jdbcType=VARCHAR},
            </if>
            <if test="morRemark != null">
                mor_remark = #{morRemark,jdbcType=VARCHAR},
            </if>
            <if test="sonCostNo != null">
                son_cost_no = #{sonCostNo,jdbcType=VARCHAR},
            </if>
            <if test="supCostNo != null">
                sup_cost_no = #{supCostNo,jdbcType=VARCHAR},
            </if>
            <if test="isLend != null">
                is_lend = #{isLend,jdbcType=INTEGER},
            </if>
            <if test="hadPay != null">
                had_pay = #{hadPay,jdbcType=DECIMAL},
            </if>
            <if test="lendStatus != null">
                lend_status = #{lendStatus,jdbcType=INTEGER},
            </if>
            <if test="compensate != null">
                compensate = #{compensate,jdbcType=DECIMAL},
            </if>
            <if test="counteract != null">
                counteract = #{counteract,jdbcType=DECIMAL},
            </if>
            <if test="lendBalance != null">
                lend_balance = #{lendBalance,jdbcType=DECIMAL},
            </if>
            <if test="rejectReason != null">
                reject_reason = #{rejectReason,jdbcType=VARCHAR},
            </if>
            <if test="dic != null">
                dic = #{dic,jdbcType=VARCHAR},
            </if>
            <if test="payCounteract != null">
                pay_counteract = #{payCounteract,jdbcType=DECIMAL},
            </if>
            <if test="payLendBalance != null">
                pay_lend_balance = #{payLendBalance,jdbcType=DECIMAL},
            </if>
            <if test="payPlanAmount != null">
                pay_plan_amount = #{payPlanAmount,jdbcType=DECIMAL},
            </if>
            <if test="payDic != null">
                pay_dic = #{payDic,jdbcType=VARCHAR},
            </if>
            <if test="payCur != null">
                pay_cur = #{payCur,jdbcType=DECIMAL},
            </if>
            <if test="isTax != null">
                is_tax = #{isTax,jdbcType=INTEGER},
            </if>
            <if test="detailKey != null">
                detail_key = #{detailKey,jdbcType=VARCHAR},
            </if>
            <if test="payUserId != null">
                pay_user_id = #{payUserId,jdbcType=INTEGER},
            </if>
            <if test="payTime != null">
                pay_time = #{payTime,jdbcType=TIMESTAMP},
            </if>
            <if test="amountRmb != null">
                amount_rmb = #{amountRmb,jdbcType=DECIMAL},
            </if>
            <if test="toRmbRate != null">
                to_rmb_rate = #{toRmbRate,jdbcType=DECIMAL},
            </if>
            <if test="subLogisticsSupplierId != null">
                sub_logistics_supplier_id = #{subLogisticsSupplierId,jdbcType=INTEGER},
            </if>
            <if test="logisticsSupplierId != null">
                logistics_supplier_id = #{logisticsSupplierId,jdbcType=INTEGER},
            </if>
            <if test="subjectCode != null">
                subject_code = #{subjectCode,jdbcType=VARCHAR},
            </if>
            <if test="companyValue != null">
                company_value = #{companyValue,jdbcType=INTEGER},
            </if>
            <if test="auditTime != null">
                audit_time = #{auditTime,jdbcType=TIMESTAMP},
            </if>
            <if test="lastModifyDate != null">
                last_modify_date = #{lastModifyDate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjCreate != null">
                bj_create = #{bjCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjModified != null">
                bj_modified = #{bjModified,jdbcType=TIMESTAMP},
            </if>
        </set>
        where id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcBaseFinanceFee">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update dc_base_finance_fee
        set cost_plan_no = #{costPlanNo,jdbcType=VARCHAR},
        cost_no = #{costNo,jdbcType=VARCHAR},
        cost_reason = #{costReason,jdbcType=VARCHAR},
        cost_form = #{costForm,jdbcType=INTEGER},
        company_no = #{companyNo,jdbcType=VARCHAR},
        company_name = #{companyName,jdbcType=VARCHAR},
        type_no = #{typeNo,jdbcType=VARCHAR},
        type_name = #{typeName,jdbcType=VARCHAR},
        kind_no = #{kindNo,jdbcType=VARCHAR},
        kind_name = #{kindName,jdbcType=VARCHAR},
        create_userid = #{createUserid,jdbcType=INTEGER},
        create_usercode = #{createUsercode,jdbcType=VARCHAR},
        create_username = #{createUsername,jdbcType=VARCHAR},
        cost_remark = #{costRemark,jdbcType=VARCHAR},
        create_time = #{createTime,jdbcType=TIMESTAMP},
        cost_status = #{costStatus,jdbcType=INTEGER},
        file_path = #{filePath,jdbcType=VARCHAR},
        mor_file_path = #{morFilePath,jdbcType=VARCHAR},
        amount = #{amount,jdbcType=DECIMAL},
        bank_name = #{bankName,jdbcType=VARCHAR},
        bank_card = #{bankCard,jdbcType=VARCHAR},
        bank_card_user = #{bankCardUser,jdbcType=VARCHAR},
        bank_company = #{bankCompany,jdbcType=VARCHAR},
        mor_remark = #{morRemark,jdbcType=VARCHAR},
        son_cost_no = #{sonCostNo,jdbcType=VARCHAR},
        sup_cost_no = #{supCostNo,jdbcType=VARCHAR},
        is_lend = #{isLend,jdbcType=INTEGER},
        had_pay = #{hadPay,jdbcType=DECIMAL},
        lend_status = #{lendStatus,jdbcType=INTEGER},
        compensate = #{compensate,jdbcType=DECIMAL},
        counteract = #{counteract,jdbcType=DECIMAL},
        lend_balance = #{lendBalance,jdbcType=DECIMAL},
        reject_reason = #{rejectReason,jdbcType=VARCHAR},
        dic = #{dic,jdbcType=VARCHAR},
        pay_counteract = #{payCounteract,jdbcType=DECIMAL},
        pay_lend_balance = #{payLendBalance,jdbcType=DECIMAL},
        pay_plan_amount = #{payPlanAmount,jdbcType=DECIMAL},
        pay_dic = #{payDic,jdbcType=VARCHAR},
        pay_cur = #{payCur,jdbcType=DECIMAL},
        is_tax = #{isTax,jdbcType=INTEGER},
        detail_key = #{detailKey,jdbcType=VARCHAR},
        pay_user_id = #{payUserId,jdbcType=INTEGER},
        pay_time = #{payTime,jdbcType=TIMESTAMP},
        amount_rmb = #{amountRmb,jdbcType=DECIMAL},
        to_rmb_rate = #{toRmbRate,jdbcType=DECIMAL},
        sub_logistics_supplier_id = #{subLogisticsSupplierId,jdbcType=INTEGER},
        logistics_supplier_id = #{logisticsSupplierId,jdbcType=INTEGER},
        subject_code = #{subjectCode,jdbcType=VARCHAR},
        company_value = #{companyValue,jdbcType=INTEGER},
        audit_time = #{auditTime,jdbcType=TIMESTAMP},
        last_modify_date = #{lastModifyDate,jdbcType=TIMESTAMP},
        bj_create = #{bjCreate,jdbcType=TIMESTAMP},
        bj_modified = #{bjModified,jdbcType=TIMESTAMP}
        where id = #{id,jdbcType=INTEGER}
    </update>
    <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceFee">
        <!--
          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_fee
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="costPlanNo != null">
                cost_plan_no,
            </if>
            <if test="costNo != null">
                cost_no,
            </if>
            <if test="costReason != null">
                cost_reason,
            </if>
            <if test="costForm != null">
                cost_form,
            </if>
            <if test="companyNo != null">
                company_no,
            </if>
            <if test="companyName != null">
                company_name,
            </if>
            <if test="typeNo != null">
                type_no,
            </if>
            <if test="typeName != null">
                type_name,
            </if>
            <if test="kindNo != null">
                kind_no,
            </if>
            <if test="kindName != null">
                kind_name,
            </if>
            <if test="createUserid != null">
                create_userid,
            </if>
            <if test="createUsercode != null">
                create_usercode,
            </if>
            <if test="createUsername != null">
                create_username,
            </if>
            <if test="costRemark != null">
                cost_remark,
            </if>
            <if test="createTime != null">
                create_time,
            </if>
            <if test="costStatus != null">
                cost_status,
            </if>
            <if test="filePath != null">
                file_path,
            </if>
            <if test="morFilePath != null">
                mor_file_path,
            </if>
            <if test="amount != null">
                amount,
            </if>
            <if test="bankName != null">
                bank_name,
            </if>
            <if test="bankCard != null">
                bank_card,
            </if>
            <if test="bankCardUser != null">
                bank_card_user,
            </if>
            <if test="bankCompany != null">
                bank_company,
            </if>
            <if test="morRemark != null">
                mor_remark,
            </if>
            <if test="sonCostNo != null">
                son_cost_no,
            </if>
            <if test="supCostNo != null">
                sup_cost_no,
            </if>
            <if test="isLend != null">
                is_lend,
            </if>
            <if test="hadPay != null">
                had_pay,
            </if>
            <if test="lendStatus != null">
                lend_status,
            </if>
            <if test="compensate != null">
                compensate,
            </if>
            <if test="counteract != null">
                counteract,
            </if>
            <if test="lendBalance != null">
                lend_balance,
            </if>
            <if test="rejectReason != null">
                reject_reason,
            </if>
            <if test="dic != null">
                dic,
            </if>
            <if test="payCounteract != null">
                pay_counteract,
            </if>
            <if test="payLendBalance != null">
                pay_lend_balance,
            </if>
            <if test="payPlanAmount != null">
                pay_plan_amount,
            </if>
            <if test="payDic != null">
                pay_dic,
            </if>
            <if test="payCur != null">
                pay_cur,
            </if>
            <if test="isTax != null">
                is_tax,
            </if>
            <if test="detailKey != null">
                detail_key,
            </if>
            <if test="payUserId != null">
                pay_user_id,
            </if>
            <if test="payTime != null">
                pay_time,
            </if>
            <if test="amountRmb != null">
                amount_rmb,
            </if>
            <if test="toRmbRate != null">
                to_rmb_rate,
            </if>
            <if test="subLogisticsSupplierId != null">
                sub_logistics_supplier_id,
            </if>
            <if test="logisticsSupplierId != null">
                logistics_supplier_id,
            </if>
            <if test="subjectCode != null">
                subject_code,
            </if>
            <if test="companyValue != null">
                company_value,
            </if>
            <if test="auditTime != null">
                audit_time,
            </if>
            <if test="lastModifyDate != null">
                last_modify_date,
            </if>
            <if test="bjCreate != null">
                bj_create,
            </if>
            <if test="bjModified != null">
                bj_modified,
            </if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=INTEGER},
            </if>
            <if test="costPlanNo != null">
                #{costPlanNo,jdbcType=VARCHAR},
            </if>
            <if test="costNo != null">
                #{costNo,jdbcType=VARCHAR},
            </if>
            <if test="costReason != null">
                #{costReason,jdbcType=VARCHAR},
            </if>
            <if test="costForm != null">
                #{costForm,jdbcType=INTEGER},
            </if>
            <if test="companyNo != null">
                #{companyNo,jdbcType=VARCHAR},
            </if>
            <if test="companyName != null">
                #{companyName,jdbcType=VARCHAR},
            </if>
            <if test="typeNo != null">
                #{typeNo,jdbcType=VARCHAR},
            </if>
            <if test="typeName != null">
                #{typeName,jdbcType=VARCHAR},
            </if>
            <if test="kindNo != null">
                #{kindNo,jdbcType=VARCHAR},
            </if>
            <if test="kindName != null">
                #{kindName,jdbcType=VARCHAR},
            </if>
            <if test="createUserid != null">
                #{createUserid,jdbcType=INTEGER},
            </if>
            <if test="createUsercode != null">
                #{createUsercode,jdbcType=VARCHAR},
            </if>
            <if test="createUsername != null">
                #{createUsername,jdbcType=VARCHAR},
            </if>
            <if test="costRemark != null">
                #{costRemark,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="costStatus != null">
                #{costStatus,jdbcType=INTEGER},
            </if>
            <if test="filePath != null">
                #{filePath,jdbcType=VARCHAR},
            </if>
            <if test="morFilePath != null">
                #{morFilePath,jdbcType=VARCHAR},
            </if>
            <if test="amount != null">
                #{amount,jdbcType=DECIMAL},
            </if>
            <if test="bankName != null">
                #{bankName,jdbcType=VARCHAR},
            </if>
            <if test="bankCard != null">
                #{bankCard,jdbcType=VARCHAR},
            </if>
            <if test="bankCardUser != null">
                #{bankCardUser,jdbcType=VARCHAR},
            </if>
            <if test="bankCompany != null">
                #{bankCompany,jdbcType=VARCHAR},
            </if>
            <if test="morRemark != null">
                #{morRemark,jdbcType=VARCHAR},
            </if>
            <if test="sonCostNo != null">
                #{sonCostNo,jdbcType=VARCHAR},
            </if>
            <if test="supCostNo != null">
                #{supCostNo,jdbcType=VARCHAR},
            </if>
            <if test="isLend != null">
                #{isLend,jdbcType=INTEGER},
            </if>
            <if test="hadPay != null">
                #{hadPay,jdbcType=DECIMAL},
            </if>
            <if test="lendStatus != null">
                #{lendStatus,jdbcType=INTEGER},
            </if>
            <if test="compensate != null">
                #{compensate,jdbcType=DECIMAL},
            </if>
            <if test="counteract != null">
                #{counteract,jdbcType=DECIMAL},
            </if>
            <if test="lendBalance != null">
                #{lendBalance,jdbcType=DECIMAL},
            </if>
            <if test="rejectReason != null">
                #{rejectReason,jdbcType=VARCHAR},
            </if>
            <if test="dic != null">
                #{dic,jdbcType=VARCHAR},
            </if>
            <if test="payCounteract != null">
                #{payCounteract,jdbcType=DECIMAL},
            </if>
            <if test="payLendBalance != null">
                #{payLendBalance,jdbcType=DECIMAL},
            </if>
            <if test="payPlanAmount != null">
                #{payPlanAmount,jdbcType=DECIMAL},
            </if>
            <if test="payDic != null">
                #{payDic,jdbcType=VARCHAR},
            </if>
            <if test="payCur != null">
                #{payCur,jdbcType=DECIMAL},
            </if>
            <if test="isTax != null">
                #{isTax,jdbcType=INTEGER},
            </if>
            <if test="detailKey != null">
                #{detailKey,jdbcType=VARCHAR},
            </if>
            <if test="payUserId != null">
                #{payUserId,jdbcType=INTEGER},
            </if>
            <if test="payTime != null">
                #{payTime,jdbcType=TIMESTAMP},
            </if>
            <if test="amountRmb != null">
                #{amountRmb,jdbcType=DECIMAL},
            </if>
            <if test="toRmbRate != null">
                #{toRmbRate,jdbcType=DECIMAL},
            </if>
            <if test="subLogisticsSupplierId != null">
                #{subLogisticsSupplierId,jdbcType=INTEGER},
            </if>
            <if test="logisticsSupplierId != null">
                #{logisticsSupplierId,jdbcType=INTEGER},
            </if>
            <if test="subjectCode != null">
                #{subjectCode,jdbcType=VARCHAR},
            </if>
            <if test="companyValue != null">
                #{companyValue,jdbcType=INTEGER},
            </if>
            <if test="auditTime != null">
                #{auditTime,jdbcType=TIMESTAMP},
            </if>
            <if test="lastModifyDate != null">
                #{lastModifyDate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjCreate != null">
                #{bjCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjModified != null">
                #{bjModified,jdbcType=TIMESTAMP},
            </if>
        </trim>
        on duplicate key update
        <trim suffixOverrides=",">
            <if test="id != null">
                id = #{id,jdbcType=INTEGER},
            </if>
            <if test="costPlanNo != null">
                cost_plan_no = #{costPlanNo,jdbcType=VARCHAR},
            </if>
            <if test="costNo != null">
                cost_no = #{costNo,jdbcType=VARCHAR},
            </if>
            <if test="costReason != null">
                cost_reason = #{costReason,jdbcType=VARCHAR},
            </if>
            <if test="costForm != null">
                cost_form = #{costForm,jdbcType=INTEGER},
            </if>
            <if test="companyNo != null">
                company_no = #{companyNo,jdbcType=VARCHAR},
            </if>
            <if test="companyName != null">
                company_name = #{companyName,jdbcType=VARCHAR},
            </if>
            <if test="typeNo != null">
                type_no = #{typeNo,jdbcType=VARCHAR},
            </if>
            <if test="typeName != null">
                type_name = #{typeName,jdbcType=VARCHAR},
            </if>
            <if test="kindNo != null">
                kind_no = #{kindNo,jdbcType=VARCHAR},
            </if>
            <if test="kindName != null">
                kind_name = #{kindName,jdbcType=VARCHAR},
            </if>
            <if test="createUserid != null">
                create_userid = #{createUserid,jdbcType=INTEGER},
            </if>
            <if test="createUsercode != null">
                create_usercode = #{createUsercode,jdbcType=VARCHAR},
            </if>
            <if test="createUsername != null">
                create_username = #{createUsername,jdbcType=VARCHAR},
            </if>
            <if test="costRemark != null">
                cost_remark = #{costRemark,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                create_time = #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="costStatus != null">
                cost_status = #{costStatus,jdbcType=INTEGER},
            </if>
            <if test="filePath != null">
                file_path = #{filePath,jdbcType=VARCHAR},
            </if>
            <if test="morFilePath != null">
                mor_file_path = #{morFilePath,jdbcType=VARCHAR},
            </if>
            <if test="amount != null">
                amount = #{amount,jdbcType=DECIMAL},
            </if>
            <if test="bankName != null">
                bank_name = #{bankName,jdbcType=VARCHAR},
            </if>
            <if test="bankCard != null">
                bank_card = #{bankCard,jdbcType=VARCHAR},
            </if>
            <if test="bankCardUser != null">
                bank_card_user = #{bankCardUser,jdbcType=VARCHAR},
            </if>
            <if test="bankCompany != null">
                bank_company = #{bankCompany,jdbcType=VARCHAR},
            </if>
            <if test="morRemark != null">
                mor_remark = #{morRemark,jdbcType=VARCHAR},
            </if>
            <if test="sonCostNo != null">
                son_cost_no = #{sonCostNo,jdbcType=VARCHAR},
            </if>
            <if test="supCostNo != null">
                sup_cost_no = #{supCostNo,jdbcType=VARCHAR},
            </if>
            <if test="isLend != null">
                is_lend = #{isLend,jdbcType=INTEGER},
            </if>
            <if test="hadPay != null">
                had_pay = #{hadPay,jdbcType=DECIMAL},
            </if>
            <if test="lendStatus != null">
                lend_status = #{lendStatus,jdbcType=INTEGER},
            </if>
            <if test="compensate != null">
                compensate = #{compensate,jdbcType=DECIMAL},
            </if>
            <if test="counteract != null">
                counteract = #{counteract,jdbcType=DECIMAL},
            </if>
            <if test="lendBalance != null">
                lend_balance = #{lendBalance,jdbcType=DECIMAL},
            </if>
            <if test="rejectReason != null">
                reject_reason = #{rejectReason,jdbcType=VARCHAR},
            </if>
            <if test="dic != null">
                dic = #{dic,jdbcType=VARCHAR},
            </if>
            <if test="payCounteract != null">
                pay_counteract = #{payCounteract,jdbcType=DECIMAL},
            </if>
            <if test="payLendBalance != null">
                pay_lend_balance = #{payLendBalance,jdbcType=DECIMAL},
            </if>
            <if test="payPlanAmount != null">
                pay_plan_amount = #{payPlanAmount,jdbcType=DECIMAL},
            </if>
            <if test="payDic != null">
                pay_dic = #{payDic,jdbcType=VARCHAR},
            </if>
            <if test="payCur != null">
                pay_cur = #{payCur,jdbcType=DECIMAL},
            </if>
            <if test="isTax != null">
                is_tax = #{isTax,jdbcType=INTEGER},
            </if>
            <if test="detailKey != null">
                detail_key = #{detailKey,jdbcType=VARCHAR},
            </if>
            <if test="payUserId != null">
                pay_user_id = #{payUserId,jdbcType=INTEGER},
            </if>
            <if test="payTime != null">
                pay_time = #{payTime,jdbcType=TIMESTAMP},
            </if>
            <if test="amountRmb != null">
                amount_rmb = #{amountRmb,jdbcType=DECIMAL},
            </if>
            <if test="toRmbRate != null">
                to_rmb_rate = #{toRmbRate,jdbcType=DECIMAL},
            </if>
            <if test="subLogisticsSupplierId != null">
                sub_logistics_supplier_id = #{subLogisticsSupplierId,jdbcType=INTEGER},
            </if>
            <if test="logisticsSupplierId != null">
                logistics_supplier_id = #{logisticsSupplierId,jdbcType=INTEGER},
            </if>
            <if test="subjectCode != null">
                subject_code = #{subjectCode,jdbcType=VARCHAR},
            </if>
            <if test="companyValue != null">
                company_value = #{companyValue,jdbcType=INTEGER},
            </if>
            <if test="auditTime != null">
                audit_time = #{auditTime,jdbcType=TIMESTAMP},
            </if>
            <if test="lastModifyDate != null">
                last_modify_date = #{lastModifyDate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjCreate != null">
                bj_create = #{bjCreate,jdbcType=TIMESTAMP},
            </if>
            <if test="bjModified != null">
                bj_modified = #{bjModified,jdbcType=TIMESTAMP},
            </if>
        </trim>
    </insert>
    <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceFee">
        <!--
          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_fee
        (id, cost_plan_no, cost_no, cost_reason, cost_form, company_no, company_name, type_no,
        type_name, kind_no, kind_name, create_userid, create_usercode, create_username,
        cost_remark, create_time, cost_status, file_path, mor_file_path, amount, bank_name,
        bank_card, bank_card_user, bank_company, mor_remark, son_cost_no, sup_cost_no,
        is_lend, had_pay, lend_status, compensate, counteract, lend_balance, reject_reason,
        dic, pay_counteract, pay_lend_balance, pay_plan_amount, pay_dic, pay_cur, is_tax,
        detail_key, pay_user_id, pay_time, amount_rmb, to_rmb_rate, sub_logistics_supplier_id,
        logistics_supplier_id, subject_code, company_value, audit_time, last_modify_date,
        bj_create, bj_modified)
        values
        (#{id,jdbcType=INTEGER}, #{costPlanNo,jdbcType=VARCHAR}, #{costNo,jdbcType=VARCHAR},
        #{costReason,jdbcType=VARCHAR}, #{costForm,jdbcType=INTEGER}, #{companyNo,jdbcType=VARCHAR},
        #{companyName,jdbcType=VARCHAR}, #{typeNo,jdbcType=VARCHAR}, #{typeName,jdbcType=VARCHAR},
        #{kindNo,jdbcType=VARCHAR}, #{kindName,jdbcType=VARCHAR}, #{createUserid,jdbcType=INTEGER},
        #{createUsercode,jdbcType=VARCHAR}, #{createUsername,jdbcType=VARCHAR}, #{costRemark,jdbcType=VARCHAR},
        #{createTime,jdbcType=TIMESTAMP}, #{costStatus,jdbcType=INTEGER}, #{filePath,jdbcType=VARCHAR},
        #{morFilePath,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{bankName,jdbcType=VARCHAR},
        #{bankCard,jdbcType=VARCHAR}, #{bankCardUser,jdbcType=VARCHAR}, #{bankCompany,jdbcType=VARCHAR},
        #{morRemark,jdbcType=VARCHAR}, #{sonCostNo,jdbcType=VARCHAR}, #{supCostNo,jdbcType=VARCHAR},
        #{isLend,jdbcType=INTEGER}, #{hadPay,jdbcType=DECIMAL}, #{lendStatus,jdbcType=INTEGER},
        #{compensate,jdbcType=DECIMAL}, #{counteract,jdbcType=DECIMAL}, #{lendBalance,jdbcType=DECIMAL},
        #{rejectReason,jdbcType=VARCHAR}, #{dic,jdbcType=VARCHAR}, #{payCounteract,jdbcType=DECIMAL},
        #{payLendBalance,jdbcType=DECIMAL}, #{payPlanAmount,jdbcType=DECIMAL}, #{payDic,jdbcType=VARCHAR},
        #{payCur,jdbcType=DECIMAL}, #{isTax,jdbcType=INTEGER}, #{detailKey,jdbcType=VARCHAR},
        #{payUserId,jdbcType=INTEGER}, #{payTime,jdbcType=TIMESTAMP}, #{amountRmb,jdbcType=DECIMAL},
        #{toRmbRate,jdbcType=DECIMAL}, #{subLogisticsSupplierId,jdbcType=INTEGER},
        #{logisticsSupplierId,jdbcType=INTEGER},
        #{subjectCode,jdbcType=VARCHAR}, #{companyValue,jdbcType=INTEGER}, #{auditTime,jdbcType=TIMESTAMP},
        #{lastModifyDate,jdbcType=TIMESTAMP}, #{bjCreate,jdbcType=TIMESTAMP}, #{bjModified,jdbcType=TIMESTAMP}
        )
        on duplicate key update
        id = #{id,jdbcType=INTEGER},
        cost_plan_no = #{costPlanNo,jdbcType=VARCHAR},
        cost_no = #{costNo,jdbcType=VARCHAR},
        cost_reason = #{costReason,jdbcType=VARCHAR},
        cost_form = #{costForm,jdbcType=INTEGER},
        company_no = #{companyNo,jdbcType=VARCHAR},
        company_name = #{companyName,jdbcType=VARCHAR},
        type_no = #{typeNo,jdbcType=VARCHAR},
        type_name = #{typeName,jdbcType=VARCHAR},
        kind_no = #{kindNo,jdbcType=VARCHAR},
        kind_name = #{kindName,jdbcType=VARCHAR},
        create_userid = #{createUserid,jdbcType=INTEGER},
        create_usercode = #{createUsercode,jdbcType=VARCHAR},
        create_username = #{createUsername,jdbcType=VARCHAR},
        cost_remark = #{costRemark,jdbcType=VARCHAR},
        create_time = #{createTime,jdbcType=TIMESTAMP},
        cost_status = #{costStatus,jdbcType=INTEGER},
        file_path = #{filePath,jdbcType=VARCHAR},
        mor_file_path = #{morFilePath,jdbcType=VARCHAR},
        amount = #{amount,jdbcType=DECIMAL},
        bank_name = #{bankName,jdbcType=VARCHAR},
        bank_card = #{bankCard,jdbcType=VARCHAR},
        bank_card_user = #{bankCardUser,jdbcType=VARCHAR},
        bank_company = #{bankCompany,jdbcType=VARCHAR},
        mor_remark = #{morRemark,jdbcType=VARCHAR},
        son_cost_no = #{sonCostNo,jdbcType=VARCHAR},
        sup_cost_no = #{supCostNo,jdbcType=VARCHAR},
        is_lend = #{isLend,jdbcType=INTEGER},
        had_pay = #{hadPay,jdbcType=DECIMAL},
        lend_status = #{lendStatus,jdbcType=INTEGER},
        compensate = #{compensate,jdbcType=DECIMAL},
        counteract = #{counteract,jdbcType=DECIMAL},
        lend_balance = #{lendBalance,jdbcType=DECIMAL},
        reject_reason = #{rejectReason,jdbcType=VARCHAR},
        dic = #{dic,jdbcType=VARCHAR},
        pay_counteract = #{payCounteract,jdbcType=DECIMAL},
        pay_lend_balance = #{payLendBalance,jdbcType=DECIMAL},
        pay_plan_amount = #{payPlanAmount,jdbcType=DECIMAL},
        pay_dic = #{payDic,jdbcType=VARCHAR},
        pay_cur = #{payCur,jdbcType=DECIMAL},
        is_tax = #{isTax,jdbcType=INTEGER},
        detail_key = #{detailKey,jdbcType=VARCHAR},
        pay_user_id = #{payUserId,jdbcType=INTEGER},
        pay_time = #{payTime,jdbcType=TIMESTAMP},
        amount_rmb = #{amountRmb,jdbcType=DECIMAL},
        to_rmb_rate = #{toRmbRate,jdbcType=DECIMAL},
        sub_logistics_supplier_id = #{subLogisticsSupplierId,jdbcType=INTEGER},
        logistics_supplier_id = #{logisticsSupplierId,jdbcType=INTEGER},
        subject_code = #{subjectCode,jdbcType=VARCHAR},
        company_value = #{companyValue,jdbcType=INTEGER},
        audit_time = #{auditTime,jdbcType=TIMESTAMP},
        last_modify_date = #{lastModifyDate,jdbcType=TIMESTAMP},
        bj_create = #{bjCreate,jdbcType=TIMESTAMP},
        bj_modified = #{bjModified,jdbcType=TIMESTAMP}
    </insert>
    <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceFeeExample"
            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_fee
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
        <if test="orderByClause != null">
            order by ${orderByClause}
        </if>
        limit 1
    </select>
    <insert id="insertDailyFee">
        insert dc_daily_fee(cost_plan_no, cost_no, cost_reason, cost_form, company_no, company_name, type_no,
                            type_name, kind_no, kind_name, create_userid, create_usercode, create_username,
                            cost_remark, create_time, cost_status, file_path, mor_file_path, amount, bank_name,
                            bank_card, bank_card_user, bank_company, mor_remark, son_cost_no, sup_cost_no,
                            is_lend, had_pay, lend_status, compensate, counteract, lend_balance, reject_reason,
                            dic, pay_counteract, pay_lend_balance, pay_plan_amount, pay_dic, pay_cur, is_tax,
                            detail_key, pay_user_id, pay_time, amount_rmb, to_rmb_rate, sub_logistics_supplier_id,
                            logistics_supplier_id, subject_code, company_value, audit_time, last_modify_date,
                            bj_create, bj_modified, recoed_time)
        select cost_plan_no,
               cost_no,
               cost_reason,
               cost_form,
               company_no,
               company_name,
               type_no,
               type_name,
               kind_no,
               kind_name,
               create_userid,
               create_usercode,
               create_username,
               cost_remark,
               create_time,
               cost_status,
               file_path,
               mor_file_path,
               amount,
               bank_name,
               bank_card,
               bank_card_user,
               bank_company,
               mor_remark,
               son_cost_no,
               sup_cost_no,
               is_lend,
               had_pay,
               lend_status,
               compensate,
               counteract,
               lend_balance,
               reject_reason,
               dic,
               pay_counteract,
               pay_lend_balance,
               pay_plan_amount,
               pay_dic,
               pay_cur,
               is_tax,
               detail_key,
               pay_user_id,
               pay_time,
               amount_rmb,
               to_rmb_rate,
               sub_logistics_supplier_id,
               logistics_supplier_id,
               subject_code,
               company_value,
               audit_time,
               last_modify_date,
               bj_create,
               bj_modified,
               #{localDate}
        from dc_base_finance_fee
        where is_lend = 1
          and cost_form = 3
          and lend_status in (1, 2)
            and cost_status = 4
    </insert>

    <delete id="deleteDailyFee">
        delete
        from dc_daily_fee
        where recoed_time = #{localDate}
    </delete>

</mapper>
