<?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.batch.mapper.KuaiShouGroupTargetMapper">


    <insert id="replaceBatch">
        replace into ctop_kuaishou_group_target(
        account_id ,
        unit_id,
        region,
        age_min,
        age_max,
        ages_range,
        gender,
        platform_os,
        android_osv,
        ios_osv,
        network,
        device_brand,
        device_price,
        business_interest_type,
        business_interest,
        fans_star,
        interest_video,
        app_interest,
        app_ids,
        population,
        exclude_population,
        is_open,
        no_age_break,
        no_gender_break,
        no_area_break
        )
        values
        <foreach collection="targets" item="targets" separator=",">
            (

            #{targets.accountId},
            #{targets.unitId},
            #{targets.region},
            #{targets.ageMin},
            #{targets.ageMax},
            #{targets.agesRange},
            #{targets.gender},
            #{targets.platformOs},
            #{targets.androidOsv},
            #{targets.iosOsv},
            #{targets.network},
            #{targets.deviceBrand},
            #{targets.devicePrice},
            #{targets.businessInterestType},
            #{targets.businessInterest},
            #{targets.fansStar},
            #{targets.interestVideo},
            #{targets.appInterest},
            #{targets.appIds},
            #{targets.population},
            #{targets.excludePopulation},
            #{targets.isOpen},
            #{targets.noAgeBreak},
            #{targets.noGenderBreak},
            #{targets.noAreaBreak}
            )
        </foreach>
    </insert>

</mapper>