From cc53b3131a9134f901da78151d6a4dad9bfe89a6 Mon Sep 17 00:00:00 2001 From: cdle <50124752+cdle@users.noreply.github.com> Date: Fri, 20 Aug 2021 05:56:10 +0800 Subject: [PATCH] Update user.go --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/user.go b/models/user.go index aff3474..ebd0cdf 100644 --- a/models/user.go +++ b/models/user.go @@ -55,7 +55,7 @@ func NewActiveUser(class string, uid int, msgs ...interface{}) { } else { if zero.Unix() > u.ActiveAt.Unix() { first = true - db.Updates(map[string]interface{}{ + db.Model(&u).Updates(map[string]interface{}{ "active_at": ntime, "coin": gorm.Expr("coin+1"), })