65 lines
1.6 KiB
Go
65 lines
1.6 KiB
Go
package capturesheep
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/modules"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
/*
|
|
模块名:周长任务
|
|
描述:周长任务
|
|
开发:李伟
|
|
*/
|
|
type CaptureSheep struct {
|
|
modules.ModuleBase
|
|
service core.IService
|
|
dragon comm.IDragon
|
|
mail comm.Imail
|
|
api *apiComp
|
|
configure *configureComp
|
|
modelCaptureSheep *ModelCaptureSheep
|
|
}
|
|
|
|
func NewModule() core.IModule {
|
|
return &CaptureSheep{}
|
|
}
|
|
|
|
func (this *CaptureSheep) GetType() core.M_Modules {
|
|
return comm.ModuleCaptureSheep
|
|
}
|
|
|
|
func (this *CaptureSheep) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
|
err = this.ModuleBase.Init(service, module, options)
|
|
this.service = service
|
|
return
|
|
}
|
|
|
|
func (this *CaptureSheep) Start() (err error) {
|
|
err = this.ModuleBase.Start()
|
|
var module core.IModule
|
|
if module, err = this.service.GetModule(comm.ModuleDragon); err != nil {
|
|
return
|
|
}
|
|
this.dragon = module.(comm.IDragon)
|
|
if module, err = this.service.GetModule(comm.ModuleMail); err != nil {
|
|
return
|
|
}
|
|
this.mail = module.(comm.Imail)
|
|
return
|
|
}
|
|
|
|
func (this *CaptureSheep) OnInstallComp() {
|
|
this.ModuleBase.OnInstallComp()
|
|
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
|
this.modelCaptureSheep = this.RegisterComp(new(ModelCaptureSheep)).(*ModelCaptureSheep)
|
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
|
|
|
}
|
|
|
|
// 查询每日红点信息
|
|
func (this *CaptureSheep) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) {
|
|
return
|
|
}
|