aozhiwei 68f6653cbf 1
2024-11-15 15:21:23 +08:00

60 lines
1.0 KiB
Go

package session
import (
"q5"
"main/common"
)
type session struct {
isGuest int32
jwtUserInfo *common.JwtUserInfo
}
func (this *session) GetAccountId() string {
return this.jwtUserInfo.OpenId
}
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
}
func (this *session) GetExt() string {
return q5.EncodeJson(this.jwtUserInfo.Ext)
}