From e20ca6aab02f3b272af50b752e6f3a5e5f0d793b Mon Sep 17 00:00:00 2001 From: timerzz Date: Fri, 12 Apr 2024 14:53:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8Dwatch=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=97=B6=EF=BC=8C=E6=B2=A1=E6=8C=87?= =?UTF-8?q?=E5=AE=9Auid=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/watcher/coach.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/watcher/coach.go b/pkg/watcher/coach.go index 554544e..49bab25 100644 --- a/pkg/watcher/coach.go +++ b/pkg/watcher/coach.go @@ -86,7 +86,7 @@ func (c *CoachOutlet) Restart() { } func (c *CoachOutlet) Watch() { c.ctx, c.cancel = context.WithCancel(c.fCtx) - if err := c.db.Model(&model.Product{}).Updates(map[string]interface{}{"watch": true, "orderable": false}).Error; err != nil { + if err := c.db.Model(&model.Product{}).Where("uid", c.Uid()).Updates(map[string]interface{}{"watch": true, "orderable": false}).Error; err != nil { glog.Errorf("watch update db err: %v", err) err = nil }