Update user.go

This commit is contained in:
cdle 2021-08-20 05:56:10 +08:00 committed by GitHub
parent 577aa4a672
commit cc53b3131a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"),
})