From 93c739112515d65dc136ed0030bfe6abf8aa189a Mon Sep 17 00:00:00 2001 From: timerzz Date: Wed, 11 Sep 2024 17:54:18 +0800 Subject: [PATCH] =?UTF-8?q?feat=20article=E6=B7=BB=E5=8A=A0create?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structs/storage/article.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structs/storage/article.go b/structs/storage/article.go index 82f73fe..a80742d 100644 --- a/structs/storage/article.go +++ b/structs/storage/article.go @@ -37,7 +37,7 @@ func (a *articleApi) Upsert(article v2.Article) error { return a.db.Transaction(func(tx *gorm.DB) error { if err := tx.Clauses(clause.OnConflict{ Columns: []clause.Column{{Name: "pid"}, {Name: "brand"}}, - DoUpdates: clause.AssignmentColumns([]string{"name", "english_name", "available", "updated_at", "cost_price", "sell_price", "rate", "remark", "exclude"}), + DoUpdates: clause.AssignmentColumns([]string{"available", "updated_at", "cost_price", "sell_price", "rate", "remark", "exclude"}), }).Create(&article).Error; err != nil { return err }