<?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.DcBaseFinancePaypalMapper">
  <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcBaseFinancePaypal">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
    <result column="parent_transaction_id" jdbcType="VARCHAR" property="parentTransactionId" />
    <result column="receipt_id" jdbcType="VARCHAR" property="receiptId" />
    <result column="transaction_type" jdbcType="VARCHAR" property="transactionType" />
    <result column="payment_type" jdbcType="VARCHAR" property="paymentType" />
    <result column="payment_date" jdbcType="TIMESTAMP" property="paymentDate" />
    <result column="gross_amount" jdbcType="DECIMAL" property="grossAmount" />
    <result column="fee_amount" jdbcType="DECIMAL" property="feeAmount" />
    <result column="settle_amount" jdbcType="DECIMAL" property="settleAmount" />
    <result column="tax_amount" jdbcType="DECIMAL" property="taxAmount" />
    <result column="exchange_rate" jdbcType="VARCHAR" property="exchangeRate" />
    <result column="payment_status" jdbcType="VARCHAR" property="paymentStatus" />
    <result column="pending_reason" jdbcType="VARCHAR" property="pendingReason" />
    <result column="reason_code" jdbcType="VARCHAR" property="reasonCode" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="saas_company_id" jdbcType="INTEGER" property="saasCompanyId" />
    <result column="gmt_create_time" jdbcType="TIMESTAMP" property="gmtCreateTime" />
    <result column="gmt_modify_time" jdbcType="TIMESTAMP" property="gmtModifyTime" />
    <result column="business" jdbcType="VARCHAR" property="business" />
    <result column="receiver" jdbcType="VARCHAR" property="receiver" />
    <result column="receiver_id" jdbcType="VARCHAR" property="receiverId" />
    <result column="payer" jdbcType="VARCHAR" property="payer" />
    <result column="payer_id" jdbcType="VARCHAR" property="payerId" />
    <result column="currency" jdbcType="VARCHAR" property="currency" />
    <result column="currency_id" jdbcType="INTEGER" property="currencyId" />
    <result column="other_to_cny_exchange_rate" jdbcType="DECIMAL" property="otherToCnyExchangeRate" />
    <result column="type" jdbcType="VARCHAR" property="type" />
  </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, transaction_id, parent_transaction_id, receipt_id, transaction_type, payment_type, 
    payment_date, gross_amount, fee_amount, settle_amount, tax_amount, exchange_rate, 
    payment_status, pending_reason, reason_code, create_time, saas_company_id, gmt_create_time, 
    gmt_modify_time, business, receiver, receiver_id, payer, payer_id, currency, currency_id, 
    other_to_cny_exchange_rate, type
  </sql>
  <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinancePaypalExample" 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_paypal
    <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_paypal
    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_paypal
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcBaseFinancePaypalExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_base_finance_paypal
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.bailuntec.domain.entity.DcBaseFinancePaypal">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_finance_paypal (id, transaction_id, parent_transaction_id, 
      receipt_id, transaction_type, payment_type, 
      payment_date, gross_amount, fee_amount, 
      settle_amount, tax_amount, exchange_rate, 
      payment_status, pending_reason, reason_code, 
      create_time, saas_company_id, gmt_create_time, 
      gmt_modify_time, business, receiver, 
      receiver_id, payer, payer_id, 
      currency, currency_id, other_to_cny_exchange_rate, 
      type)
    values (#{id,jdbcType=INTEGER}, #{transactionId,jdbcType=VARCHAR}, #{parentTransactionId,jdbcType=VARCHAR}, 
      #{receiptId,jdbcType=VARCHAR}, #{transactionType,jdbcType=VARCHAR}, #{paymentType,jdbcType=VARCHAR}, 
      #{paymentDate,jdbcType=TIMESTAMP}, #{grossAmount,jdbcType=DECIMAL}, #{feeAmount,jdbcType=DECIMAL}, 
      #{settleAmount,jdbcType=DECIMAL}, #{taxAmount,jdbcType=DECIMAL}, #{exchangeRate,jdbcType=VARCHAR}, 
      #{paymentStatus,jdbcType=VARCHAR}, #{pendingReason,jdbcType=VARCHAR}, #{reasonCode,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{saasCompanyId,jdbcType=INTEGER}, #{gmtCreateTime,jdbcType=TIMESTAMP}, 
      #{gmtModifyTime,jdbcType=TIMESTAMP}, #{business,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, 
      #{receiverId,jdbcType=VARCHAR}, #{payer,jdbcType=VARCHAR}, #{payerId,jdbcType=VARCHAR}, 
      #{currency,jdbcType=VARCHAR}, #{currencyId,jdbcType=INTEGER}, #{otherToCnyExchangeRate,jdbcType=DECIMAL}, 
      #{type,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinancePaypal">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_finance_paypal
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="transactionId != null">
        transaction_id,
      </if>
      <if test="parentTransactionId != null">
        parent_transaction_id,
      </if>
      <if test="receiptId != null">
        receipt_id,
      </if>
      <if test="transactionType != null">
        transaction_type,
      </if>
      <if test="paymentType != null">
        payment_type,
      </if>
      <if test="paymentDate != null">
        payment_date,
      </if>
      <if test="grossAmount != null">
        gross_amount,
      </if>
      <if test="feeAmount != null">
        fee_amount,
      </if>
      <if test="settleAmount != null">
        settle_amount,
      </if>
      <if test="taxAmount != null">
        tax_amount,
      </if>
      <if test="exchangeRate != null">
        exchange_rate,
      </if>
      <if test="paymentStatus != null">
        payment_status,
      </if>
      <if test="pendingReason != null">
        pending_reason,
      </if>
      <if test="reasonCode != null">
        reason_code,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="saasCompanyId != null">
        saas_company_id,
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time,
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time,
      </if>
      <if test="business != null">
        business,
      </if>
      <if test="receiver != null">
        receiver,
      </if>
      <if test="receiverId != null">
        receiver_id,
      </if>
      <if test="payer != null">
        payer,
      </if>
      <if test="payerId != null">
        payer_id,
      </if>
      <if test="currency != null">
        currency,
      </if>
      <if test="currencyId != null">
        currency_id,
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate,
      </if>
      <if test="type != null">
        type,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="transactionId != null">
        #{transactionId,jdbcType=VARCHAR},
      </if>
      <if test="parentTransactionId != null">
        #{parentTransactionId,jdbcType=VARCHAR},
      </if>
      <if test="receiptId != null">
        #{receiptId,jdbcType=VARCHAR},
      </if>
      <if test="transactionType != null">
        #{transactionType,jdbcType=VARCHAR},
      </if>
      <if test="paymentType != null">
        #{paymentType,jdbcType=VARCHAR},
      </if>
      <if test="paymentDate != null">
        #{paymentDate,jdbcType=TIMESTAMP},
      </if>
      <if test="grossAmount != null">
        #{grossAmount,jdbcType=DECIMAL},
      </if>
      <if test="feeAmount != null">
        #{feeAmount,jdbcType=DECIMAL},
      </if>
      <if test="settleAmount != null">
        #{settleAmount,jdbcType=DECIMAL},
      </if>
      <if test="taxAmount != null">
        #{taxAmount,jdbcType=DECIMAL},
      </if>
      <if test="exchangeRate != null">
        #{exchangeRate,jdbcType=VARCHAR},
      </if>
      <if test="paymentStatus != null">
        #{paymentStatus,jdbcType=VARCHAR},
      </if>
      <if test="pendingReason != null">
        #{pendingReason,jdbcType=VARCHAR},
      </if>
      <if test="reasonCode != null">
        #{reasonCode,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="saasCompanyId != null">
        #{saasCompanyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="business != null">
        #{business,jdbcType=VARCHAR},
      </if>
      <if test="receiver != null">
        #{receiver,jdbcType=VARCHAR},
      </if>
      <if test="receiverId != null">
        #{receiverId,jdbcType=VARCHAR},
      </if>
      <if test="payer != null">
        #{payer,jdbcType=VARCHAR},
      </if>
      <if test="payerId != null">
        #{payerId,jdbcType=VARCHAR},
      </if>
      <if test="currency != null">
        #{currency,jdbcType=VARCHAR},
      </if>
      <if test="currencyId != null">
        #{currencyId,jdbcType=INTEGER},
      </if>
      <if test="otherToCnyExchangeRate != null">
        #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinancePaypalExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from dc_base_finance_paypal
    <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_paypal
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.transactionId != null">
        transaction_id = #{record.transactionId,jdbcType=VARCHAR},
      </if>
      <if test="record.parentTransactionId != null">
        parent_transaction_id = #{record.parentTransactionId,jdbcType=VARCHAR},
      </if>
      <if test="record.receiptId != null">
        receipt_id = #{record.receiptId,jdbcType=VARCHAR},
      </if>
      <if test="record.transactionType != null">
        transaction_type = #{record.transactionType,jdbcType=VARCHAR},
      </if>
      <if test="record.paymentType != null">
        payment_type = #{record.paymentType,jdbcType=VARCHAR},
      </if>
      <if test="record.paymentDate != null">
        payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.grossAmount != null">
        gross_amount = #{record.grossAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.feeAmount != null">
        fee_amount = #{record.feeAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.settleAmount != null">
        settle_amount = #{record.settleAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.taxAmount != null">
        tax_amount = #{record.taxAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.exchangeRate != null">
        exchange_rate = #{record.exchangeRate,jdbcType=VARCHAR},
      </if>
      <if test="record.paymentStatus != null">
        payment_status = #{record.paymentStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.pendingReason != null">
        pending_reason = #{record.pendingReason,jdbcType=VARCHAR},
      </if>
      <if test="record.reasonCode != null">
        reason_code = #{record.reasonCode,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.saasCompanyId != null">
        saas_company_id = #{record.saasCompanyId,jdbcType=INTEGER},
      </if>
      <if test="record.gmtCreateTime != null">
        gmt_create_time = #{record.gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.gmtModifyTime != null">
        gmt_modify_time = #{record.gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.business != null">
        business = #{record.business,jdbcType=VARCHAR},
      </if>
      <if test="record.receiver != null">
        receiver = #{record.receiver,jdbcType=VARCHAR},
      </if>
      <if test="record.receiverId != null">
        receiver_id = #{record.receiverId,jdbcType=VARCHAR},
      </if>
      <if test="record.payer != null">
        payer = #{record.payer,jdbcType=VARCHAR},
      </if>
      <if test="record.payerId != null">
        payer_id = #{record.payerId,jdbcType=VARCHAR},
      </if>
      <if test="record.currency != null">
        currency = #{record.currency,jdbcType=VARCHAR},
      </if>
      <if test="record.currencyId != null">
        currency_id = #{record.currencyId,jdbcType=INTEGER},
      </if>
      <if test="record.otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate = #{record.otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.type != null">
        type = #{record.type,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_paypal
    set id = #{record.id,jdbcType=INTEGER},
      transaction_id = #{record.transactionId,jdbcType=VARCHAR},
      parent_transaction_id = #{record.parentTransactionId,jdbcType=VARCHAR},
      receipt_id = #{record.receiptId,jdbcType=VARCHAR},
      transaction_type = #{record.transactionType,jdbcType=VARCHAR},
      payment_type = #{record.paymentType,jdbcType=VARCHAR},
      payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
      gross_amount = #{record.grossAmount,jdbcType=DECIMAL},
      fee_amount = #{record.feeAmount,jdbcType=DECIMAL},
      settle_amount = #{record.settleAmount,jdbcType=DECIMAL},
      tax_amount = #{record.taxAmount,jdbcType=DECIMAL},
      exchange_rate = #{record.exchangeRate,jdbcType=VARCHAR},
      payment_status = #{record.paymentStatus,jdbcType=VARCHAR},
      pending_reason = #{record.pendingReason,jdbcType=VARCHAR},
      reason_code = #{record.reasonCode,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      saas_company_id = #{record.saasCompanyId,jdbcType=INTEGER},
      gmt_create_time = #{record.gmtCreateTime,jdbcType=TIMESTAMP},
      gmt_modify_time = #{record.gmtModifyTime,jdbcType=TIMESTAMP},
      business = #{record.business,jdbcType=VARCHAR},
      receiver = #{record.receiver,jdbcType=VARCHAR},
      receiver_id = #{record.receiverId,jdbcType=VARCHAR},
      payer = #{record.payer,jdbcType=VARCHAR},
      payer_id = #{record.payerId,jdbcType=VARCHAR},
      currency = #{record.currency,jdbcType=VARCHAR},
      currency_id = #{record.currencyId,jdbcType=INTEGER},
      other_to_cny_exchange_rate = #{record.otherToCnyExchangeRate,jdbcType=DECIMAL},
      type = #{record.type,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcBaseFinancePaypal">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_paypal
    <set>
      <if test="transactionId != null">
        transaction_id = #{transactionId,jdbcType=VARCHAR},
      </if>
      <if test="parentTransactionId != null">
        parent_transaction_id = #{parentTransactionId,jdbcType=VARCHAR},
      </if>
      <if test="receiptId != null">
        receipt_id = #{receiptId,jdbcType=VARCHAR},
      </if>
      <if test="transactionType != null">
        transaction_type = #{transactionType,jdbcType=VARCHAR},
      </if>
      <if test="paymentType != null">
        payment_type = #{paymentType,jdbcType=VARCHAR},
      </if>
      <if test="paymentDate != null">
        payment_date = #{paymentDate,jdbcType=TIMESTAMP},
      </if>
      <if test="grossAmount != null">
        gross_amount = #{grossAmount,jdbcType=DECIMAL},
      </if>
      <if test="feeAmount != null">
        fee_amount = #{feeAmount,jdbcType=DECIMAL},
      </if>
      <if test="settleAmount != null">
        settle_amount = #{settleAmount,jdbcType=DECIMAL},
      </if>
      <if test="taxAmount != null">
        tax_amount = #{taxAmount,jdbcType=DECIMAL},
      </if>
      <if test="exchangeRate != null">
        exchange_rate = #{exchangeRate,jdbcType=VARCHAR},
      </if>
      <if test="paymentStatus != null">
        payment_status = #{paymentStatus,jdbcType=VARCHAR},
      </if>
      <if test="pendingReason != null">
        pending_reason = #{pendingReason,jdbcType=VARCHAR},
      </if>
      <if test="reasonCode != null">
        reason_code = #{reasonCode,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="saasCompanyId != null">
        saas_company_id = #{saasCompanyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="business != null">
        business = #{business,jdbcType=VARCHAR},
      </if>
      <if test="receiver != null">
        receiver = #{receiver,jdbcType=VARCHAR},
      </if>
      <if test="receiverId != null">
        receiver_id = #{receiverId,jdbcType=VARCHAR},
      </if>
      <if test="payer != null">
        payer = #{payer,jdbcType=VARCHAR},
      </if>
      <if test="payerId != null">
        payer_id = #{payerId,jdbcType=VARCHAR},
      </if>
      <if test="currency != null">
        currency = #{currency,jdbcType=VARCHAR},
      </if>
      <if test="currencyId != null">
        currency_id = #{currencyId,jdbcType=INTEGER},
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcBaseFinancePaypal">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_paypal
    set transaction_id = #{transactionId,jdbcType=VARCHAR},
      parent_transaction_id = #{parentTransactionId,jdbcType=VARCHAR},
      receipt_id = #{receiptId,jdbcType=VARCHAR},
      transaction_type = #{transactionType,jdbcType=VARCHAR},
      payment_type = #{paymentType,jdbcType=VARCHAR},
      payment_date = #{paymentDate,jdbcType=TIMESTAMP},
      gross_amount = #{grossAmount,jdbcType=DECIMAL},
      fee_amount = #{feeAmount,jdbcType=DECIMAL},
      settle_amount = #{settleAmount,jdbcType=DECIMAL},
      tax_amount = #{taxAmount,jdbcType=DECIMAL},
      exchange_rate = #{exchangeRate,jdbcType=VARCHAR},
      payment_status = #{paymentStatus,jdbcType=VARCHAR},
      pending_reason = #{pendingReason,jdbcType=VARCHAR},
      reason_code = #{reasonCode,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      saas_company_id = #{saasCompanyId,jdbcType=INTEGER},
      gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
      gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP},
      business = #{business,jdbcType=VARCHAR},
      receiver = #{receiver,jdbcType=VARCHAR},
      receiver_id = #{receiverId,jdbcType=VARCHAR},
      payer = #{payer,jdbcType=VARCHAR},
      payer_id = #{payerId,jdbcType=VARCHAR},
      currency = #{currency,jdbcType=VARCHAR},
      currency_id = #{currencyId,jdbcType=INTEGER},
      other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      type = #{type,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinancePaypal">
    <!--
      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_paypal
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="transactionId != null">
        transaction_id,
      </if>
      <if test="parentTransactionId != null">
        parent_transaction_id,
      </if>
      <if test="receiptId != null">
        receipt_id,
      </if>
      <if test="transactionType != null">
        transaction_type,
      </if>
      <if test="paymentType != null">
        payment_type,
      </if>
      <if test="paymentDate != null">
        payment_date,
      </if>
      <if test="grossAmount != null">
        gross_amount,
      </if>
      <if test="feeAmount != null">
        fee_amount,
      </if>
      <if test="settleAmount != null">
        settle_amount,
      </if>
      <if test="taxAmount != null">
        tax_amount,
      </if>
      <if test="exchangeRate != null">
        exchange_rate,
      </if>
      <if test="paymentStatus != null">
        payment_status,
      </if>
      <if test="pendingReason != null">
        pending_reason,
      </if>
      <if test="reasonCode != null">
        reason_code,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="saasCompanyId != null">
        saas_company_id,
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time,
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time,
      </if>
      <if test="business != null">
        business,
      </if>
      <if test="receiver != null">
        receiver,
      </if>
      <if test="receiverId != null">
        receiver_id,
      </if>
      <if test="payer != null">
        payer,
      </if>
      <if test="payerId != null">
        payer_id,
      </if>
      <if test="currency != null">
        currency,
      </if>
      <if test="currencyId != null">
        currency_id,
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate,
      </if>
      <if test="type != null">
        type,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="transactionId != null">
        #{transactionId,jdbcType=VARCHAR},
      </if>
      <if test="parentTransactionId != null">
        #{parentTransactionId,jdbcType=VARCHAR},
      </if>
      <if test="receiptId != null">
        #{receiptId,jdbcType=VARCHAR},
      </if>
      <if test="transactionType != null">
        #{transactionType,jdbcType=VARCHAR},
      </if>
      <if test="paymentType != null">
        #{paymentType,jdbcType=VARCHAR},
      </if>
      <if test="paymentDate != null">
        #{paymentDate,jdbcType=TIMESTAMP},
      </if>
      <if test="grossAmount != null">
        #{grossAmount,jdbcType=DECIMAL},
      </if>
      <if test="feeAmount != null">
        #{feeAmount,jdbcType=DECIMAL},
      </if>
      <if test="settleAmount != null">
        #{settleAmount,jdbcType=DECIMAL},
      </if>
      <if test="taxAmount != null">
        #{taxAmount,jdbcType=DECIMAL},
      </if>
      <if test="exchangeRate != null">
        #{exchangeRate,jdbcType=VARCHAR},
      </if>
      <if test="paymentStatus != null">
        #{paymentStatus,jdbcType=VARCHAR},
      </if>
      <if test="pendingReason != null">
        #{pendingReason,jdbcType=VARCHAR},
      </if>
      <if test="reasonCode != null">
        #{reasonCode,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="saasCompanyId != null">
        #{saasCompanyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="business != null">
        #{business,jdbcType=VARCHAR},
      </if>
      <if test="receiver != null">
        #{receiver,jdbcType=VARCHAR},
      </if>
      <if test="receiverId != null">
        #{receiverId,jdbcType=VARCHAR},
      </if>
      <if test="payer != null">
        #{payer,jdbcType=VARCHAR},
      </if>
      <if test="payerId != null">
        #{payerId,jdbcType=VARCHAR},
      </if>
      <if test="currency != null">
        #{currency,jdbcType=VARCHAR},
      </if>
      <if test="currencyId != null">
        #{currencyId,jdbcType=INTEGER},
      </if>
      <if test="otherToCnyExchangeRate != null">
        #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="transactionId != null">
        transaction_id = #{transactionId,jdbcType=VARCHAR},
      </if>
      <if test="parentTransactionId != null">
        parent_transaction_id = #{parentTransactionId,jdbcType=VARCHAR},
      </if>
      <if test="receiptId != null">
        receipt_id = #{receiptId,jdbcType=VARCHAR},
      </if>
      <if test="transactionType != null">
        transaction_type = #{transactionType,jdbcType=VARCHAR},
      </if>
      <if test="paymentType != null">
        payment_type = #{paymentType,jdbcType=VARCHAR},
      </if>
      <if test="paymentDate != null">
        payment_date = #{paymentDate,jdbcType=TIMESTAMP},
      </if>
      <if test="grossAmount != null">
        gross_amount = #{grossAmount,jdbcType=DECIMAL},
      </if>
      <if test="feeAmount != null">
        fee_amount = #{feeAmount,jdbcType=DECIMAL},
      </if>
      <if test="settleAmount != null">
        settle_amount = #{settleAmount,jdbcType=DECIMAL},
      </if>
      <if test="taxAmount != null">
        tax_amount = #{taxAmount,jdbcType=DECIMAL},
      </if>
      <if test="exchangeRate != null">
        exchange_rate = #{exchangeRate,jdbcType=VARCHAR},
      </if>
      <if test="paymentStatus != null">
        payment_status = #{paymentStatus,jdbcType=VARCHAR},
      </if>
      <if test="pendingReason != null">
        pending_reason = #{pendingReason,jdbcType=VARCHAR},
      </if>
      <if test="reasonCode != null">
        reason_code = #{reasonCode,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="saasCompanyId != null">
        saas_company_id = #{saasCompanyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="business != null">
        business = #{business,jdbcType=VARCHAR},
      </if>
      <if test="receiver != null">
        receiver = #{receiver,jdbcType=VARCHAR},
      </if>
      <if test="receiverId != null">
        receiver_id = #{receiverId,jdbcType=VARCHAR},
      </if>
      <if test="payer != null">
        payer = #{payer,jdbcType=VARCHAR},
      </if>
      <if test="payerId != null">
        payer_id = #{payerId,jdbcType=VARCHAR},
      </if>
      <if test="currency != null">
        currency = #{currency,jdbcType=VARCHAR},
      </if>
      <if test="currencyId != null">
        currency_id = #{currencyId,jdbcType=INTEGER},
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinancePaypal">
    <!--
      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_paypal
    (id, transaction_id, parent_transaction_id, receipt_id, transaction_type, payment_type, 
      payment_date, gross_amount, fee_amount, settle_amount, tax_amount, exchange_rate, 
      payment_status, pending_reason, reason_code, create_time, saas_company_id, gmt_create_time, 
      gmt_modify_time, business, receiver, receiver_id, payer, payer_id, currency, currency_id, 
      other_to_cny_exchange_rate, type)
    values
    (#{id,jdbcType=INTEGER}, #{transactionId,jdbcType=VARCHAR}, #{parentTransactionId,jdbcType=VARCHAR}, 
      #{receiptId,jdbcType=VARCHAR}, #{transactionType,jdbcType=VARCHAR}, #{paymentType,jdbcType=VARCHAR}, 
      #{paymentDate,jdbcType=TIMESTAMP}, #{grossAmount,jdbcType=DECIMAL}, #{feeAmount,jdbcType=DECIMAL}, 
      #{settleAmount,jdbcType=DECIMAL}, #{taxAmount,jdbcType=DECIMAL}, #{exchangeRate,jdbcType=VARCHAR}, 
      #{paymentStatus,jdbcType=VARCHAR}, #{pendingReason,jdbcType=VARCHAR}, #{reasonCode,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{saasCompanyId,jdbcType=INTEGER}, #{gmtCreateTime,jdbcType=TIMESTAMP}, 
      #{gmtModifyTime,jdbcType=TIMESTAMP}, #{business,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, 
      #{receiverId,jdbcType=VARCHAR}, #{payer,jdbcType=VARCHAR}, #{payerId,jdbcType=VARCHAR}, 
      #{currency,jdbcType=VARCHAR}, #{currencyId,jdbcType=INTEGER}, #{otherToCnyExchangeRate,jdbcType=DECIMAL}, 
      #{type,jdbcType=VARCHAR})
    on duplicate key update 
    id = #{id,jdbcType=INTEGER}, 
    transaction_id = #{transactionId,jdbcType=VARCHAR}, 
    parent_transaction_id = #{parentTransactionId,jdbcType=VARCHAR}, 
    receipt_id = #{receiptId,jdbcType=VARCHAR}, 
    transaction_type = #{transactionType,jdbcType=VARCHAR}, 
    payment_type = #{paymentType,jdbcType=VARCHAR}, 
    payment_date = #{paymentDate,jdbcType=TIMESTAMP}, 
    gross_amount = #{grossAmount,jdbcType=DECIMAL}, 
    fee_amount = #{feeAmount,jdbcType=DECIMAL}, 
    settle_amount = #{settleAmount,jdbcType=DECIMAL}, 
    tax_amount = #{taxAmount,jdbcType=DECIMAL}, 
    exchange_rate = #{exchangeRate,jdbcType=VARCHAR}, 
    payment_status = #{paymentStatus,jdbcType=VARCHAR}, 
    pending_reason = #{pendingReason,jdbcType=VARCHAR}, 
    reason_code = #{reasonCode,jdbcType=VARCHAR}, 
    create_time = #{createTime,jdbcType=TIMESTAMP}, 
    saas_company_id = #{saasCompanyId,jdbcType=INTEGER}, 
    gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP}, 
    gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP}, 
    business = #{business,jdbcType=VARCHAR}, 
    receiver = #{receiver,jdbcType=VARCHAR}, 
    receiver_id = #{receiverId,jdbcType=VARCHAR}, 
    payer = #{payer,jdbcType=VARCHAR}, 
    payer_id = #{payerId,jdbcType=VARCHAR}, 
    currency = #{currency,jdbcType=VARCHAR}, 
    currency_id = #{currencyId,jdbcType=INTEGER}, 
    other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL}, 
    type = #{type,jdbcType=VARCHAR}
  </insert>
  <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseFinancePaypalExample" 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_paypal
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
</mapper>