<?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.DcBaseFinanceWishMapper">
  <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcBaseFinanceWish">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="campaign_id" jdbcType="VARCHAR" property="campaignId" />
    <result column="campaign_name" jdbcType="VARCHAR" property="campaignName" />
    <result column="other_to_cny_exchange_rate" jdbcType="DECIMAL" property="otherToCnyExchangeRate" />
    <result column="other_to_usd_exchange_rate" jdbcType="DECIMAL" property="otherToUsdExchangeRate" />
    <result column="campaign_max_budget" jdbcType="DECIMAL" property="campaignMaxBudget" />
    <result column="is_automated_campaign" jdbcType="BIT" property="isAutomatedCampaign" />
    <result column="auto_renew" jdbcType="BIT" property="autoRenew" />
    <result column="scheduled_add_budget_amount" jdbcType="DECIMAL" property="scheduledAddBudgetAmount" />
    <result column="total_impressions" jdbcType="INTEGER" property="totalImpressions" />
    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
    <result column="sales" jdbcType="INTEGER" property="sales" />
    <result column="total_impression_fees_charged" jdbcType="DECIMAL" property="totalImpressionFeesCharged" />
    <result column="scheduled_add_budget_enabled" jdbcType="BIT" property="scheduledAddBudgetEnabled" />
    <result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
    <result column="impression_fees_breakdown" jdbcType="VARCHAR" property="impressionFeesBreakdown" />
    <result column="campaign_state" jdbcType="VARCHAR" property="campaignState" />
    <result column="can_edit" jdbcType="BIT" property="canEdit" />
    <result column="discount_ratio" jdbcType="DECIMAL" property="discountRatio" />
    <result column="is_simple_boost" jdbcType="BIT" property="isSimpleBoost" />
    <result column="total_campaign_spend" jdbcType="DECIMAL" property="totalCampaignSpend" />
    <result column="scheduled_add_budget_days" jdbcType="VARCHAR" property="scheduledAddBudgetDays" />
    <result column="last_updated_time" jdbcType="TIMESTAMP" property="lastUpdatedTime" />
    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
    <result column="total_enrollment_fees_charged" jdbcType="DECIMAL" property="totalEnrollmentFeesCharged" />
    <result column="gmv" jdbcType="DECIMAL" property="gmv" />
    <result column="account_id" jdbcType="INTEGER" property="accountId" />
    <result column="company_id" jdbcType="INTEGER" property="companyId" />
    <result column="gmt_create_time" jdbcType="TIMESTAMP" property="gmtCreateTime" />
    <result column="gmt_modify_time" jdbcType="TIMESTAMP" property="gmtModifyTime" />
    <result column="record_time" jdbcType="DATE" property="recordTime" />
    <result column="daily_campaign_max_budget" jdbcType="DECIMAL" property="dailyCampaignMaxBudget" />
    <result column="daily_total_campaign_spend" jdbcType="DECIMAL" property="dailyTotalCampaignSpend" />
    <result column="daily_gmv" jdbcType="DECIMAL" property="dailyGmv" />
  </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, campaign_id, campaign_name, other_to_cny_exchange_rate, other_to_usd_exchange_rate, 
    campaign_max_budget, is_automated_campaign, auto_renew, scheduled_add_budget_amount, 
    total_impressions, start_time, sales, total_impression_fees_charged, scheduled_add_budget_enabled, 
    merchant_id, impression_fees_breakdown, campaign_state, can_edit, discount_ratio, 
    is_simple_boost, total_campaign_spend, scheduled_add_budget_days, last_updated_time, 
    end_time, total_enrollment_fees_charged, gmv, account_id, company_id, gmt_create_time, 
    gmt_modify_time, record_time, daily_campaign_max_budget, daily_total_campaign_spend, 
    daily_gmv
  </sql>
  <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceWishExample" 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_wish
    <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_wish
    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_wish
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceWishExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_base_finance_wish
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWish">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_finance_wish (id, campaign_id, campaign_name, 
      other_to_cny_exchange_rate, other_to_usd_exchange_rate, 
      campaign_max_budget, is_automated_campaign, auto_renew, 
      scheduled_add_budget_amount, total_impressions, 
      start_time, sales, total_impression_fees_charged, 
      scheduled_add_budget_enabled, merchant_id, impression_fees_breakdown, 
      campaign_state, can_edit, discount_ratio, 
      is_simple_boost, total_campaign_spend, scheduled_add_budget_days, 
      last_updated_time, end_time, total_enrollment_fees_charged, 
      gmv, account_id, company_id, 
      gmt_create_time, gmt_modify_time, record_time, 
      daily_campaign_max_budget, daily_total_campaign_spend, 
      daily_gmv)
    values (#{id,jdbcType=INTEGER}, #{campaignId,jdbcType=VARCHAR}, #{campaignName,jdbcType=VARCHAR}, 
      #{otherToCnyExchangeRate,jdbcType=DECIMAL}, #{otherToUsdExchangeRate,jdbcType=DECIMAL}, 
      #{campaignMaxBudget,jdbcType=DECIMAL}, #{isAutomatedCampaign,jdbcType=BIT}, #{autoRenew,jdbcType=BIT}, 
      #{scheduledAddBudgetAmount,jdbcType=DECIMAL}, #{totalImpressions,jdbcType=INTEGER}, 
      #{startTime,jdbcType=TIMESTAMP}, #{sales,jdbcType=INTEGER}, #{totalImpressionFeesCharged,jdbcType=DECIMAL}, 
      #{scheduledAddBudgetEnabled,jdbcType=BIT}, #{merchantId,jdbcType=VARCHAR}, #{impressionFeesBreakdown,jdbcType=VARCHAR}, 
      #{campaignState,jdbcType=VARCHAR}, #{canEdit,jdbcType=BIT}, #{discountRatio,jdbcType=DECIMAL}, 
      #{isSimpleBoost,jdbcType=BIT}, #{totalCampaignSpend,jdbcType=DECIMAL}, #{scheduledAddBudgetDays,jdbcType=VARCHAR}, 
      #{lastUpdatedTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{totalEnrollmentFeesCharged,jdbcType=DECIMAL}, 
      #{gmv,jdbcType=DECIMAL}, #{accountId,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, 
      #{gmtCreateTime,jdbcType=TIMESTAMP}, #{gmtModifyTime,jdbcType=TIMESTAMP}, #{recordTime,jdbcType=DATE}, 
      #{dailyCampaignMaxBudget,jdbcType=DECIMAL}, #{dailyTotalCampaignSpend,jdbcType=DECIMAL}, 
      #{dailyGmv,jdbcType=DECIMAL})
  </insert>
  <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWish">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_finance_wish
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="campaignId != null">
        campaign_id,
      </if>
      <if test="campaignName != null">
        campaign_name,
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate,
      </if>
      <if test="otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate,
      </if>
      <if test="campaignMaxBudget != null">
        campaign_max_budget,
      </if>
      <if test="isAutomatedCampaign != null">
        is_automated_campaign,
      </if>
      <if test="autoRenew != null">
        auto_renew,
      </if>
      <if test="scheduledAddBudgetAmount != null">
        scheduled_add_budget_amount,
      </if>
      <if test="totalImpressions != null">
        total_impressions,
      </if>
      <if test="startTime != null">
        start_time,
      </if>
      <if test="sales != null">
        sales,
      </if>
      <if test="totalImpressionFeesCharged != null">
        total_impression_fees_charged,
      </if>
      <if test="scheduledAddBudgetEnabled != null">
        scheduled_add_budget_enabled,
      </if>
      <if test="merchantId != null">
        merchant_id,
      </if>
      <if test="impressionFeesBreakdown != null">
        impression_fees_breakdown,
      </if>
      <if test="campaignState != null">
        campaign_state,
      </if>
      <if test="canEdit != null">
        can_edit,
      </if>
      <if test="discountRatio != null">
        discount_ratio,
      </if>
      <if test="isSimpleBoost != null">
        is_simple_boost,
      </if>
      <if test="totalCampaignSpend != null">
        total_campaign_spend,
      </if>
      <if test="scheduledAddBudgetDays != null">
        scheduled_add_budget_days,
      </if>
      <if test="lastUpdatedTime != null">
        last_updated_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="totalEnrollmentFeesCharged != null">
        total_enrollment_fees_charged,
      </if>
      <if test="gmv != null">
        gmv,
      </if>
      <if test="accountId != null">
        account_id,
      </if>
      <if test="companyId != null">
        company_id,
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time,
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time,
      </if>
      <if test="recordTime != null">
        record_time,
      </if>
      <if test="dailyCampaignMaxBudget != null">
        daily_campaign_max_budget,
      </if>
      <if test="dailyTotalCampaignSpend != null">
        daily_total_campaign_spend,
      </if>
      <if test="dailyGmv != null">
        daily_gmv,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="campaignId != null">
        #{campaignId,jdbcType=VARCHAR},
      </if>
      <if test="campaignName != null">
        #{campaignName,jdbcType=VARCHAR},
      </if>
      <if test="otherToCnyExchangeRate != null">
        #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="otherToUsdExchangeRate != null">
        #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="campaignMaxBudget != null">
        #{campaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="isAutomatedCampaign != null">
        #{isAutomatedCampaign,jdbcType=BIT},
      </if>
      <if test="autoRenew != null">
        #{autoRenew,jdbcType=BIT},
      </if>
      <if test="scheduledAddBudgetAmount != null">
        #{scheduledAddBudgetAmount,jdbcType=DECIMAL},
      </if>
      <if test="totalImpressions != null">
        #{totalImpressions,jdbcType=INTEGER},
      </if>
      <if test="startTime != null">
        #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sales != null">
        #{sales,jdbcType=INTEGER},
      </if>
      <if test="totalImpressionFeesCharged != null">
        #{totalImpressionFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="scheduledAddBudgetEnabled != null">
        #{scheduledAddBudgetEnabled,jdbcType=BIT},
      </if>
      <if test="merchantId != null">
        #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="impressionFeesBreakdown != null">
        #{impressionFeesBreakdown,jdbcType=VARCHAR},
      </if>
      <if test="campaignState != null">
        #{campaignState,jdbcType=VARCHAR},
      </if>
      <if test="canEdit != null">
        #{canEdit,jdbcType=BIT},
      </if>
      <if test="discountRatio != null">
        #{discountRatio,jdbcType=DECIMAL},
      </if>
      <if test="isSimpleBoost != null">
        #{isSimpleBoost,jdbcType=BIT},
      </if>
      <if test="totalCampaignSpend != null">
        #{totalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="scheduledAddBudgetDays != null">
        #{scheduledAddBudgetDays,jdbcType=VARCHAR},
      </if>
      <if test="lastUpdatedTime != null">
        #{lastUpdatedTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="totalEnrollmentFeesCharged != null">
        #{totalEnrollmentFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="gmv != null">
        #{gmv,jdbcType=DECIMAL},
      </if>
      <if test="accountId != null">
        #{accountId,jdbcType=INTEGER},
      </if>
      <if test="companyId != null">
        #{companyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recordTime != null">
        #{recordTime,jdbcType=DATE},
      </if>
      <if test="dailyCampaignMaxBudget != null">
        #{dailyCampaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="dailyTotalCampaignSpend != null">
        #{dailyTotalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="dailyGmv != null">
        #{dailyGmv,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceWishExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from dc_base_finance_wish
    <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_wish
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.campaignId != null">
        campaign_id = #{record.campaignId,jdbcType=VARCHAR},
      </if>
      <if test="record.campaignName != null">
        campaign_name = #{record.campaignName,jdbcType=VARCHAR},
      </if>
      <if test="record.otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate = #{record.otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate = #{record.otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.campaignMaxBudget != null">
        campaign_max_budget = #{record.campaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="record.isAutomatedCampaign != null">
        is_automated_campaign = #{record.isAutomatedCampaign,jdbcType=BIT},
      </if>
      <if test="record.autoRenew != null">
        auto_renew = #{record.autoRenew,jdbcType=BIT},
      </if>
      <if test="record.scheduledAddBudgetAmount != null">
        scheduled_add_budget_amount = #{record.scheduledAddBudgetAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.totalImpressions != null">
        total_impressions = #{record.totalImpressions,jdbcType=INTEGER},
      </if>
      <if test="record.startTime != null">
        start_time = #{record.startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.sales != null">
        sales = #{record.sales,jdbcType=INTEGER},
      </if>
      <if test="record.totalImpressionFeesCharged != null">
        total_impression_fees_charged = #{record.totalImpressionFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="record.scheduledAddBudgetEnabled != null">
        scheduled_add_budget_enabled = #{record.scheduledAddBudgetEnabled,jdbcType=BIT},
      </if>
      <if test="record.merchantId != null">
        merchant_id = #{record.merchantId,jdbcType=VARCHAR},
      </if>
      <if test="record.impressionFeesBreakdown != null">
        impression_fees_breakdown = #{record.impressionFeesBreakdown,jdbcType=VARCHAR},
      </if>
      <if test="record.campaignState != null">
        campaign_state = #{record.campaignState,jdbcType=VARCHAR},
      </if>
      <if test="record.canEdit != null">
        can_edit = #{record.canEdit,jdbcType=BIT},
      </if>
      <if test="record.discountRatio != null">
        discount_ratio = #{record.discountRatio,jdbcType=DECIMAL},
      </if>
      <if test="record.isSimpleBoost != null">
        is_simple_boost = #{record.isSimpleBoost,jdbcType=BIT},
      </if>
      <if test="record.totalCampaignSpend != null">
        total_campaign_spend = #{record.totalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="record.scheduledAddBudgetDays != null">
        scheduled_add_budget_days = #{record.scheduledAddBudgetDays,jdbcType=VARCHAR},
      </if>
      <if test="record.lastUpdatedTime != null">
        last_updated_time = #{record.lastUpdatedTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.endTime != null">
        end_time = #{record.endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.totalEnrollmentFeesCharged != null">
        total_enrollment_fees_charged = #{record.totalEnrollmentFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="record.gmv != null">
        gmv = #{record.gmv,jdbcType=DECIMAL},
      </if>
      <if test="record.accountId != null">
        account_id = #{record.accountId,jdbcType=INTEGER},
      </if>
      <if test="record.companyId != null">
        company_id = #{record.companyId,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.recordTime != null">
        record_time = #{record.recordTime,jdbcType=DATE},
      </if>
      <if test="record.dailyCampaignMaxBudget != null">
        daily_campaign_max_budget = #{record.dailyCampaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="record.dailyTotalCampaignSpend != null">
        daily_total_campaign_spend = #{record.dailyTotalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="record.dailyGmv != null">
        daily_gmv = #{record.dailyGmv,jdbcType=DECIMAL},
      </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_wish
    set id = #{record.id,jdbcType=INTEGER},
      campaign_id = #{record.campaignId,jdbcType=VARCHAR},
      campaign_name = #{record.campaignName,jdbcType=VARCHAR},
      other_to_cny_exchange_rate = #{record.otherToCnyExchangeRate,jdbcType=DECIMAL},
      other_to_usd_exchange_rate = #{record.otherToUsdExchangeRate,jdbcType=DECIMAL},
      campaign_max_budget = #{record.campaignMaxBudget,jdbcType=DECIMAL},
      is_automated_campaign = #{record.isAutomatedCampaign,jdbcType=BIT},
      auto_renew = #{record.autoRenew,jdbcType=BIT},
      scheduled_add_budget_amount = #{record.scheduledAddBudgetAmount,jdbcType=DECIMAL},
      total_impressions = #{record.totalImpressions,jdbcType=INTEGER},
      start_time = #{record.startTime,jdbcType=TIMESTAMP},
      sales = #{record.sales,jdbcType=INTEGER},
      total_impression_fees_charged = #{record.totalImpressionFeesCharged,jdbcType=DECIMAL},
      scheduled_add_budget_enabled = #{record.scheduledAddBudgetEnabled,jdbcType=BIT},
      merchant_id = #{record.merchantId,jdbcType=VARCHAR},
      impression_fees_breakdown = #{record.impressionFeesBreakdown,jdbcType=VARCHAR},
      campaign_state = #{record.campaignState,jdbcType=VARCHAR},
      can_edit = #{record.canEdit,jdbcType=BIT},
      discount_ratio = #{record.discountRatio,jdbcType=DECIMAL},
      is_simple_boost = #{record.isSimpleBoost,jdbcType=BIT},
      total_campaign_spend = #{record.totalCampaignSpend,jdbcType=DECIMAL},
      scheduled_add_budget_days = #{record.scheduledAddBudgetDays,jdbcType=VARCHAR},
      last_updated_time = #{record.lastUpdatedTime,jdbcType=TIMESTAMP},
      end_time = #{record.endTime,jdbcType=TIMESTAMP},
      total_enrollment_fees_charged = #{record.totalEnrollmentFeesCharged,jdbcType=DECIMAL},
      gmv = #{record.gmv,jdbcType=DECIMAL},
      account_id = #{record.accountId,jdbcType=INTEGER},
      company_id = #{record.companyId,jdbcType=INTEGER},
      gmt_create_time = #{record.gmtCreateTime,jdbcType=TIMESTAMP},
      gmt_modify_time = #{record.gmtModifyTime,jdbcType=TIMESTAMP},
      record_time = #{record.recordTime,jdbcType=DATE},
      daily_campaign_max_budget = #{record.dailyCampaignMaxBudget,jdbcType=DECIMAL},
      daily_total_campaign_spend = #{record.dailyTotalCampaignSpend,jdbcType=DECIMAL},
      daily_gmv = #{record.dailyGmv,jdbcType=DECIMAL}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWish">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_wish
    <set>
      <if test="campaignId != null">
        campaign_id = #{campaignId,jdbcType=VARCHAR},
      </if>
      <if test="campaignName != null">
        campaign_name = #{campaignName,jdbcType=VARCHAR},
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate = #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="campaignMaxBudget != null">
        campaign_max_budget = #{campaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="isAutomatedCampaign != null">
        is_automated_campaign = #{isAutomatedCampaign,jdbcType=BIT},
      </if>
      <if test="autoRenew != null">
        auto_renew = #{autoRenew,jdbcType=BIT},
      </if>
      <if test="scheduledAddBudgetAmount != null">
        scheduled_add_budget_amount = #{scheduledAddBudgetAmount,jdbcType=DECIMAL},
      </if>
      <if test="totalImpressions != null">
        total_impressions = #{totalImpressions,jdbcType=INTEGER},
      </if>
      <if test="startTime != null">
        start_time = #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sales != null">
        sales = #{sales,jdbcType=INTEGER},
      </if>
      <if test="totalImpressionFeesCharged != null">
        total_impression_fees_charged = #{totalImpressionFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="scheduledAddBudgetEnabled != null">
        scheduled_add_budget_enabled = #{scheduledAddBudgetEnabled,jdbcType=BIT},
      </if>
      <if test="merchantId != null">
        merchant_id = #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="impressionFeesBreakdown != null">
        impression_fees_breakdown = #{impressionFeesBreakdown,jdbcType=VARCHAR},
      </if>
      <if test="campaignState != null">
        campaign_state = #{campaignState,jdbcType=VARCHAR},
      </if>
      <if test="canEdit != null">
        can_edit = #{canEdit,jdbcType=BIT},
      </if>
      <if test="discountRatio != null">
        discount_ratio = #{discountRatio,jdbcType=DECIMAL},
      </if>
      <if test="isSimpleBoost != null">
        is_simple_boost = #{isSimpleBoost,jdbcType=BIT},
      </if>
      <if test="totalCampaignSpend != null">
        total_campaign_spend = #{totalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="scheduledAddBudgetDays != null">
        scheduled_add_budget_days = #{scheduledAddBudgetDays,jdbcType=VARCHAR},
      </if>
      <if test="lastUpdatedTime != null">
        last_updated_time = #{lastUpdatedTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="totalEnrollmentFeesCharged != null">
        total_enrollment_fees_charged = #{totalEnrollmentFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="gmv != null">
        gmv = #{gmv,jdbcType=DECIMAL},
      </if>
      <if test="accountId != null">
        account_id = #{accountId,jdbcType=INTEGER},
      </if>
      <if test="companyId != null">
        company_id = #{companyId,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="recordTime != null">
        record_time = #{recordTime,jdbcType=DATE},
      </if>
      <if test="dailyCampaignMaxBudget != null">
        daily_campaign_max_budget = #{dailyCampaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="dailyTotalCampaignSpend != null">
        daily_total_campaign_spend = #{dailyTotalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="dailyGmv != null">
        daily_gmv = #{dailyGmv,jdbcType=DECIMAL},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWish">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_wish
    set campaign_id = #{campaignId,jdbcType=VARCHAR},
      campaign_name = #{campaignName,jdbcType=VARCHAR},
      other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      other_to_usd_exchange_rate = #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      campaign_max_budget = #{campaignMaxBudget,jdbcType=DECIMAL},
      is_automated_campaign = #{isAutomatedCampaign,jdbcType=BIT},
      auto_renew = #{autoRenew,jdbcType=BIT},
      scheduled_add_budget_amount = #{scheduledAddBudgetAmount,jdbcType=DECIMAL},
      total_impressions = #{totalImpressions,jdbcType=INTEGER},
      start_time = #{startTime,jdbcType=TIMESTAMP},
      sales = #{sales,jdbcType=INTEGER},
      total_impression_fees_charged = #{totalImpressionFeesCharged,jdbcType=DECIMAL},
      scheduled_add_budget_enabled = #{scheduledAddBudgetEnabled,jdbcType=BIT},
      merchant_id = #{merchantId,jdbcType=VARCHAR},
      impression_fees_breakdown = #{impressionFeesBreakdown,jdbcType=VARCHAR},
      campaign_state = #{campaignState,jdbcType=VARCHAR},
      can_edit = #{canEdit,jdbcType=BIT},
      discount_ratio = #{discountRatio,jdbcType=DECIMAL},
      is_simple_boost = #{isSimpleBoost,jdbcType=BIT},
      total_campaign_spend = #{totalCampaignSpend,jdbcType=DECIMAL},
      scheduled_add_budget_days = #{scheduledAddBudgetDays,jdbcType=VARCHAR},
      last_updated_time = #{lastUpdatedTime,jdbcType=TIMESTAMP},
      end_time = #{endTime,jdbcType=TIMESTAMP},
      total_enrollment_fees_charged = #{totalEnrollmentFeesCharged,jdbcType=DECIMAL},
      gmv = #{gmv,jdbcType=DECIMAL},
      account_id = #{accountId,jdbcType=INTEGER},
      company_id = #{companyId,jdbcType=INTEGER},
      gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
      gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP},
      record_time = #{recordTime,jdbcType=DATE},
      daily_campaign_max_budget = #{dailyCampaignMaxBudget,jdbcType=DECIMAL},
      daily_total_campaign_spend = #{dailyTotalCampaignSpend,jdbcType=DECIMAL},
      daily_gmv = #{dailyGmv,jdbcType=DECIMAL}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWish">
    <!--
      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_wish
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="campaignId != null">
        campaign_id,
      </if>
      <if test="campaignName != null">
        campaign_name,
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate,
      </if>
      <if test="otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate,
      </if>
      <if test="campaignMaxBudget != null">
        campaign_max_budget,
      </if>
      <if test="isAutomatedCampaign != null">
        is_automated_campaign,
      </if>
      <if test="autoRenew != null">
        auto_renew,
      </if>
      <if test="scheduledAddBudgetAmount != null">
        scheduled_add_budget_amount,
      </if>
      <if test="totalImpressions != null">
        total_impressions,
      </if>
      <if test="startTime != null">
        start_time,
      </if>
      <if test="sales != null">
        sales,
      </if>
      <if test="totalImpressionFeesCharged != null">
        total_impression_fees_charged,
      </if>
      <if test="scheduledAddBudgetEnabled != null">
        scheduled_add_budget_enabled,
      </if>
      <if test="merchantId != null">
        merchant_id,
      </if>
      <if test="impressionFeesBreakdown != null">
        impression_fees_breakdown,
      </if>
      <if test="campaignState != null">
        campaign_state,
      </if>
      <if test="canEdit != null">
        can_edit,
      </if>
      <if test="discountRatio != null">
        discount_ratio,
      </if>
      <if test="isSimpleBoost != null">
        is_simple_boost,
      </if>
      <if test="totalCampaignSpend != null">
        total_campaign_spend,
      </if>
      <if test="scheduledAddBudgetDays != null">
        scheduled_add_budget_days,
      </if>
      <if test="lastUpdatedTime != null">
        last_updated_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="totalEnrollmentFeesCharged != null">
        total_enrollment_fees_charged,
      </if>
      <if test="gmv != null">
        gmv,
      </if>
      <if test="accountId != null">
        account_id,
      </if>
      <if test="companyId != null">
        company_id,
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time,
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time,
      </if>
      <if test="recordTime != null">
        record_time,
      </if>
      <if test="dailyCampaignMaxBudget != null">
        daily_campaign_max_budget,
      </if>
      <if test="dailyTotalCampaignSpend != null">
        daily_total_campaign_spend,
      </if>
      <if test="dailyGmv != null">
        daily_gmv,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="campaignId != null">
        #{campaignId,jdbcType=VARCHAR},
      </if>
      <if test="campaignName != null">
        #{campaignName,jdbcType=VARCHAR},
      </if>
      <if test="otherToCnyExchangeRate != null">
        #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="otherToUsdExchangeRate != null">
        #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="campaignMaxBudget != null">
        #{campaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="isAutomatedCampaign != null">
        #{isAutomatedCampaign,jdbcType=BIT},
      </if>
      <if test="autoRenew != null">
        #{autoRenew,jdbcType=BIT},
      </if>
      <if test="scheduledAddBudgetAmount != null">
        #{scheduledAddBudgetAmount,jdbcType=DECIMAL},
      </if>
      <if test="totalImpressions != null">
        #{totalImpressions,jdbcType=INTEGER},
      </if>
      <if test="startTime != null">
        #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sales != null">
        #{sales,jdbcType=INTEGER},
      </if>
      <if test="totalImpressionFeesCharged != null">
        #{totalImpressionFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="scheduledAddBudgetEnabled != null">
        #{scheduledAddBudgetEnabled,jdbcType=BIT},
      </if>
      <if test="merchantId != null">
        #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="impressionFeesBreakdown != null">
        #{impressionFeesBreakdown,jdbcType=VARCHAR},
      </if>
      <if test="campaignState != null">
        #{campaignState,jdbcType=VARCHAR},
      </if>
      <if test="canEdit != null">
        #{canEdit,jdbcType=BIT},
      </if>
      <if test="discountRatio != null">
        #{discountRatio,jdbcType=DECIMAL},
      </if>
      <if test="isSimpleBoost != null">
        #{isSimpleBoost,jdbcType=BIT},
      </if>
      <if test="totalCampaignSpend != null">
        #{totalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="scheduledAddBudgetDays != null">
        #{scheduledAddBudgetDays,jdbcType=VARCHAR},
      </if>
      <if test="lastUpdatedTime != null">
        #{lastUpdatedTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="totalEnrollmentFeesCharged != null">
        #{totalEnrollmentFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="gmv != null">
        #{gmv,jdbcType=DECIMAL},
      </if>
      <if test="accountId != null">
        #{accountId,jdbcType=INTEGER},
      </if>
      <if test="companyId != null">
        #{companyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recordTime != null">
        #{recordTime,jdbcType=DATE},
      </if>
      <if test="dailyCampaignMaxBudget != null">
        #{dailyCampaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="dailyTotalCampaignSpend != null">
        #{dailyTotalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="dailyGmv != null">
        #{dailyGmv,jdbcType=DECIMAL},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="campaignId != null">
        campaign_id = #{campaignId,jdbcType=VARCHAR},
      </if>
      <if test="campaignName != null">
        campaign_name = #{campaignName,jdbcType=VARCHAR},
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate = #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="campaignMaxBudget != null">
        campaign_max_budget = #{campaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="isAutomatedCampaign != null">
        is_automated_campaign = #{isAutomatedCampaign,jdbcType=BIT},
      </if>
      <if test="autoRenew != null">
        auto_renew = #{autoRenew,jdbcType=BIT},
      </if>
      <if test="scheduledAddBudgetAmount != null">
        scheduled_add_budget_amount = #{scheduledAddBudgetAmount,jdbcType=DECIMAL},
      </if>
      <if test="totalImpressions != null">
        total_impressions = #{totalImpressions,jdbcType=INTEGER},
      </if>
      <if test="startTime != null">
        start_time = #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sales != null">
        sales = #{sales,jdbcType=INTEGER},
      </if>
      <if test="totalImpressionFeesCharged != null">
        total_impression_fees_charged = #{totalImpressionFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="scheduledAddBudgetEnabled != null">
        scheduled_add_budget_enabled = #{scheduledAddBudgetEnabled,jdbcType=BIT},
      </if>
      <if test="merchantId != null">
        merchant_id = #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="impressionFeesBreakdown != null">
        impression_fees_breakdown = #{impressionFeesBreakdown,jdbcType=VARCHAR},
      </if>
      <if test="campaignState != null">
        campaign_state = #{campaignState,jdbcType=VARCHAR},
      </if>
      <if test="canEdit != null">
        can_edit = #{canEdit,jdbcType=BIT},
      </if>
      <if test="discountRatio != null">
        discount_ratio = #{discountRatio,jdbcType=DECIMAL},
      </if>
      <if test="isSimpleBoost != null">
        is_simple_boost = #{isSimpleBoost,jdbcType=BIT},
      </if>
      <if test="totalCampaignSpend != null">
        total_campaign_spend = #{totalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="scheduledAddBudgetDays != null">
        scheduled_add_budget_days = #{scheduledAddBudgetDays,jdbcType=VARCHAR},
      </if>
      <if test="lastUpdatedTime != null">
        last_updated_time = #{lastUpdatedTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="totalEnrollmentFeesCharged != null">
        total_enrollment_fees_charged = #{totalEnrollmentFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="gmv != null">
        gmv = #{gmv,jdbcType=DECIMAL},
      </if>
      <if test="accountId != null">
        account_id = #{accountId,jdbcType=INTEGER},
      </if>
      <if test="companyId != null">
        company_id = #{companyId,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="recordTime != null">
        record_time = #{recordTime,jdbcType=DATE},
      </if>
      <if test="dailyCampaignMaxBudget != null">
        daily_campaign_max_budget = #{dailyCampaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="dailyTotalCampaignSpend != null">
        daily_total_campaign_spend = #{dailyTotalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="dailyGmv != null">
        daily_gmv = #{dailyGmv,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWish">
    <!--
      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_wish
    (id, campaign_id, campaign_name, other_to_cny_exchange_rate, other_to_usd_exchange_rate, 
      campaign_max_budget, is_automated_campaign, auto_renew, scheduled_add_budget_amount, 
      total_impressions, start_time, sales, total_impression_fees_charged, scheduled_add_budget_enabled, 
      merchant_id, impression_fees_breakdown, campaign_state, can_edit, discount_ratio, 
      is_simple_boost, total_campaign_spend, scheduled_add_budget_days, last_updated_time, 
      end_time, total_enrollment_fees_charged, gmv, account_id, company_id, gmt_create_time, 
      gmt_modify_time, record_time, daily_campaign_max_budget, daily_total_campaign_spend, 
      daily_gmv)
    values
    (#{id,jdbcType=INTEGER}, #{campaignId,jdbcType=VARCHAR}, #{campaignName,jdbcType=VARCHAR}, 
      #{otherToCnyExchangeRate,jdbcType=DECIMAL}, #{otherToUsdExchangeRate,jdbcType=DECIMAL}, 
      #{campaignMaxBudget,jdbcType=DECIMAL}, #{isAutomatedCampaign,jdbcType=BIT}, #{autoRenew,jdbcType=BIT}, 
      #{scheduledAddBudgetAmount,jdbcType=DECIMAL}, #{totalImpressions,jdbcType=INTEGER}, 
      #{startTime,jdbcType=TIMESTAMP}, #{sales,jdbcType=INTEGER}, #{totalImpressionFeesCharged,jdbcType=DECIMAL}, 
      #{scheduledAddBudgetEnabled,jdbcType=BIT}, #{merchantId,jdbcType=VARCHAR}, #{impressionFeesBreakdown,jdbcType=VARCHAR}, 
      #{campaignState,jdbcType=VARCHAR}, #{canEdit,jdbcType=BIT}, #{discountRatio,jdbcType=DECIMAL}, 
      #{isSimpleBoost,jdbcType=BIT}, #{totalCampaignSpend,jdbcType=DECIMAL}, #{scheduledAddBudgetDays,jdbcType=VARCHAR}, 
      #{lastUpdatedTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{totalEnrollmentFeesCharged,jdbcType=DECIMAL}, 
      #{gmv,jdbcType=DECIMAL}, #{accountId,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, 
      #{gmtCreateTime,jdbcType=TIMESTAMP}, #{gmtModifyTime,jdbcType=TIMESTAMP}, #{recordTime,jdbcType=DATE}, 
      #{dailyCampaignMaxBudget,jdbcType=DECIMAL}, #{dailyTotalCampaignSpend,jdbcType=DECIMAL}, 
      #{dailyGmv,jdbcType=DECIMAL})
    on duplicate key update 
    id = #{id,jdbcType=INTEGER}, 
    campaign_id = #{campaignId,jdbcType=VARCHAR}, 
    campaign_name = #{campaignName,jdbcType=VARCHAR}, 
    other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL}, 
    other_to_usd_exchange_rate = #{otherToUsdExchangeRate,jdbcType=DECIMAL}, 
    campaign_max_budget = #{campaignMaxBudget,jdbcType=DECIMAL}, 
    is_automated_campaign = #{isAutomatedCampaign,jdbcType=BIT}, 
    auto_renew = #{autoRenew,jdbcType=BIT}, 
    scheduled_add_budget_amount = #{scheduledAddBudgetAmount,jdbcType=DECIMAL}, 
    total_impressions = #{totalImpressions,jdbcType=INTEGER}, 
    start_time = #{startTime,jdbcType=TIMESTAMP}, 
    sales = #{sales,jdbcType=INTEGER}, 
    total_impression_fees_charged = #{totalImpressionFeesCharged,jdbcType=DECIMAL}, 
    scheduled_add_budget_enabled = #{scheduledAddBudgetEnabled,jdbcType=BIT}, 
    merchant_id = #{merchantId,jdbcType=VARCHAR}, 
    impression_fees_breakdown = #{impressionFeesBreakdown,jdbcType=VARCHAR}, 
    campaign_state = #{campaignState,jdbcType=VARCHAR}, 
    can_edit = #{canEdit,jdbcType=BIT}, 
    discount_ratio = #{discountRatio,jdbcType=DECIMAL}, 
    is_simple_boost = #{isSimpleBoost,jdbcType=BIT}, 
    total_campaign_spend = #{totalCampaignSpend,jdbcType=DECIMAL}, 
    scheduled_add_budget_days = #{scheduledAddBudgetDays,jdbcType=VARCHAR}, 
    last_updated_time = #{lastUpdatedTime,jdbcType=TIMESTAMP}, 
    end_time = #{endTime,jdbcType=TIMESTAMP}, 
    total_enrollment_fees_charged = #{totalEnrollmentFeesCharged,jdbcType=DECIMAL}, 
    gmv = #{gmv,jdbcType=DECIMAL}, 
    account_id = #{accountId,jdbcType=INTEGER}, 
    company_id = #{companyId,jdbcType=INTEGER}, 
    gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP}, 
    gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP}, 
    record_time = #{recordTime,jdbcType=DATE}, 
    daily_campaign_max_budget = #{dailyCampaignMaxBudget,jdbcType=DECIMAL}, 
    daily_total_campaign_spend = #{dailyTotalCampaignSpend,jdbcType=DECIMAL}, 
    daily_gmv = #{dailyGmv,jdbcType=DECIMAL}
  </insert>
  <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceWishExample" 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_wish
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>



  <update id="updateDayByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_wish t0
    left join dc_base_finance_wish t1
    on t0.campaign_id = t1.campaign_id and t1.record_time=DATE_SUB(#{record.recordTime,jdbcType=DATE}, INTERVAL 1 DAY )
    <set>
      <if test="record.id != null">
        t0.id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.campaignId != null">
        t0.campaign_id = #{record.campaignId,jdbcType=VARCHAR},
      </if>
      <if test="record.campaignName != null">
        t0.campaign_name = #{record.campaignName,jdbcType=VARCHAR},
      </if>
      <if test="record.otherToCnyExchangeRate != null">
        t0.other_to_cny_exchange_rate = #{record.otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.otherToUsdExchangeRate != null">
        t0.other_to_usd_exchange_rate = #{record.otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="record.campaignMaxBudget != null">
        t0.campaign_max_budget = #{record.campaignMaxBudget,jdbcType=DECIMAL},
        t0.daily_campaign_max_budget = #{record.campaignMaxBudget} - ifnull(t1.campaign_max_budget, 0),
      </if>
      <if test="record.isAutomatedCampaign != null">
        t0.is_automated_campaign = #{record.isAutomatedCampaign,jdbcType=BIT},
      </if>
      <if test="record.autoRenew != null">
        t0.auto_renew = #{record.autoRenew,jdbcType=BIT},
      </if>
      <if test="record.scheduledAddBudgetAmount != null">
        t0.scheduled_add_budget_amount = #{record.scheduledAddBudgetAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.totalImpressions != null">
        t0.total_impressions = #{record.totalImpressions,jdbcType=INTEGER},
      </if>
      <if test="record.startTime != null">
        t0.start_time = #{record.startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.sales != null">
        t0.sales = #{record.sales,jdbcType=INTEGER},
      </if>
      <if test="record.totalImpressionFeesCharged != null">
        t0.total_impression_fees_charged = #{record.totalImpressionFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="record.scheduledAddBudgetEnabled != null">
        t0.scheduled_add_budget_enabled = #{record.scheduledAddBudgetEnabled,jdbcType=BIT},
      </if>
      <if test="record.merchantId != null">
        t0.merchant_id = #{record.merchantId,jdbcType=VARCHAR},
      </if>
      <if test="record.impressionFeesBreakdown != null">
        t0.impression_fees_breakdown = #{record.impressionFeesBreakdown,jdbcType=VARCHAR},
      </if>
      <if test="record.campaignState != null">
        t0.campaign_state = #{record.campaignState,jdbcType=VARCHAR},
      </if>
      <if test="record.canEdit != null">
        t0.can_edit = #{record.canEdit,jdbcType=BIT},
      </if>
      <if test="record.discountRatio != null">
        t0.discount_ratio = #{record.discountRatio,jdbcType=DECIMAL},
      </if>
      <if test="record.isSimpleBoost != null">
        t0.is_simple_boost = #{record.isSimpleBoost,jdbcType=BIT},
      </if>
      <if test="record.totalCampaignSpend != null">
        t0.total_campaign_spend = #{record.totalCampaignSpend,jdbcType=DECIMAL},
        t0.daily_total_campaign_spend = #{record.totalCampaignSpend,jdbcType=DECIMAL} - ifnull(t1.total_campaign_spend, 0),
      </if>
      <if test="record.scheduledAddBudgetDays != null">
        t0.scheduled_add_budget_days = #{record.scheduledAddBudgetDays,jdbcType=VARCHAR},
      </if>
      <if test="record.lastUpdatedTime != null">
        t0.last_updated_time = #{record.lastUpdatedTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.endTime != null">
        t0.end_time = #{record.endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.totalEnrollmentFeesCharged != null">
        t0.total_enrollment_fees_charged = #{record.totalEnrollmentFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="record.gmv != null">
        t0.gmv = #{record.gmv,jdbcType=DECIMAL},
        t0.daily_gmv = #{record.gmv,jdbcType=DECIMAL} - ifnull(t1.gmv, 0),
      </if>
      <if test="record.accountId != null">
        t0.account_id = #{record.accountId,jdbcType=INTEGER},
      </if>
      <if test="record.companyId != null">
        t0.company_id = #{record.companyId,jdbcType=INTEGER},
      </if>
      <if test="record.gmtCreateTime != null">
        t0.gmt_create_time = #{record.gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.gmtModifyTime != null">
        t0.gmt_modify_time = #{record.gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.recordTime != null">
        t0.record_time = #{record.recordTime,jdbcType=DATE},
      </if>
    </set>
    <if test="_parameter != null">
      where t0.campaign_id = #{record.campaignId} and t0.record_time = #{record.recordTime}
    </if>
  </update>


  <insert id="insertDaySelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWish">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_finance_wish
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="campaignId != null">
        campaign_id,
      </if>
      <if test="campaignName != null">
        campaign_name,
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate,
      </if>
      <if test="otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate,
      </if>
      <if test="campaignMaxBudget != null">
        campaign_max_budget,
      </if>
      <if test="isAutomatedCampaign != null">
        is_automated_campaign,
      </if>
      <if test="autoRenew != null">
        auto_renew,
      </if>
      <if test="scheduledAddBudgetAmount != null">
        scheduled_add_budget_amount,
      </if>
      <if test="totalImpressions != null">
        total_impressions,
      </if>
      <if test="startTime != null">
        start_time,
      </if>
      <if test="sales != null">
        sales,
      </if>
      <if test="totalImpressionFeesCharged != null">
        total_impression_fees_charged,
      </if>
      <if test="scheduledAddBudgetEnabled != null">
        scheduled_add_budget_enabled,
      </if>
      <if test="merchantId != null">
        merchant_id,
      </if>
      <if test="impressionFeesBreakdown != null">
        impression_fees_breakdown,
      </if>
      <if test="campaignState != null">
        campaign_state,
      </if>
      <if test="canEdit != null">
        can_edit,
      </if>
      <if test="discountRatio != null">
        discount_ratio,
      </if>
      <if test="isSimpleBoost != null">
        is_simple_boost,
      </if>
      <if test="totalCampaignSpend != null">
        total_campaign_spend,
      </if>
      <if test="scheduledAddBudgetDays != null">
        scheduled_add_budget_days,
      </if>
      <if test="lastUpdatedTime != null">
        last_updated_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="totalEnrollmentFeesCharged != null">
        total_enrollment_fees_charged,
      </if>
      <if test="gmv != null">
        gmv,
      </if>
      <if test="accountId != null">
        account_id,
      </if>
      <if test="companyId != null">
        company_id,
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time,
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time,
      </if>
      <if test="recordTime != null">
        record_time,
      </if>
        daily_campaign_max_budget,
        daily_total_campaign_spend,
        daily_gmv
    </trim>
     select
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="campaignId != null">
        #{campaignId,jdbcType=VARCHAR},
      </if>
      <if test="campaignName != null">
        #{campaignName,jdbcType=VARCHAR},
      </if>
      <if test="otherToCnyExchangeRate != null">
        #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="otherToUsdExchangeRate != null">
        #{otherToUsdExchangeRate,jdbcType=DECIMAL},
      </if>
      <if test="campaignMaxBudget != null">
        #{campaignMaxBudget,jdbcType=DECIMAL},
      </if>
      <if test="isAutomatedCampaign != null">
        #{isAutomatedCampaign,jdbcType=BIT},
      </if>
      <if test="autoRenew != null">
        #{autoRenew,jdbcType=BIT},
      </if>
      <if test="scheduledAddBudgetAmount != null">
        #{scheduledAddBudgetAmount,jdbcType=DECIMAL},
      </if>
      <if test="totalImpressions != null">
        #{totalImpressions,jdbcType=INTEGER},
      </if>
      <if test="startTime != null">
        #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sales != null">
        #{sales,jdbcType=INTEGER},
      </if>
      <if test="totalImpressionFeesCharged != null">
        #{totalImpressionFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="scheduledAddBudgetEnabled != null">
        #{scheduledAddBudgetEnabled,jdbcType=BIT},
      </if>
      <if test="merchantId != null">
        #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="impressionFeesBreakdown != null">
        #{impressionFeesBreakdown,jdbcType=VARCHAR},
      </if>
      <if test="campaignState != null">
        #{campaignState,jdbcType=VARCHAR},
      </if>
      <if test="canEdit != null">
        #{canEdit,jdbcType=BIT},
      </if>
      <if test="discountRatio != null">
        #{discountRatio,jdbcType=DECIMAL},
      </if>
      <if test="isSimpleBoost != null">
        #{isSimpleBoost,jdbcType=BIT},
      </if>
      <if test="totalCampaignSpend != null">
        #{totalCampaignSpend,jdbcType=DECIMAL},
      </if>
      <if test="scheduledAddBudgetDays != null">
        #{scheduledAddBudgetDays,jdbcType=VARCHAR},
      </if>
      <if test="lastUpdatedTime != null">
        #{lastUpdatedTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="totalEnrollmentFeesCharged != null">
        #{totalEnrollmentFeesCharged,jdbcType=DECIMAL},
      </if>
      <if test="gmv != null">
        #{gmv,jdbcType=DECIMAL},
      </if>
      <if test="accountId != null">
        #{accountId,jdbcType=INTEGER},
      </if>
      <if test="companyId != null">
        #{companyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recordTime != null">
        #{recordTime,jdbcType=DATE},
      </if>
        #{campaignMaxBudget,jdbcType=DECIMAL} - ifnull(campaign_max_budget, 0),
        #{totalCampaignSpend,jdbcType=DECIMAL} - ifnull(total_campaign_spend, 0),
        #{gmv,jdbcType=DECIMAL} - ifnull(gmv, 0)
    from dc_base_finance_wish where
    campaign_id = #{campaignId} and record_time = DATE_SUB(#{recordTime,jdbcType=DATE}, INTERVAL 1 DAY )
  </insert>


  <insert id="insertDaySelective0" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWish">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_finance_wish
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="campaignId != null">
        campaign_id,
      </if>
      <if test="campaignName != null">
        campaign_name,
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate,
      </if>
      <if test="otherToUsdExchangeRate != null">
        other_to_usd_exchange_rate,
      </if>
      <if test="campaignMaxBudget != null">
        campaign_max_budget,
        daily_campaign_max_budget,
      </if>
      <if test="isAutomatedCampaign != null">
        is_automated_campaign,
      </if>
      <if test="autoRenew != null">
        auto_renew,
      </if>
      <if test="scheduledAddBudgetAmount != null">
        scheduled_add_budget_amount,
      </if>
      <if test="totalImpressions != null">
        total_impressions,
      </if>
      <if test="startTime != null">
        start_time,
      </if>
      <if test="sales != null">
        sales,
      </if>
      <if test="totalImpressionFeesCharged != null">
        total_impression_fees_charged,
      </if>
      <if test="scheduledAddBudgetEnabled != null">
        scheduled_add_budget_enabled,
      </if>
      <if test="merchantId != null">
        merchant_id,
      </if>
      <if test="impressionFeesBreakdown != null">
        impression_fees_breakdown,
      </if>
      <if test="campaignState != null">
        campaign_state,
      </if>
      <if test="canEdit != null">
        can_edit,
      </if>
      <if test="discountRatio != null">
        discount_ratio,
      </if>
      <if test="isSimpleBoost != null">
        is_simple_boost,
      </if>
      <if test="totalCampaignSpend != null">
        total_campaign_spend,
        daily_total_campaign_spend,
      </if>
      <if test="scheduledAddBudgetDays != null">
        scheduled_add_budget_days,
      </if>
      <if test="lastUpdatedTime != null">
        last_updated_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="totalEnrollmentFeesCharged != null">
        total_enrollment_fees_charged,
      </if>
      <if test="gmv != null">
        gmv,
        daily_gmv,
      </if>
      <if test="accountId != null">
        account_id,
      </if>
      <if test="companyId != null">
        company_id,
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time,
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time,
      </if>
      <if test="recordTime != null">
        record_time
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
    <if test="id != null">
      #{id,jdbcType=INTEGER},
    </if>
    <if test="campaignId != null">
      #{campaignId,jdbcType=VARCHAR},
    </if>
    <if test="campaignName != null">
      #{campaignName,jdbcType=VARCHAR},
    </if>
    <if test="otherToCnyExchangeRate != null">
      #{otherToCnyExchangeRate,jdbcType=DECIMAL},
    </if>
    <if test="otherToUsdExchangeRate != null">
      #{otherToUsdExchangeRate,jdbcType=DECIMAL},
    </if>
    <if test="campaignMaxBudget != null">
      #{campaignMaxBudget,jdbcType=DECIMAL},
      #{campaignMaxBudget,jdbcType=DECIMAL},
    </if>
    <if test="isAutomatedCampaign != null">
      #{isAutomatedCampaign,jdbcType=BIT},
    </if>
    <if test="autoRenew != null">
      #{autoRenew,jdbcType=BIT},
    </if>
    <if test="scheduledAddBudgetAmount != null">
      #{scheduledAddBudgetAmount,jdbcType=DECIMAL},
    </if>
    <if test="totalImpressions != null">
      #{totalImpressions,jdbcType=INTEGER},
    </if>
    <if test="startTime != null">
      #{startTime,jdbcType=TIMESTAMP},
    </if>
    <if test="sales != null">
      #{sales,jdbcType=INTEGER},
    </if>
    <if test="totalImpressionFeesCharged != null">
      #{totalImpressionFeesCharged,jdbcType=DECIMAL},
    </if>
    <if test="scheduledAddBudgetEnabled != null">
      #{scheduledAddBudgetEnabled,jdbcType=BIT},
    </if>
    <if test="merchantId != null">
      #{merchantId,jdbcType=VARCHAR},
    </if>
    <if test="impressionFeesBreakdown != null">
      #{impressionFeesBreakdown,jdbcType=VARCHAR},
    </if>
    <if test="campaignState != null">
      #{campaignState,jdbcType=VARCHAR},
    </if>
    <if test="canEdit != null">
      #{canEdit,jdbcType=BIT},
    </if>
    <if test="discountRatio != null">
      #{discountRatio,jdbcType=DECIMAL},
    </if>
    <if test="isSimpleBoost != null">
      #{isSimpleBoost,jdbcType=BIT},
    </if>
    <if test="totalCampaignSpend != null">
      #{totalCampaignSpend,jdbcType=DECIMAL},
      #{totalCampaignSpend,jdbcType=DECIMAL},
    </if>
    <if test="scheduledAddBudgetDays != null">
      #{scheduledAddBudgetDays,jdbcType=VARCHAR},
    </if>
    <if test="lastUpdatedTime != null">
      #{lastUpdatedTime,jdbcType=TIMESTAMP},
    </if>
    <if test="endTime != null">
      #{endTime,jdbcType=TIMESTAMP},
    </if>
    <if test="totalEnrollmentFeesCharged != null">
      #{totalEnrollmentFeesCharged,jdbcType=DECIMAL},
    </if>
    <if test="gmv != null">
      #{gmv,jdbcType=DECIMAL},
      #{gmv,jdbcType=DECIMAL},
    </if>
    <if test="accountId != null">
      #{accountId,jdbcType=INTEGER},
    </if>
    <if test="companyId != null">
      #{companyId,jdbcType=INTEGER},
    </if>
    <if test="gmtCreateTime != null">
      #{gmtCreateTime,jdbcType=TIMESTAMP},
    </if>
    <if test="gmtModifyTime != null">
      #{gmtModifyTime,jdbcType=TIMESTAMP},
    </if>
    <if test="recordTime != null">
      #{recordTime,jdbcType=DATE}
    </if>
    </trim>
  </insert>

</mapper>