<?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.moka.gdtauto.mapper.RepDailyAdgroupReportMapper">

    <insert id="batchUpsert" parameterType="java.util.List">
        INSERT INTO rep_daily_adgroup_report (
            conf_id, group_id, group_name, account_id, adgroup_id, adgroup_name, date,
            view_count, view_user_count, avg_view_per_user,
            valid_click_count, click_user_count, cpc, ctr,
            valuable_click_count, valuable_click_cost, valuable_click_rate,
            cost, acquisition_cost, thousand_display_price,
            conversions_count, conversions_rate, conversions_cost, scan_follow_user_cost,
            deep_conversions_count, deep_conversions_rate, deep_conversions_cost,
            conversions_by_display_count, conversions_by_display_rate, conversions_by_display_cost,
            conversions_by_click_count, conversions_by_click_rate, conversions_by_click_cost,
            preview_conversions_count, preview_deep_conversions_count,
            video_outer_play_count, video_outer_play_user_count, avg_user_play_count,
            video_outer_play_time_count, video_outer_play_time_avg_rate,
            video_outer_play_rate, video_outer_play_cost,
            video_outer_play10_count, video_outer_play25_count, video_outer_play50_count,
            video_outer_play75_count, video_outer_play90_count, video_outer_play95_count,
            video_outer_play100_count, video_outer_play3s_count, video_outer_play3s_rate,
            video_outer_play5s_count, video_outer_play7s_count,
            read_count, read_cost, comment_count, comment_cost,
            praise_count, praise_cost, forward_count, forward_cost, no_interest_count,
            live_stream_crt_click_cnt, click_image_count, click_head_count,
            click_detail_count, click_poi_count, zone_header_click_count,
            basic_info_client_count, account_info_click_count,
            clk_account_living_status_pv, clk_accountinfo_weapp_pv,
            clk_accountinfo_finder_pv, clk_accountinfo_biz_pv,
            clk_account_info_producttab_pv, clk_account_info_productdetail_pv,
            activity_info_click_count,
            overall_leads_purchase_count, effective_leads_count, effective_cost,
            effect_leads_purchase_count, effect_leads_purchase_cost,
            platform_page_view_count, platform_page_view_rate,
            lan_button_click_count, lan_jump_button_clickers, lan_button_click_cost,
            lan_jump_button_ctr, lan_jump_button_click_cost,
            key_page_view_count, key_page_view_by_display_count, key_page_view_by_click_count,
            key_page_uv, key_page_view_cost, key_page_view_rate,
            landing_commodity_detail_exp_pv,
            app_commodity_page_view_by_display_count, app_commodity_page_view_by_click_count,
            view_commodity_page_uv, web_commodity_page_view_rate, web_commodity_page_view_cost,
            own_page_navigation_count, own_page_navi_cost,
            platform_page_navigation_count, platform_page_navigation_cost,
            platform_shop_navigation_count, platform_shop_navigation_cost,
            active_page_views, active_page_viewers,
            active_page_interaction_amount, active_page_interaction_users,
            guide_to_follow_page_views, guide_to_follow_page_viewers,
            guide_to_follow_page_interaction_amount, guide_to_follow_page_interaction_users,
            platform_key_page_view_user_count,
            page_consult_count, consult_uv_count, page_consult_rate, page_consult_cost,
            consult_leave_info_users, consult_leave_info_cost,
            potential_consult_count, effective_consult_count, tool_consult_count,
            page_reservation_count, page_reservation_by_display_count, page_reservation_by_click_count,
            reservation_uv, reservation_amount, page_reservation_cost, page_reservation_cost_with_people,
            page_reservation_rate, page_reservation_roi,
            biz_reservation_uv, biz_reservation_follow_rate,
            external_form_reservation_count, potential_reserve_count,
            reservation_check_uv, reservation_check_uv_cost, reservation_check_uv_rate,
            effective_reserve_count, valid_leads_uv, try_out_intention_uv, ineffective_leads_uv,
            coupon_get_pv, coupon_get_cost, coupon_get_rate,
            platform_coupon_click_count, purchase_amount_with_coupon,
            coupon_purchase_rate, purchase_amount_with_coupon_cost, coupon_usage_number,
            page_phone_call_direct_count, page_phone_call_direct_rate, page_phone_call_direct_cost,
            potential_phone_count, potential_customer_phone_uv,
            effective_phone_count, valid_phone_uv,
            income_val_1, income_roi_1, income_val_3, income_roi_3,
            income_val_7, income_roi_7, income_val_14, income_roi_14,
            income_val_24h, income_roi_1_24h
        ) VALUES
        <foreach collection="list" item="report" separator=",">
            (
                #{report.confId}, #{report.groupId}, #{report.groupName}, #{report.accountId}, #{report.adgroupId}, #{report.adgroupName}, #{report.date},
                #{report.viewCount}, #{report.viewUserCount}, #{report.avgViewPerUser},
                #{report.validClickCount}, #{report.clickUserCount}, #{report.cpc}, #{report.ctr},
                #{report.valuableClickCount}, #{report.valuableClickCost}, #{report.valuableClickRate},
                #{report.cost}, #{report.acquisitionCost}, #{report.thousandDisplayPrice},
                #{report.conversionsCount}, #{report.conversionsRate}, #{report.conversionsCost}, #{report.scanFollowUserCost},
                #{report.deepConversionsCount}, #{report.deepConversionsRate}, #{report.deepConversionsCost},
                #{report.conversionsByDisplayCount}, #{report.conversionsByDisplayRate}, #{report.conversionsByDisplayCost},
                #{report.conversionsByClickCount}, #{report.conversionsByClickRate}, #{report.conversionsByClickCost},
                #{report.previewConversionsCount}, #{report.previewDeepConversionsCount},
                #{report.videoOuterPlayCount}, #{report.videoOuterPlayUserCount}, #{report.avgUserPlayCount},
                #{report.videoOuterPlayTimeCount}, #{report.videoOuterPlayTimeAvgRate},
                #{report.videoOuterPlayRate}, #{report.videoOuterPlayCost},
                #{report.videoOuterPlay10Count}, #{report.videoOuterPlay25Count}, #{report.videoOuterPlay50Count},
                #{report.videoOuterPlay75Count}, #{report.videoOuterPlay90Count}, #{report.videoOuterPlay95Count},
                #{report.videoOuterPlay100Count}, #{report.videoOuterPlay3sCount}, #{report.videoOuterPlay3sRate},
                #{report.videoOuterPlay5sCount}, #{report.videoOuterPlay7sCount},
                #{report.readCount}, #{report.readCost}, #{report.commentCount}, #{report.commentCost},
                #{report.praiseCount}, #{report.praiseCost}, #{report.forwardCount}, #{report.forwardCost}, #{report.noInterestCount},
                #{report.liveStreamCrtClickCnt}, #{report.clickImageCount}, #{report.clickHeadCount},
                #{report.clickDetailCount}, #{report.clickPoiCount}, #{report.zoneHeaderClickCount},
                #{report.basicInfoClientCount}, #{report.accountInfoClickCount},
                #{report.clkAccountLivingStatusPv}, #{report.clkAccountinfoWeappPv},
                #{report.clkAccountinfoFinderPv}, #{report.clkAccountinfoBizPv},
                #{report.clkAccountInfoProducttabPv}, #{report.clkAccountInfoProductdetailPv},
                #{report.activityInfoClickCount},
                #{report.overallLeadsPurchaseCount}, #{report.effectiveLeadsCount}, #{report.effectiveCost},
                #{report.effectLeadsPurchaseCount}, #{report.effectLeadsPurchaseCost},
                #{report.platformPageViewCount}, #{report.platformPageViewRate},
                #{report.lanButtonClickCount}, #{report.lanJumpButtonClickers}, #{report.lanButtonClickCost},
                #{report.lanJumpButtonCtr}, #{report.lanJumpButtonClickCost},
                #{report.keyPageViewCount}, #{report.keyPageViewByDisplayCount}, #{report.keyPageViewByClickCount},
                #{report.keyPageUv}, #{report.keyPageViewCost}, #{report.keyPageViewRate},
                #{report.landingCommodityDetailExpPv},
                #{report.appCommodityPageViewByDisplayCount}, #{report.appCommodityPageViewByClickCount},
                #{report.viewCommodityPageUv}, #{report.webCommodityPageViewRate}, #{report.webCommodityPageViewCost},
                #{report.ownPageNavigationCount}, #{report.ownPageNaviCost},
                #{report.platformPageNavigationCount}, #{report.platformPageNavigationCost},
                #{report.platformShopNavigationCount}, #{report.platformShopNavigationCost},
                #{report.activePageViews}, #{report.activePageViewers},
                #{report.activePageInteractionAmount}, #{report.activePageInteractionUsers},
                #{report.guideToFollowPageViews}, #{report.guideToFollowPageViewers},
                #{report.guideToFollowPageInteractionAmount}, #{report.guideToFollowPageInteractionUsers},
                #{report.platformKeyPageViewUserCount},
                #{report.pageConsultCount}, #{report.consultUvCount}, #{report.pageConsultRate}, #{report.pageConsultCost},
                #{report.consultLeaveInfoUsers}, #{report.consultLeaveInfoCost},
                #{report.potentialConsultCount}, #{report.effectiveConsultCount}, #{report.toolConsultCount},
                #{report.pageReservationCount}, #{report.pageReservationByDisplayCount}, #{report.pageReservationByClickCount},
                #{report.reservationUv}, #{report.reservationAmount}, #{report.pageReservationCost}, #{report.pageReservationCostWithPeople},
                #{report.pageReservationRate}, #{report.pageReservationRoi},
                #{report.bizReservationUv}, #{report.bizReservationFollowRate},
                #{report.externalFormReservationCount}, #{report.potentialReserveCount},
                #{report.reservationCheckUv}, #{report.reservationCheckUvCost}, #{report.reservationCheckUvRate},
                #{report.effectiveReserveCount}, #{report.validLeadsUv}, #{report.tryOutIntentionUv}, #{report.ineffectiveLeadsUv},
                #{report.couponGetPv}, #{report.couponGetCost}, #{report.couponGetRate},
                #{report.platformCouponClickCount}, #{report.purchaseAmountWithCoupon},
                #{report.couponPurchaseRate}, #{report.purchaseAmountWithCouponCost}, #{report.couponUsageNumber},
                #{report.pagePhoneCallDirectCount}, #{report.pagePhoneCallDirectRate}, #{report.pagePhoneCallDirectCost},
                #{report.potentialPhoneCount}, #{report.potentialCustomerPhoneUv},
                #{report.effectivePhoneCount}, #{report.validPhoneUv},
                #{report.incomeVal1}, #{report.incomeRoi1}, #{report.incomeVal3}, #{report.incomeRoi3},
                #{report.incomeVal7}, #{report.incomeRoi7}, #{report.incomeVal14}, #{report.incomeRoi14},
                #{report.incomeVal24h}, #{report.incomeRoi124h}
            )
        </foreach>
        ON DUPLICATE KEY UPDATE
            view_count = VALUES(view_count), view_user_count = VALUES(view_user_count), avg_view_per_user = VALUES(avg_view_per_user),
            valid_click_count = VALUES(valid_click_count), click_user_count = VALUES(click_user_count), cpc = VALUES(cpc), ctr = VALUES(ctr),
            valuable_click_count = VALUES(valuable_click_count), valuable_click_cost = VALUES(valuable_click_cost), valuable_click_rate = VALUES(valuable_click_rate),
            cost = VALUES(cost), acquisition_cost = VALUES(acquisition_cost), thousand_display_price = VALUES(thousand_display_price),
            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost), scan_follow_user_cost = VALUES(scan_follow_user_cost),
            deep_conversions_count = VALUES(deep_conversions_count), deep_conversions_rate = VALUES(deep_conversions_rate), deep_conversions_cost = VALUES(deep_conversions_cost),
            conversions_by_display_count = VALUES(conversions_by_display_count), conversions_by_display_rate = VALUES(conversions_by_display_rate), conversions_by_display_cost = VALUES(conversions_by_display_cost),
            conversions_by_click_count = VALUES(conversions_by_click_count), conversions_by_click_rate = VALUES(conversions_by_click_rate), conversions_by_click_cost = VALUES(conversions_by_click_cost),
            preview_conversions_count = VALUES(preview_conversions_count), preview_deep_conversions_count = VALUES(preview_deep_conversions_count),
            video_outer_play_count = VALUES(video_outer_play_count), video_outer_play_user_count = VALUES(video_outer_play_user_count), avg_user_play_count = VALUES(avg_user_play_count),
            video_outer_play_time_count = VALUES(video_outer_play_time_count), video_outer_play_time_avg_rate = VALUES(video_outer_play_time_avg_rate),
            video_outer_play_rate = VALUES(video_outer_play_rate), video_outer_play_cost = VALUES(video_outer_play_cost),
            video_outer_play10_count = VALUES(video_outer_play10_count), video_outer_play25_count = VALUES(video_outer_play25_count), video_outer_play50_count = VALUES(video_outer_play50_count),
            video_outer_play75_count = VALUES(video_outer_play75_count), video_outer_play90_count = VALUES(video_outer_play90_count), video_outer_play95_count = VALUES(video_outer_play95_count),
            video_outer_play100_count = VALUES(video_outer_play100_count), video_outer_play3s_count = VALUES(video_outer_play3s_count), video_outer_play3s_rate = VALUES(video_outer_play3s_rate),
            video_outer_play5s_count = VALUES(video_outer_play5s_count), video_outer_play7s_count = VALUES(video_outer_play7s_count),
            read_count = VALUES(read_count), read_cost = VALUES(read_cost), comment_count = VALUES(comment_count), comment_cost = VALUES(comment_cost),
            praise_count = VALUES(praise_count), praise_cost = VALUES(praise_cost), forward_count = VALUES(forward_count), forward_cost = VALUES(forward_cost), no_interest_count = VALUES(no_interest_count),
            live_stream_crt_click_cnt = VALUES(live_stream_crt_click_cnt), click_image_count = VALUES(click_image_count), click_head_count = VALUES(click_head_count),
            click_detail_count = VALUES(click_detail_count), click_poi_count = VALUES(click_poi_count), zone_header_click_count = VALUES(zone_header_click_count),
            basic_info_client_count = VALUES(basic_info_client_count), account_info_click_count = VALUES(account_info_click_count),
            clk_account_living_status_pv = VALUES(clk_account_living_status_pv), clk_accountinfo_weapp_pv = VALUES(clk_accountinfo_weapp_pv),
            clk_accountinfo_finder_pv = VALUES(clk_accountinfo_finder_pv), clk_accountinfo_biz_pv = VALUES(clk_accountinfo_biz_pv),
            clk_account_info_producttab_pv = VALUES(clk_account_info_producttab_pv), clk_account_info_productdetail_pv = VALUES(clk_account_info_productdetail_pv),
            activity_info_click_count = VALUES(activity_info_click_count),
            overall_leads_purchase_count = VALUES(overall_leads_purchase_count), effective_leads_count = VALUES(effective_leads_count), effective_cost = VALUES(effective_cost),
            effect_leads_purchase_count = VALUES(effect_leads_purchase_count), effect_leads_purchase_cost = VALUES(effect_leads_purchase_cost),
            platform_page_view_count = VALUES(platform_page_view_count), platform_page_view_rate = VALUES(platform_page_view_rate),
            lan_button_click_count = VALUES(lan_button_click_count), lan_jump_button_clickers = VALUES(lan_jump_button_clickers), lan_button_click_cost = VALUES(lan_button_click_cost),
            lan_jump_button_ctr = VALUES(lan_jump_button_ctr), lan_jump_button_click_cost = VALUES(lan_jump_button_click_cost),
            key_page_view_count = VALUES(key_page_view_count), key_page_view_by_display_count = VALUES(key_page_view_by_display_count), key_page_view_by_click_count = VALUES(key_page_view_by_click_count),
            key_page_uv = VALUES(key_page_uv), key_page_view_cost = VALUES(key_page_view_cost), key_page_view_rate = VALUES(key_page_view_rate),
            landing_commodity_detail_exp_pv = VALUES(landing_commodity_detail_exp_pv),
            app_commodity_page_view_by_display_count = VALUES(app_commodity_page_view_by_display_count), app_commodity_page_view_by_click_count = VALUES(app_commodity_page_view_by_click_count),
            view_commodity_page_uv = VALUES(view_commodity_page_uv), web_commodity_page_view_rate = VALUES(web_commodity_page_view_rate), web_commodity_page_view_cost = VALUES(web_commodity_page_view_cost),
            own_page_navigation_count = VALUES(own_page_navigation_count), own_page_navi_cost = VALUES(own_page_navi_cost),
            platform_page_navigation_count = VALUES(platform_page_navigation_count), platform_page_navigation_cost = VALUES(platform_page_navigation_cost),
            platform_shop_navigation_count = VALUES(platform_shop_navigation_count), platform_shop_navigation_cost = VALUES(platform_shop_navigation_cost),
            active_page_views = VALUES(active_page_views), active_page_viewers = VALUES(active_page_viewers),
            active_page_interaction_amount = VALUES(active_page_interaction_amount), active_page_interaction_users = VALUES(active_page_interaction_users),
            guide_to_follow_page_views = VALUES(guide_to_follow_page_views), guide_to_follow_page_viewers = VALUES(guide_to_follow_page_viewers),
            guide_to_follow_page_interaction_amount = VALUES(guide_to_follow_page_interaction_amount), guide_to_follow_page_interaction_users = VALUES(guide_to_follow_page_interaction_users),
            platform_key_page_view_user_count = VALUES(platform_key_page_view_user_count),
            page_consult_count = VALUES(page_consult_count), consult_uv_count = VALUES(consult_uv_count), page_consult_rate = VALUES(page_consult_rate), page_consult_cost = VALUES(page_consult_cost),
            consult_leave_info_users = VALUES(consult_leave_info_users), consult_leave_info_cost = VALUES(consult_leave_info_cost),
            potential_consult_count = VALUES(potential_consult_count), effective_consult_count = VALUES(effective_consult_count), tool_consult_count = VALUES(tool_consult_count),
            page_reservation_count = VALUES(page_reservation_count), page_reservation_by_display_count = VALUES(page_reservation_by_display_count), page_reservation_by_click_count = VALUES(page_reservation_by_click_count),
            reservation_uv = VALUES(reservation_uv), reservation_amount = VALUES(reservation_amount), page_reservation_cost = VALUES(page_reservation_cost), page_reservation_cost_with_people = VALUES(page_reservation_cost_with_people),
            page_reservation_rate = VALUES(page_reservation_rate), page_reservation_roi = VALUES(page_reservation_roi),
            biz_reservation_uv = VALUES(biz_reservation_uv), biz_reservation_follow_rate = VALUES(biz_reservation_follow_rate),
            external_form_reservation_count = VALUES(external_form_reservation_count), potential_reserve_count = VALUES(potential_reserve_count),
            reservation_check_uv = VALUES(reservation_check_uv), reservation_check_uv_cost = VALUES(reservation_check_uv_cost), reservation_check_uv_rate = VALUES(reservation_check_uv_rate),
            effective_reserve_count = VALUES(effective_reserve_count), valid_leads_uv = VALUES(valid_leads_uv), try_out_intention_uv = VALUES(try_out_intention_uv), ineffective_leads_uv = VALUES(ineffective_leads_uv),
            coupon_get_pv = VALUES(coupon_get_pv), coupon_get_cost = VALUES(coupon_get_cost), coupon_get_rate = VALUES(coupon_get_rate),
            platform_coupon_click_count = VALUES(platform_coupon_click_count), purchase_amount_with_coupon = VALUES(purchase_amount_with_coupon),
            coupon_purchase_rate = VALUES(coupon_purchase_rate), purchase_amount_with_coupon_cost = VALUES(purchase_amount_with_coupon_cost), coupon_usage_number = VALUES(coupon_usage_number),
            page_phone_call_direct_count = VALUES(page_phone_call_direct_count), page_phone_call_direct_rate = VALUES(page_phone_call_direct_rate), page_phone_call_direct_cost = VALUES(page_phone_call_direct_cost),
            potential_phone_count = VALUES(potential_phone_count), potential_customer_phone_uv = VALUES(potential_customer_phone_uv),
            effective_phone_count = VALUES(effective_phone_count), valid_phone_uv = VALUES(valid_phone_uv),
            income_val_1 = VALUES(income_val_1), income_roi_1 = VALUES(income_roi_1), income_val_3 = VALUES(income_val_3), income_roi_3 = VALUES(income_roi_3),
            income_val_7 = VALUES(income_val_7), income_roi_7 = VALUES(income_roi_7), income_val_14 = VALUES(income_val_14), income_roi_14 = VALUES(income_roi_14),
            income_val_24h = VALUES(income_val_24h), income_roi_1_24h = VALUES(income_roi_1_24h)
    </insert>
</mapper>
