<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouAudienceReportDailyProvinceMapper">

    <insert id="replaceBatch">
        replace into ctop_kuaishou_audience_report_daily_province (
        account_id,
        plan_id ,
        unit_id ,
        placement_type,
        stat_date ,
        aclick ,
        bclick ,
        photo_click_cost,
        follow ,
        cancel_follow ,
        report ,
        block ,
        negative ,
        download_started ,
        download_completed ,
        activation ,
        submit ,
        photo_click ,
        photo_click_ratio,
        charge ,
        action_ratio ,
        impression_1k_cost,
        action_cost ,
        event_pay_first_day ,
        event_pay_purchase_amount_first_day,
        event_pay_first_day_roi,
        event_pay ,
        event_pay_purchase_amount ,
        event_pay_roi ,
        event_register ,
        event_register_cost ,
        event_register_ratio ,
        event_jin_jian_app ,
        event_jin_jian_app_cost ,
        event_credit_grant_app ,
        event_credit_grant_app_cost,
        event_order_paid ,
        event_order_paid_purchase_amount,
        event_jin_jian_landing_page ,
        event_jin_jian_landing_page_cost ,
        event_credit_grant_landing_page ,
        event_credit_grant_landing_page_cost,
        event_credit_grant_landing_ratio ,
        event_next_day_stay_cost ,
        event_next_day_stay_ratio ,
        form_action_ratio ,
        event_order_paid_cost ,
        event_next_day_stay ,
        form_cost ,
        form_count ,
        play_3s_ratio ,
        stat_hour ,
        click_1k_cost ,
        event_valid_clues ,
        event_valid_clues_cost,
        ad_product_cnt ,
        event_goods_view ,
        merchant_reco_fans ,
        event_order_amount_roi ,
        event_new_user_pay ,
        event_new_user_pay_cost ,
        event_new_user_pay_ratio ,
        event_button_click ,
        event_button_click_cost ,
        event_button_click_ratio ,
        play_5s_ratio ,
        play_end_ratio ,
        event_order_paid_roi,
        event_new_user_jinjian_app ,
        event_new_user_jinjian_app_cost,
        event_new_user_jinjian_app_roi ,
        event_new_user_credit_grant_app ,
        event_new_user_credit_grant_app_cost,
        event_new_user_credit_grant_app_roi ,
        event_new_user_jinjian_page ,
        event_new_user_jinjian_page_cost ,
        event_new_user_jinjian_page_roi ,
        event_new_user_credit_grant_page ,
        event_new_user_credit_grant_page_cost ,
        event_new_user_credit_grant_page_roi ,
        event_appoint_form ,
        event_appoint_form_cost,
        event_appoint_form_ratio,
        event_appoint_jump_click ,
        event_appoint_jump_click_cost,
        event_appoint_jump_click_ratio,
        union_event_pay_purchase_amount_7d ,
        province ,
        event_app_invoked ,
        union_event_pay_purchase_amount_7d_roi,
        event_add_shopping_cart_cost ,
        gender ,
        city ,
        event_ad_watch_times_ratio ,
        shares ,
        business_interest_tags ,
        event_watch_app_ad ,
        event_multi_conversion_cost,
        merchant_reco_fans_cost ,
        ad_scene ,
        event_ad_watch_times_cost ,
        event_add_shopping_cart ,
        age_segment ,
        photo_like ,
        event_add_wechat ,
        event_add_wechat_cost,
        event_add_wechat_ratio,
        event_app_invoked_cost ,
        event_multi_conversion ,
        event_dsp_gift_form ,
        event_app_invoked_ratio ,
        photo_show ,
        event_multi_conversion_ratio,
        client ,
        event_goods_view_cost ,
        event_credit_grant_app_ratio,
        event_ad_watch_times ,
        comments
        )
        values
        <foreach collection="data" item="da" separator=",">
            (
            #{da.accountId},
            #{da.planId},
            #{da.unitId},
            #{da.placementType},
            #{da.statDate},
            #{da.aclick},
            #{da.bclick},
            #{da.photoClickCost},
            #{da.follow},
            #{da.cancelFollow},
            #{da.report},
            #{da.block},
            #{da.negative},
            #{da.downloadStarted},
            #{da.downloadCompleted},
            #{da.activation},
            #{da.submit},
            #{da.photoClick},
            #{da.photoClickRatio},
            #{da.charge},
            #{da.actionRatio},
            #{da.impression_1kCost},
            #{da.actionCost},
            #{da.eventPayFirstDay},
            #{da.eventPayPurchaseAmountFirstDay},
            #{da.eventPayFirstDayRoi},
            #{da.eventPay},
            #{da.eventPayPurchaseAmount},
            #{da.eventPayRoi},
            #{da.eventRegister},
            #{da.eventRegisterCost},
            #{da.eventRegisterRatio},
            #{da.eventJinJianApp},
            #{da.eventJinJianAppCost},
            #{da.eventCreditGrantApp},
            #{da.eventCreditGrantAppCost},
            #{da.eventOrderPaid},
            #{da.eventOrderPaidPurchaseAmount},
            #{da.eventJinJianLandingPage},
            #{da.eventJinJianLandingPageCost},
            #{da.eventCreditGrantLandingPage},
            #{da.eventCreditGrantLandingPageCost},
            #{da.eventCreditGrantLandingRatio},
            #{da.eventNextDayStayCost},
            #{da.eventNextDayStayRatio},
            #{da.formActionRatio},
            #{da.eventOrderPaidCost},
            #{da.eventNextDayStay},
            #{da.formCost},
            #{da.formCount},
            #{da.play_3sRatio},
            #{da.statHour},
            #{da.click_1kCost},
            #{da.eventValidClues},
            #{da.eventValidCluesCost},
            #{da.adProductCnt},
            #{da.eventGoodsView},
            #{da.merchantRecoFans},
            #{da.eventOrderAmountRoi},
            #{da.eventNewUserPay},
            #{da.eventNewUserPayCost},
            #{da.eventNewUserPayRatio},
            #{da.eventButtonClick},
            #{da.eventButtonClickCost},
            #{da.eventButtonClickRatio},
            #{da.play_5sRatio},
            #{da.playEndRatio},
            #{da.eventOrderPaidRoi},
            #{da.eventNewUserJinjianApp},
            #{da.eventNewUserJinjianAppCost},
            #{da.eventNewUserJinjianAppRoi},
            #{da.eventNewUserCreditGrantApp},
            #{da.eventNewUserCreditGrantAppCost},
            #{da.eventNewUserCreditGrantAppRoi},
            #{da.eventNewUserJinjianPage},
            #{da.eventNewUserJinjianPageCost},
            #{da.eventNewUserJinjianPageRoi},
            #{da.eventNewUserCreditGrantPage},
            #{da.eventNewUserCreditGrantPageCost},
            #{da.eventNewUserCreditGrantPageRoi},
            #{da.eventAppointForm},
            #{da.eventAppointFormCost},
            #{da.eventAppointFormRatio},
            #{da.eventAppointJumpClick},
            #{da.eventAppointJumpClickCost},
            #{da.eventAppointJumpClickRatio},
            #{da.unionEventPayPurchaseAmount_7d},
            #{da.province},
            #{da.eventAppInvoked},
            #{da.unionEventPayPurchaseAmount_7dRoi},
            #{da.eventAddShoppingCartCost},
            #{da.gender},
            #{da.city},
            #{da.eventAdWatchTimesRatio},
            #{da.shares},
            #{da.businessInterestTags},
            #{da.eventWatchAppAd},
            #{da.eventMultiConversionCost},
            #{da.merchantRecoFansCost},
            #{da.adScene},
            #{da.eventAdWatchTimesCost},
            #{da.eventAddShoppingCart},
            #{da.ageSegment},
            #{da.photoLike},
            #{da.eventAddWechat},
            #{da.eventAddWechatCost},
            #{da.eventAddWechatRatio},
            #{da.eventAppInvokedCost},
            #{da.eventMultiConversion},
            #{da.eventDspGiftForm},
            #{da.eventAppInvokedRatio},
            #{da.photoShow},
            #{da.eventMultiConversionRatio},
            #{da.client},
            #{da.eventGoodsViewCost},
            #{da.eventCreditGrantAppRatio},
            #{da.eventAdWatchTimes},
            #{da.comments}
            )
        </foreach>
    </insert>


    <insert id="replaceBatchNew">
        replace into ctop_kuaishou_audience_report_daily_province (
        account_id,
        plan_id ,
        unit_id ,
        placement_type,
        stat_date ,
        aclick ,
        bclick ,
        photo_click_cost,
        follow ,
        cancel_follow ,
        report ,
        block ,
        negative ,
        download_started ,
        download_completed ,
        activation ,
        submit ,
        photo_click ,
        photo_click_ratio,
        charge ,
        action_ratio ,
        impression_1k_cost,
        action_cost ,
        event_pay_first_day ,
        event_pay_purchase_amount_first_day,
        event_pay_first_day_roi,
        event_pay ,
        event_pay_purchase_amount ,
        event_pay_roi ,
        event_register ,
        event_register_cost ,
        event_register_ratio ,
        event_jin_jian_app ,
        event_jin_jian_app_cost ,
        event_credit_grant_app ,
        event_credit_grant_app_cost,
        event_order_paid ,
        event_order_paid_purchase_amount,
        event_jin_jian_landing_page ,
        event_jin_jian_landing_page_cost ,
        event_credit_grant_landing_page ,
        event_credit_grant_landing_page_cost,
        event_credit_grant_landing_ratio ,
        event_next_day_stay_cost ,
        event_next_day_stay_ratio ,
        form_action_ratio ,
        event_order_paid_cost ,
        event_next_day_stay ,
        form_cost ,
        form_count ,
        play_3s_ratio ,
        stat_hour ,
        click_1k_cost ,
        event_valid_clues ,
        event_valid_clues_cost,
        ad_product_cnt ,
        event_goods_view ,
        merchant_reco_fans ,
        event_order_amount_roi ,
        event_new_user_pay ,
        event_new_user_pay_cost ,
        event_new_user_pay_ratio ,
        event_button_click ,
        event_button_click_cost ,
        event_button_click_ratio ,
        play_5s_ratio ,
        play_end_ratio ,
        event_order_paid_roi,
        event_new_user_jinjian_app ,
        event_new_user_jinjian_app_cost,
        event_new_user_jinjian_app_roi ,
        event_new_user_credit_grant_app ,
        event_new_user_credit_grant_app_cost,
        event_new_user_credit_grant_app_roi ,
        event_new_user_jinjian_page ,
        event_new_user_jinjian_page_cost ,
        event_new_user_jinjian_page_roi ,
        event_new_user_credit_grant_page ,
        event_new_user_credit_grant_page_cost ,
        event_new_user_credit_grant_page_roi ,
        event_appoint_form ,
        event_appoint_form_cost,
        event_appoint_form_ratio,
        event_appoint_jump_click ,
        event_appoint_jump_click_cost,
        event_appoint_jump_click_ratio,
        union_event_pay_purchase_amount_7d ,
        province ,
        event_app_invoked ,
        union_event_pay_purchase_amount_7d_roi,
        event_add_shopping_cart_cost ,
        gender ,
        city ,
        event_ad_watch_times_ratio ,
        shares ,
        business_interest_tags ,
        event_watch_app_ad ,
        event_multi_conversion_cost,
        merchant_reco_fans_cost ,
        ad_scene ,
        event_ad_watch_times_cost ,
        event_add_shopping_cart ,
        age_segment ,
        photo_like ,
        event_add_wechat ,
        event_add_wechat_cost,
        event_add_wechat_ratio,
        event_app_invoked_cost ,
        event_multi_conversion ,
        event_dsp_gift_form ,
        event_app_invoked_ratio ,
        photo_show ,
        event_multi_conversion_ratio,
        client ,
        event_goods_view_cost ,
        event_credit_grant_app_ratio,
        event_ad_watch_times ,
        comments,
        signature,
        project_id
        )
        values
        <foreach collection="data" item="da" separator=",">
            (
            #{da.accountId},
            #{da.planId},
            #{da.unitId},
            #{da.placementType},
            #{da.statDate},
            #{da.aclick},
            #{da.bclick},
            #{da.photoClickCost},
            #{da.follow},
            #{da.cancelFollow},
            #{da.report},
            #{da.block},
            #{da.negative},
            #{da.downloadStarted},
            #{da.downloadCompleted},
            #{da.activation},
            #{da.submit},
            #{da.photoClick},
            #{da.photoClickRatio},
            #{da.charge},
            #{da.actionRatio},
            #{da.impression_1kCost},
            #{da.actionCost},
            #{da.eventPayFirstDay},
            #{da.eventPayPurchaseAmountFirstDay},
            #{da.eventPayFirstDayRoi},
            #{da.eventPay},
            #{da.eventPayPurchaseAmount},
            #{da.eventPayRoi},
            #{da.eventRegister},
            #{da.eventRegisterCost},
            #{da.eventRegisterRatio},
            #{da.eventJinJianApp},
            #{da.eventJinJianAppCost},
            #{da.eventCreditGrantApp},
            #{da.eventCreditGrantAppCost},
            #{da.eventOrderPaid},
            #{da.eventOrderPaidPurchaseAmount},
            #{da.eventJinJianLandingPage},
            #{da.eventJinJianLandingPageCost},
            #{da.eventCreditGrantLandingPage},
            #{da.eventCreditGrantLandingPageCost},
            #{da.eventCreditGrantLandingRatio},
            #{da.eventNextDayStayCost},
            #{da.eventNextDayStayRatio},
            #{da.formActionRatio},
            #{da.eventOrderPaidCost},
            #{da.eventNextDayStay},
            #{da.formCost},
            #{da.formCount},
            #{da.play_3sRatio},
            #{da.statHour},
            #{da.click_1kCost},
            #{da.eventValidClues},
            #{da.eventValidCluesCost},
            #{da.adProductCnt},
            #{da.eventGoodsView},
            #{da.merchantRecoFans},
            #{da.eventOrderAmountRoi},
            #{da.eventNewUserPay},
            #{da.eventNewUserPayCost},
            #{da.eventNewUserPayRatio},
            #{da.eventButtonClick},
            #{da.eventButtonClickCost},
            #{da.eventButtonClickRatio},
            #{da.play_5sRatio},
            #{da.playEndRatio},
            #{da.eventOrderPaidRoi},
            #{da.eventNewUserJinjianApp},
            #{da.eventNewUserJinjianAppCost},
            #{da.eventNewUserJinjianAppRoi},
            #{da.eventNewUserCreditGrantApp},
            #{da.eventNewUserCreditGrantAppCost},
            #{da.eventNewUserCreditGrantAppRoi},
            #{da.eventNewUserJinjianPage},
            #{da.eventNewUserJinjianPageCost},
            #{da.eventNewUserJinjianPageRoi},
            #{da.eventNewUserCreditGrantPage},
            #{da.eventNewUserCreditGrantPageCost},
            #{da.eventNewUserCreditGrantPageRoi},
            #{da.eventAppointForm},
            #{da.eventAppointFormCost},
            #{da.eventAppointFormRatio},
            #{da.eventAppointJumpClick},
            #{da.eventAppointJumpClickCost},
            #{da.eventAppointJumpClickRatio},
            #{da.unionEventPayPurchaseAmount_7d},
            #{da.province},
            #{da.eventAppInvoked},
            #{da.unionEventPayPurchaseAmount_7dRoi},
            #{da.eventAddShoppingCartCost},
            #{da.gender},
            #{da.city},
            #{da.eventAdWatchTimesRatio},
            #{da.shares},
            #{da.businessInterestTags},
            #{da.eventWatchAppAd},
            #{da.eventMultiConversionCost},
            #{da.merchantRecoFansCost},
            #{da.adScene},
            #{da.eventAdWatchTimesCost},
            #{da.eventAddShoppingCart},
            #{da.ageSegment},
            #{da.photoLike},
            #{da.eventAddWechat},
            #{da.eventAddWechatCost},
            #{da.eventAddWechatRatio},
            #{da.eventAppInvokedCost},
            #{da.eventMultiConversion},
            #{da.eventDspGiftForm},
            #{da.eventAppInvokedRatio},
            #{da.photoShow},
            #{da.eventMultiConversionRatio},
            #{da.client},
            #{da.eventGoodsViewCost},
            #{da.eventCreditGrantAppRatio},
            #{da.eventAdWatchTimes},
            #{da.comments},
            #{da.signature},
            #{da.projectId}
            )
        </foreach>
    </insert>

</mapper>