pull/2468/head
withchao 1 year ago
parent 389b05dc44
commit 3c90d7d552

@ -203,9 +203,9 @@ func (u *userMap) GetAllUserStatus(deadline time.Time, nowtime time.Time) (resul
defer u.lock.RUnlock() defer u.lock.RUnlock()
result = make([]UserState, 0, len(u.data)) result = make([]UserState, 0, len(u.data))
for userID, userPlatform := range u.data { for userID, userPlatform := range u.data {
add := userPlatform.Time.Before(deadline) skip := deadline.Before(userPlatform.Time)
log.ZDebug(ctx, "userMap GetAllUserStatus", "userID", userID, "add", add, "platforms", userPlatform.String()) log.ZDebug(ctx, "userMap GetAllUserStatus", "userID", userID, "skip", skip, "platforms", userPlatform.String())
if add { if skip {
continue continue
} }
userPlatform.Time = nowtime userPlatform.Time = nowtime

Loading…
Cancel
Save