From 285bb98158a8da5053bb608300e3e4d1a7fee249 Mon Sep 17 00:00:00 2001 From: timerzz Date: Sat, 29 Mar 2025 20:50:59 +0800 Subject: [PATCH] =?UTF-8?q?update=20article=E6=B7=BB=E5=8A=A0=E6=AF=9B?= =?UTF-8?q?=E5=88=A9=E6=B6=A6?= 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 962f6bd..ca5475b 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{"available", "updated_at", "cost_price", "sell_price", "rate", "remark", "exclude"}), + DoUpdates: clause.AssignmentColumns([]string{"available", "updated_at", "cost_price", "sell_price", "rate", "GrossProfit", "remark", "exclude"}), }).Create(&article).Error; err != nil { return err }