From 6fd11575b9b0b979c99dbe330764cb38342117c6 Mon Sep 17 00:00:00 2001 From: timerzz Date: Tue, 10 Sep 2024 20:11:39 +0800 Subject: [PATCH] =?UTF-8?q?feat=20upset=E4=BF=AE=E6=94=B9Available?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structs/storage/provider-article.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structs/storage/provider-article.go b/structs/storage/provider-article.go index 839abf2..3896408 100644 --- a/structs/storage/provider-article.go +++ b/structs/storage/provider-article.go @@ -89,7 +89,7 @@ func (p *providerArticleApi) Get(query *GetProviderArticleQuery) (article v2.Pro func (p *providerArticleApi) Upsert(article v2.ProviderArticle) error { if err := p.db.Clauses(clause.OnConflict{ Columns: []clause.Column{{Name: "provider_id"}, {Name: "sku_id"}}, - DoUpdates: clause.AssignmentColumns([]string{"cost"}), + DoUpdates: clause.AssignmentColumns([]string{"cost", "available"}), }).Create(&article).Error; err != nil { return err }