32 lines
653 B
Go
32 lines
653 B
Go
package task
|
|
|
|
import (
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/modules"
|
|
)
|
|
|
|
const (
|
|
TaskSubTypeList = "list" //任务列表
|
|
TaskSubTypeReceive = "receive" //领取
|
|
)
|
|
|
|
type apiComp struct {
|
|
modules.MCompGate
|
|
service core.IService
|
|
moduleTask *ModuleTask
|
|
}
|
|
|
|
//组件初始化接口
|
|
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
|
err = this.MCompGate.Init(service, module, comp, options)
|
|
this.moduleTask = module.(*ModuleTask)
|
|
this.service = service
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) Start() (err error) {
|
|
err = this.MCompGate.Start()
|
|
|
|
return
|
|
}
|