From 1f51aeb7830cc5951eb90fe13e373cf9472b5bd3 Mon Sep 17 00:00:00 2001 From: timerzz Date: Sat, 13 Apr 2024 09:21:08 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=87=8F=E5=B0=8F=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=97=B6=E7=9A=84=E7=B2=92=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/watcher/coach.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/watcher/coach.go b/pkg/watcher/coach.go index 8d56ebb..873ea60 100644 --- a/pkg/watcher/coach.go +++ b/pkg/watcher/coach.go @@ -126,7 +126,12 @@ func (c *CoachOutlet) Watch() { } } - if err = c.db.Save(c.detail).Error; err != nil { + if err = c.db.Where("uid = ?", c.Uid()).Updates( + map[string]interface{}{ + "orderable": c.detail.Orderable, + "allocation_reset_date": c.detail.AllocationResetDate, + "watch": c.detail.Watch, + }).Error; err != nil { slog.Error(fmt.Sprintf("更新数据库失败:%v", err)) } // 如果可以预定了,那么退出