移除不用模块方法

This commit is contained in:
meixiongfeng 2024-02-01 10:33:52 +08:00
parent 6f0f2c5b84
commit b2d9515fc3
6 changed files with 17 additions and 19 deletions

View File

@ -185,7 +185,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (e
session.SendMsg(string(this.module.GetType()), FriendSubTypeAgree, resp) session.SendMsg(string(this.module.GetType()), FriendSubTypeAgree, resp)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.maincity.AddMainCityFriends(session.GetUserId(), req.FriendIds) //this.module.maincity.AddMainCityFriends(session.GetUserId(), req.FriendIds)
if len(tasks) > 0 { if len(tasks) > 0 {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
} }

View File

@ -33,7 +33,7 @@ func NewModule() core.IModule {
type Friend struct { type Friend struct {
modules.ModuleBase modules.ModuleBase
maincity comm.IMainCity //maincity comm.IMainCity
api *apiComp api *apiComp
modelFriend *ModelFriend modelFriend *ModelFriend
ModelFriendQiecuo *ModelFriendQiecuo ModelFriendQiecuo *ModelFriendQiecuo
@ -74,11 +74,11 @@ func (this *Friend) Start() (err error) {
if this.globalConf == nil { if this.globalConf == nil {
err = errors.New("global config not found") err = errors.New("global config not found")
} }
var module core.IModule // var module core.IModule
if module, err = this.service.GetModule(comm.ModuleMaincity); err != nil { // if module, err = this.service.GetModule(comm.ModuleMaincity); err != nil {
return // return
} // }
this.maincity = module.(comm.IMainCity) // this.maincity = module.(comm.IMainCity)
return return
} }

View File

@ -4,7 +4,6 @@ import (
"context" "context"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event"
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -52,8 +51,8 @@ func (this *MainCity) Start() (err error) {
return return
} }
this.sociaty = module.(comm.ISociaty) this.sociaty = module.(comm.ISociaty)
event.Register(comm.EventUserLogin, this.EventUserLogin) // event.Register(comm.EventUserLogin, this.EventUserLogin)
event.Register(comm.EventUserOffline, this.EventUserOffline) // event.Register(comm.EventUserOffline, this.EventUserOffline)
return return
} }

View File

@ -131,7 +131,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
this.module.Errorln(err) this.module.Errorln(err)
} }
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.maincity.AddMainCityFriends(req.Uid, uids) //this.module.maincity.AddMainCityFriends(req.Uid, uids)
}) })
return return
} }

View File

@ -24,7 +24,7 @@ var _ comm.ISociaty = (*Sociaty)(nil)
type Sociaty struct { type Sociaty struct {
modules.ModuleBase modules.ModuleBase
maincity comm.IMainCity //maincity comm.IMainCity
api *apiComp api *apiComp
service base.IRPCXService service base.IRPCXService
modelSociaty *ModelSociaty modelSociaty *ModelSociaty
@ -89,11 +89,11 @@ func (this *Sociaty) Start() (err error) {
if err = this.checkSociatyConf(); err != nil { if err = this.checkSociatyConf(); err != nil {
return err return err
} }
var module core.IModule // var module core.IModule
if module, err = this.service.GetModule(comm.ModuleMaincity); err != nil { // if module, err = this.service.GetModule(comm.ModuleMaincity); err != nil {
return // return
} // }
this.maincity = module.(comm.IMainCity) // this.maincity = module.(comm.IMainCity)
return return
} }

View File

@ -47,7 +47,6 @@ import (
"go_dreamfactory/modules/library" "go_dreamfactory/modules/library"
"go_dreamfactory/modules/linestory" "go_dreamfactory/modules/linestory"
"go_dreamfactory/modules/mail" "go_dreamfactory/modules/mail"
"go_dreamfactory/modules/maincity"
"go_dreamfactory/modules/mainline" "go_dreamfactory/modules/mainline"
"go_dreamfactory/modules/monkey" "go_dreamfactory/modules/monkey"
"go_dreamfactory/modules/moonfantasy" "go_dreamfactory/modules/moonfantasy"
@ -186,7 +185,7 @@ func main() {
jielong.NewModule(), jielong.NewModule(),
entertainment.NewModule(), entertainment.NewModule(),
dcolor.NewModule(), dcolor.NewModule(),
maincity.NewModule(), //maincity.NewModule(),
treasuremap.NewModule(), treasuremap.NewModule(),
gameinvite.NewModule(), gameinvite.NewModule(),
caninerabbit.NewModule(), caninerabbit.NewModule(),