From b804856510c8c5aeabba5180ee3bd41d6912a008 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 6 Jun 2022 11:54:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=94=A8=E6=88=B7=E4=BC=9A?= =?UTF-8?q?=E8=AF=9D=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/core.go | 1 + comm/usersession.go | 4 ++++ 2 files changed, 5 insertions(+) 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 }