32 lines
660 B
Go
32 lines
660 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.TablePagodaRank
|
|
this.MCompModel.Init(service, module, comp, options)
|
|
this.service = service
|
|
return
|
|
}
|
|
|
|
func (this *forumComp) Start(timeSec int32) (err error) {
|
|
err = this.MCompModel.Start()
|
|
//cron.AddFunc("*/5 * * * * ?", this.Timer) //每五秒执行一次
|
|
return
|
|
}
|