From 0222ab4539bf3aa0f5246a76d79b172b902c1836 Mon Sep 17 00:00:00 2001 From: timerzz Date: Mon, 2 Sep 2024 19:39:46 +0800 Subject: [PATCH] =?UTF-8?q?feat=20seller-article=20=E4=B8=ADupsert?= =?UTF-8?q?=E6=A0=B9=E6=8D=AEid=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structs/storage/seller-article.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structs/storage/seller-article.go b/structs/storage/seller-article.go index 6095533..540cd63 100644 --- a/structs/storage/seller-article.go +++ b/structs/storage/seller-article.go @@ -82,7 +82,7 @@ func (p *sellerArticleApi) Get(query *GetSellerArticleQuery) (article v2.SellerA func (p *sellerArticleApi) Upsert(article v2.SellerArticle) error { return p.db.Clauses(clause.OnConflict{ - Columns: []clause.Column{{Name: "seller_id"}, {Name: "sku_id"}}, + Columns: []clause.Column{{Name: "id"}}, DoUpdates: clause.AssignmentColumns([]string{"sell", "exclude"}), }).Create(&article).Error }