This commit is contained in:
aozhiwei 2024-11-04 15:51:47 +08:00
parent bcf307a92b
commit 1759cb85b9
2 changed files with 48 additions and 3 deletions

View File

@ -36,8 +36,8 @@ type Session interface {
GetVersion() int32
GetPlat() int32
GetPlatVip() int32
Invited() int32
NickName() string
GetInvited() string
GetNickName() string
IsGuest() int32
}

View File

@ -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
}