This commit is contained in:
laodaming 2023-11-01 14:56:36 +08:00
parent 37055bbf0f
commit 12795e2115

View File

@ -57,9 +57,11 @@ func (l *GetStatLogic) GetStat(req *types.GetStatReq, userinfo *auth.UserInfo) (
} else { } else {
logx.Error("断言mapUserWsStatItem错误") logx.Error("断言mapUserWsStatItem错误")
} }
} userStat[key] = value
} else {
userStat[key] = mapUserWsStatItem{} userStat[key] = mapUserWsStatItem{}
} }
}
} else { //不指定用户 } else { //不指定用户
mapUserWsStat.Range(func(key, value any) bool { mapUserWsStat.Range(func(key, value any) bool {
if stat, ok := value.(mapUserWsStatItem); ok { if stat, ok := value.(mapUserWsStatItem); ok {