35 lines
759 B
Go
35 lines
759 B
Go
package timer
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/modules"
|
|
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/lego/sys/cron"
|
|
)
|
|
|
|
type SeasonPagoda struct {
|
|
modules.MCompModel
|
|
service core.IService
|
|
dbName string
|
|
}
|
|
|
|
//组件初始化接口
|
|
func (this *SeasonPagoda) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
|
this.TableName = comm.TableSeasonPagoda
|
|
this.MCompModel.Init(service, module, comp, options)
|
|
this.service = service
|
|
return
|
|
}
|
|
|
|
func (this *SeasonPagoda) Start() (err error) {
|
|
err = this.MCompModel.Start()
|
|
cron.AddFunc("0 0 23 L * ?", this.Timer) //每月最后一天23点执行一次
|
|
return
|
|
}
|
|
|
|
// 处理排行榜排序
|
|
func (this *SeasonPagoda) Timer() {
|
|
|
|
}
|