<?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.toutiao.modules.report.mapper.BytedanceDailyReportTaskMapper">

    <insert id="loadBytedanceDailyCreativeFileAsync">
		LOAD DATA local INFILE  #{localPath}
		REPLACE INTO TABLE ctop_bytedance_report_creative_daily_async CHARACTER SET utf8mb4
		FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
		IGNORE 1 LINES
		(
		campaign_id,
        deep_convert_rate,
        ad_id,
        ctr,
        show_material,
        avg_show_cost,
        creative_id,
        convert_cost,
        convert_material,
        deep_convert_cost,
        account_id,
        cost,
        deep_convert,
        avg_click_cost,
        ad_name,
        campaign_name,
        convert_rate,
        creative_material_mode,
        click,
        stat_datetime
        )
    </insert>

    <insert id="loadBytedanceDailyAccountFileAsync">
        LOAD DATA local INFILE  #{localPath}
        REPLACE INTO TABLE ctop_bytedance_report_account_daily_async CHARACTER SET utf8mb4
        FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
        IGNORE 1 LINES
        (
            deep_convert_rate,
            pricing_category,
            ctr,
            show_material,
            avg_show_cost,
            convert_rate,
            convert_cost,
            convert_material,
            deep_convert_cost,
            account_id,
            cost,
            deep_convert,
            avg_click_cost,
            click,
            stat_datetime
        )
    </insert>

    <insert id="loadBytedanceDailyCampaignFileAsync">
        LOAD DATA local INFILE  #{localPath}
        REPLACE INTO TABLE ctop_bytedance_report_campaign_daily_async CHARACTER SET utf8mb4
        FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
        IGNORE 1 LINES
        (
            campaign_type,
            deep_convert_rate,
            ctr,
            show_material,
            avg_show_cost,
            convert_rate,
            convert_cost,
            campaign_id,
            deep_convert_cost,
            account_id,
            cost,
            deep_convert,
            avg_click_cost,
            campaign_name,
            convert_material,
            click,
            stat_datetime
        )
    </insert>

    <insert id="loadBytedanceDailyPlanFileAsync">
        LOAD DATA local INFILE  #{localPath}
        REPLACE INTO TABLE ctop_bytedance_report_plan_daily_async CHARACTER SET utf8mb4
        FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
        IGNORE 1 LINES
        (
            landing_type,
            deep_convert_rate,
            ad_id,
            ctr,
            show_material,
            avg_show_cost,
            convert_rate,
            convert_cost,
            convert_material,
            deep_convert_cost,
            account_id,
            cost,
            deep_convert,
            avg_click_cost,
            ad_name,
            campaign_name,
            click,
            stat_datetime,
            campaign_id
        )
    </insert>

</mapper>
