diff --git a/comm/core.go b/comm/core.go index ccaa87978..ccdac2e30 100644 --- a/comm/core.go +++ b/comm/core.go @@ -35,6 +35,7 @@ type ISC_GateRouteComp interface { //用户会话 type IUserSession interface { GetSessionId() string + GetUserId() uint32 GetIP() string GetGatewayServiceId() string Build(uid uint32) (err error) diff --git a/comm/usersession.go b/comm/usersession.go index 9c6a4048c..4fa7c2eff 100644 --- a/comm/usersession.go +++ b/comm/usersession.go @@ -31,6 +31,10 @@ type UserSession struct { func (this *UserSession) GetSessionId() string { return this.SessionId } + +func (this *UserSession) GetUserId() uint32 { + return this.UserId +} func (this *UserSession) GetIP() string { return this.IP }