<?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.KuaishouReportDailyAgentMapper">
    <insert id="replaceBatch">
        replace into ctop_kuaishou_report_daily_agent(
        `date`,
        `account_id`,
        `kid`,
        `advertiser_name`,
        `advertiser_create_time`,
        `cost_campaign_count`,
        `balance`,
        `cost`,
        `xianjin_cost`,
        `fandian_cost`,
        `kuangfan_cost`,
        `jili_cost`,
        `xinyong_cost`,
        `fengmian_show_count`,
        `fengmian_click_count`,
        `sucai_show_count`,
        `convert_count`,
        `fengmian_click_rate`,
        `convert_click_rate`
        )
        values
        <foreach collection="list" item="agent" separator=",">
            (#{agent.date},
            #{agent.accountId},
            #{agent.kid},
            #{agent.advertiserName},
            #{agent.advertiserCreateTime},
            #{agent.costCampaignCount},
            #{agent.balance},
            #{agent.cost},
            #{agent.xianjinCost},
            #{agent.fandianCost},
            #{agent.kuangfanCost},
            #{agent.jiliCost},
            #{agent.xinyongCost},
            #{agent.fengmianShowCount},
            #{agent.fengmianClickCount},
            #{agent.sucaiShowCount},
            #{agent.convertCount},
            #{agent.fengmianClickRate},
            #{agent.convertClickRate})
        </foreach>
    </insert>
</mapper>