<?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.moka.gdtauto.mapper.AdAutoConfMapper">

    <insert id="saveOrUpdate">
        INSERT INTO ad_auto_conf (rule_name, job_number, ad_group_id, new_ad_days, rules, create_time, update_time)
        VALUES (#{ruleName}, #{jobNumber}, #{adGroupId}, #{newAdDays}, #{rules}, #{createTime}, #{updateTime})
        ON DUPLICATE KEY UPDATE
        rule_name = VALUES(rule_name),
        new_ad_days = VALUES(new_ad_days),
        rules = VALUES(rules),
        update_time = VALUES(update_time)
    </insert>
</mapper>
