From d74fdd9f6f6a3a4fbbcb4ba6ecf1f096ad472f3f Mon Sep 17 00:00:00 2001 From: zhaocy Date: Wed, 8 Jun 2022 14:49:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E5=A5=BD=E5=8F=8B=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/module.go | 5 +++-- services/comp_gateroute.go | 2 +- services/worker/main.go | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/friend/module.go b/modules/friend/module.go index fea48cce6..8673f6f08 100644 --- a/modules/friend/module.go +++ b/modules/friend/module.go @@ -14,10 +14,11 @@ func NewModule() core.IModule { type Friend struct { modules.ModuleBase + friend_comp *FriendComp } func (this *Friend) GetType() core.M_Modules { - return comm.SM_UserModule + return comm.SM_FriendModule } func (this *Friend) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { @@ -28,5 +29,5 @@ func (this *Friend) Init(service core.IService, module core.IModule, options cor func (this *Friend) OnInstallComp() { this.ModuleBase.OnInstallComp() - + this.friend_comp = this.RegisterComp(new(FriendComp)).(*FriendComp) } diff --git a/services/comp_gateroute.go b/services/comp_gateroute.go index 734aefc50..49e4c6e54 100644 --- a/services/comp_gateroute.go +++ b/services/comp_gateroute.go @@ -70,7 +70,7 @@ func (this *SComp_GateRouteComp) RegisterRoute(methodName string, comp reflect.V } func (this *SComp_GateRouteComp) ReceiveMsg(ctx context.Context, args *pb.AgentMessage, reply *pb.RPCMessageReply) error { - log.Debugf("SComp_GateRouteComp ReceiveMsg agent:%s uId:%d MessageDistribution msg:%s", args.UserSessionId, args.UserId, args.Method) + log.Debugf("SComp_GateRouteComp ReceiveMsg agent:%s uId:%s MessageDistribution msg:%s", args.UserSessionId, args.UserId, args.Method) this.mrlock.RLock() msghandle, ok := this.msghandles[args.Method] this.mrlock.RUnlock() diff --git a/services/worker/main.go b/services/worker/main.go index 541459e6e..161a6e512 100644 --- a/services/worker/main.go +++ b/services/worker/main.go @@ -3,6 +3,7 @@ package main import ( "flag" "fmt" + "go_dreamfactory/modules/friend" "go_dreamfactory/modules/mail" "go_dreamfactory/modules/pack" "go_dreamfactory/modules/user" @@ -34,6 +35,7 @@ func main() { user.NewModule(), pack.NewModule(), mail.NewModule(), + friend.NewModule(), ) }