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