package kftask import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" "go_dreamfactory/pb" ) type KFTask struct { modules.ModuleBase service core.IService api *apiComp configure *configureComp modeltask *Modeltask open bool } func NewModule() core.IModule { return &KFTask{} } func (this *KFTask) GetType() core.M_Modules { return comm.ModuleKFTask } func (this *KFTask) 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 *KFTask) Start() (err error) { err = this.ModuleBase.Start() return } func (this *KFTask) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.modeltask = this.RegisterComp(new(Modeltask)).(*Modeltask) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) } // 活动开启 func (this *KFTask) ActivityNotice(hdlist *pb.DBHuodong) { switch hdlist.Itype { case comm.KFSevenTask: this.open = true break } }