64 lines
1.4 KiB
Go
64 lines
1.4 KiB
Go
package weektask
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/modules"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
/*
|
|
模块名:周长任务
|
|
描述:周长任务
|
|
开发:李伟
|
|
*/
|
|
type WeekTask struct {
|
|
modules.ModuleBase
|
|
service core.IService
|
|
sys comm.ISys
|
|
api *apiComp
|
|
configure *configureComp
|
|
modelWeektask *ModelWeektask
|
|
}
|
|
|
|
func NewModule() core.IModule {
|
|
return &WeekTask{}
|
|
}
|
|
|
|
func (this *WeekTask) GetType() core.M_Modules {
|
|
return comm.ModuleWeektask
|
|
}
|
|
|
|
func (this *WeekTask) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
|
if err = this.ModuleBase.Init(service, module, options); err != nil {
|
|
return
|
|
}
|
|
this.service = service
|
|
return
|
|
}
|
|
|
|
func (this *WeekTask) Start() (err error) {
|
|
if err = this.ModuleBase.Start(); err != nil {
|
|
return
|
|
}
|
|
var module core.IModule
|
|
if module, err = this.service.GetModule(comm.ModuleSys); err != nil {
|
|
return
|
|
}
|
|
this.sys = module.(comm.ISys)
|
|
return
|
|
}
|
|
|
|
func (this *WeekTask) OnInstallComp() {
|
|
this.ModuleBase.OnInstallComp()
|
|
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
|
this.modelWeektask = this.RegisterComp(new(ModelWeektask)).(*ModelWeektask)
|
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
|
|
|
}
|
|
|
|
// 查询每日红点信息
|
|
func (this *WeekTask) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) {
|
|
return
|
|
}
|