<?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.adx.tracking.storage.mapper.ConversionMapper">

    <insert id="insertOrUpdate">
        INSERT INTO baidu_conversions (
            dedupe_key, qk, media, date_value, appsid, customer_name, device_id, conv,
            payment, act, tu, clk_time, created_at
        ) VALUES (
            #{dedupeKey}, #{qk}, #{media}, #{dateValue}, #{appsid}, #{customerName},
            #{deviceId}, #{conv}, #{payment}, #{act}, #{tu}, #{clkTime}, #{createdAt}
        )
        ON DUPLICATE KEY UPDATE
            media = VALUES(media),
            conv = VALUES(conv),
            payment = VALUES(payment),
            clk_time = VALUES(clk_time)
    </insert>

</mapper>
