go_dreamfactory/modules/timer/forum.go

31 lines
616 B
Go

package timer
import (
"go_dreamfactory/comm"
"go_dreamfactory/modules"
"go_dreamfactory/lego/core"
)
/*
装备模块 API
*/
type ForumComp struct {
modules.MCompModel
service core.IService
}
func (this *ForumComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
this.TableName = comm.TableForum
this.MCompModel.Init(service, module, comp, options)
this.service = service
return
}
func (this *ForumComp) Start() (err error) {
err = this.MCompModel.Start()
//cron.AddFunc("*/60 * * * * ?", this.Timer) //每60s执行一次
return
}