<?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.cyksj.mapper.OrderCommentRewardConfigMapper">

    <insert id="batchInsertConfigs">
        insert into `order_comment_reward_config`(`goods_id`,`balance`,`created_time`,`update_time`)
        values
        <foreach collection="configs" item="item" separator=",">
            (#{item.goodsId},#{item.balance},now(),now())
        </foreach>
        ON DUPLICATE KEY UPDATE balance = VALUES(balance),
        update_time = values(update_time)
    </insert>
</mapper>