From d4cd0bd2d1dea30d52e01e906919ba66a772bfae Mon Sep 17 00:00:00 2001 From: timerzz Date: Tue, 21 May 2024 21:30:18 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8Duid=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/model/watcher.go | 5 +---- pkg/watcher/coach.go | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/model/watcher.go b/pkg/model/watcher.go index 17f9371..91c890f 100644 --- a/pkg/model/watcher.go +++ b/pkg/model/watcher.go @@ -49,10 +49,7 @@ type WatchInfor interface { func (w *WatchInfo) GenUid() { if w.Uid == "" { - switch w.Website { - case CoachOutlet: - w.Uid = fmt.Sprintf("coachOutlet_%s", w.Pid) - } + w.Uid = fmt.Sprintf("coachOutlet_%s", w.Pid) } } diff --git a/pkg/watcher/coach.go b/pkg/watcher/coach.go index b4422ed..ecb1718 100644 --- a/pkg/watcher/coach.go +++ b/pkg/watcher/coach.go @@ -41,7 +41,6 @@ func (c *CoachOutlet) SetOption(cfg model.WatchInfo) { func (c *CoachOutlet) Cancel() { c.cancel() - c.db.Where("uid = ?", c.cfg.Uid).Model(c.cfg).Update("watch", false) } func (c *CoachOutlet) Restart() {