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)) } // 如果可以预定了,那么退出