From 1759cb85b90cc5c783ab6b6dba8efd0078e4c25a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 4 Nov 2024 15:51:47 +0800 Subject: [PATCH] 1 --- server/wheelserver/common/types.go | 4 +-- server/wheelserver/session/session.go | 47 ++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/server/wheelserver/common/types.go b/server/wheelserver/common/types.go index d502e6f7..88bdfabe 100644 --- a/server/wheelserver/common/types.go +++ b/server/wheelserver/common/types.go @@ -36,8 +36,8 @@ type Session interface { GetVersion() int32 GetPlat() int32 GetPlatVip() int32 - Invited() int32 - NickName() string + GetInvited() string + GetNickName() string IsGuest() int32 } diff --git a/server/wheelserver/session/session.go b/server/wheelserver/session/session.go index 13e56a0c..4319166d 100644 --- a/server/wheelserver/session/session.go +++ b/server/wheelserver/session/session.go @@ -1,5 +1,50 @@ package session -type session struct { +import ( + "main/common" +) +type session struct { + isGuest int32 + jwtUserInfo *common.JwtUserInfo +} + +func (this *session) GetId() string { + return this.jwtUserInfo.Id +} + +func (this *session) GetUid() string { + return this.jwtUserInfo.Uid +} + +func (this *session) GetGid() string { + return this.jwtUserInfo.Gid +} + +func (this *session) GetOpenId() string { + return this.jwtUserInfo.OpenId +} + +func (this *session) GetVersion() int32 { + return this.jwtUserInfo.Version +} + +func (this *session) GetPlat() int32 { + return this.jwtUserInfo.Plat +} + +func (this *session) GetPlatVip() int32 { + return this.jwtUserInfo.PlatVip +} + +func (this *session) GetInvited() string { + return this.jwtUserInfo.Invited +} + +func (this *session) GetNickName() string { + return this.jwtUserInfo.NickName +} + +func (this *session) IsGuest() int32 { + return this.isGuest }