mysql 批量有则修改,无则新增
需要为表添加唯一索引alter table tb_*** add unique index(aa,bb); -- 此条为联合唯一索引
INSERT INTO
<include refid="table_name" />
(
<include refid="Base_Column_List" />
)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
<include refid="Base_Column_value_item" />
)
</foreach>
ON DUPLICATE KEY UPDATE user_name=user_name+VALUES(user_name)