From 1ba8b29a778470dd84c4fbbb7b51f7b73762c4d7 Mon Sep 17 00:00:00 2001 From: timerzz Date: Sun, 16 Jun 2024 10:51:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8DupdateRate=E4=BC=9A?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=85=B6=E4=BB=96=E7=BD=91=E7=AB=99=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- product/option.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/option.go b/product/option.go index 49eba24..0d0393a 100644 --- a/product/option.go +++ b/product/option.go @@ -41,7 +41,7 @@ func (c *Controller) SaveOption(opt Option) { func (c *Controller) updateRate(oldFreight float64) { var results []*productv1.Product - c.db.FindInBatches(&results, 20, func(tx *gorm.DB, batch int) error { + c.db.Where("website = ?", productv1.WebSite_US_Coach_Outlet).FindInBatches(&results, 20, func(tx *gorm.DB, batch int) error { for _, result := range results { if result.Freight == oldFreight { result.Freight = c.Option.Freight