From 76377b5e28cb43b8c71efa4c2cecb9a445424f33 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 1 Jul 2022 13:44:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=BD=91=E5=85=B3=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=BE=9D=E8=B5=96=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/equipment/module.go | 7 ------- modules/gateway/module.go | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/modules/equipment/module.go b/modules/equipment/module.go index cf9baa8be..178335538 100644 --- a/modules/equipment/module.go +++ b/modules/equipment/module.go @@ -26,7 +26,6 @@ type Equipment struct { api *apiComp configure *configureComp modelEquipment *modelEquipmentComp - hero comm.IHero } //模块名 @@ -44,12 +43,6 @@ func (this *Equipment) Init(service core.IService, module core.IModule, options //模块启动接口 func (this *Equipment) Start() (err error) { err = this.ModuleBase.Start() - var module interface{} - if module, err = this.service.GetModule(comm.ModuleHero); err != nil { - log.Errorf("Equipment Start err:%v", err) - return - } - this.hero = module.(comm.IHero) return } diff --git a/modules/gateway/module.go b/modules/gateway/module.go index 722c80585..7e7019342 100644 --- a/modules/gateway/module.go +++ b/modules/gateway/module.go @@ -2,10 +2,10 @@ package gateway import ( "go_dreamfactory/comm" - "go_dreamfactory/modules" "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/core/cbase" "go_dreamfactory/lego/sys/log" ) @@ -21,7 +21,7 @@ func NewModule() core.IModule { } type Gateway struct { - modules.ModuleBase + cbase.ModuleBase service base.IRPCXService // rpcx服务接口 主要client->server wsService *WSServiceComp // websocket服务 监听websocket连接 agentMgr *AgentMgrComp // 客户端websocket连接管理