移除不用模块方法
This commit is contained in:
parent
6f0f2c5b84
commit
b2d9515fc3
@ -185,7 +185,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (e
|
||||
session.SendMsg(string(this.module.GetType()), FriendSubTypeAgree, resp)
|
||||
|
||||
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 {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ func NewModule() core.IModule {
|
||||
|
||||
type Friend struct {
|
||||
modules.ModuleBase
|
||||
maincity comm.IMainCity
|
||||
//maincity comm.IMainCity
|
||||
api *apiComp
|
||||
modelFriend *ModelFriend
|
||||
ModelFriendQiecuo *ModelFriendQiecuo
|
||||
@ -74,11 +74,11 @@ func (this *Friend) Start() (err error) {
|
||||
if this.globalConf == nil {
|
||||
err = errors.New("global config not found")
|
||||
}
|
||||
var module core.IModule
|
||||
if module, err = this.service.GetModule(comm.ModuleMaincity); err != nil {
|
||||
return
|
||||
}
|
||||
this.maincity = module.(comm.IMainCity)
|
||||
// var module core.IModule
|
||||
// if module, err = this.service.GetModule(comm.ModuleMaincity); err != nil {
|
||||
// return
|
||||
// }
|
||||
// this.maincity = module.(comm.IMainCity)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/event"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
@ -52,8 +51,8 @@ func (this *MainCity) Start() (err error) {
|
||||
return
|
||||
}
|
||||
this.sociaty = module.(comm.ISociaty)
|
||||
event.Register(comm.EventUserLogin, this.EventUserLogin)
|
||||
event.Register(comm.EventUserOffline, this.EventUserOffline)
|
||||
// event.Register(comm.EventUserLogin, this.EventUserLogin)
|
||||
// event.Register(comm.EventUserOffline, this.EventUserOffline)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
this.module.maincity.AddMainCityFriends(req.Uid, uids)
|
||||
//this.module.maincity.AddMainCityFriends(req.Uid, uids)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ var _ comm.ISociaty = (*Sociaty)(nil)
|
||||
|
||||
type Sociaty struct {
|
||||
modules.ModuleBase
|
||||
maincity comm.IMainCity
|
||||
//maincity comm.IMainCity
|
||||
api *apiComp
|
||||
service base.IRPCXService
|
||||
modelSociaty *ModelSociaty
|
||||
@ -89,11 +89,11 @@ func (this *Sociaty) Start() (err error) {
|
||||
if err = this.checkSociatyConf(); err != nil {
|
||||
return err
|
||||
}
|
||||
var module core.IModule
|
||||
if module, err = this.service.GetModule(comm.ModuleMaincity); err != nil {
|
||||
return
|
||||
}
|
||||
this.maincity = module.(comm.IMainCity)
|
||||
// var module core.IModule
|
||||
// if module, err = this.service.GetModule(comm.ModuleMaincity); err != nil {
|
||||
// return
|
||||
// }
|
||||
// this.maincity = module.(comm.IMainCity)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,6 @@ import (
|
||||
"go_dreamfactory/modules/library"
|
||||
"go_dreamfactory/modules/linestory"
|
||||
"go_dreamfactory/modules/mail"
|
||||
"go_dreamfactory/modules/maincity"
|
||||
"go_dreamfactory/modules/mainline"
|
||||
"go_dreamfactory/modules/monkey"
|
||||
"go_dreamfactory/modules/moonfantasy"
|
||||
@ -186,7 +185,7 @@ func main() {
|
||||
jielong.NewModule(),
|
||||
entertainment.NewModule(),
|
||||
dcolor.NewModule(),
|
||||
maincity.NewModule(),
|
||||
//maincity.NewModule(),
|
||||
treasuremap.NewModule(),
|
||||
gameinvite.NewModule(),
|
||||
caninerabbit.NewModule(),
|
||||
|
Loading…
Reference in New Issue
Block a user