<?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.clean.mapper.TrackMonitorLogsMapper">

    <insert id="replaceBatch">
        insert into ctop_track_monitor_logs(
        account_id,
        unit_id,
        click_track_url,
        actionbar_click_url
        )
        values
        <foreach collection="addList" item="add" separator=",">
            (
            #{add.accountId},
            #{add.unitId},
            #{add.clickTrackUrl},
            #{add.actionbarClickUrl}
            )
        </foreach>

    </insert>
    <select id="getCount" resultType="java.lang.Integer">
        select  count(1)  from ctop_track_monitor_logs
        where  account_id = #{accountId}
        and unit_id = #{unitId}

    </select>
</mapper>