REPLACE topic_favorite (cluster_id, topic_name, username)
VALUES
(#{TopicFavoriteDO.clusterId}, #{TopicFavoriteDO.topicName}, #{TopicFavoriteDO.username})
insert into topic_favorite (cluster_id, topic_name, username)
values
(#{TopicFavoriteDO.clusterId}, #{TopicFavoriteDO.topicName}, #{TopicFavoriteDO.username})
on conflict (cluster_id, topic_name, username) do update set gmt_modify = now();
DELETE FROM topic_favorite WHERE id=#{id}