This commit is contained in:
laodaming 2023-10-31 14:25:46 +08:00
parent 10497080c1
commit 51f8b68b5b

View File

@ -33,9 +33,9 @@ func (l *GetStatLogic) GetStat(req *types.GetStatReq, userinfo *auth.UserInfo) (
if req.Password != "fusen1314" { if req.Password != "fusen1314" {
return resp.SetStatusWithMessage(basic.CodeOK, "你干嘛,哎哟") return resp.SetStatusWithMessage(basic.CodeOK, "你干嘛,哎哟")
} }
userStat := make(map[interface{}]int) userStat := make(map[string]int)
mapUserWsStat.Range(func(key, value any) bool { mapUserWsStat.Range(func(key, value any) bool {
userStat[key] = value.(int) userStat[key.(string)] = value.(int)
return true return true
}) })
return resp.SetStatusWithMessage(basic.CodeOK, "success", types.GetStatRsp{ return resp.SetStatusWithMessage(basic.CodeOK, "success", types.GetStatRsp{