group_power_month_act.go 498 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
package group_cron

import (
	"git.hilo.cn/hilo-common/domain"
	"github.com/robfig/cron"
	"hilo-group/domain/service/group_power_s"
)

// 家族贡献月度排行榜发奖
func GroupPowerMonthRankAct() {
	c := cron.New()
	// 每月1号0:02结算发奖
	spec := "0 2 0 1 * ?"
	_ = c.AddFunc(spec, func() {
		var model = domain.CreateModelNil()
		if err := group_power_s.CalcGroupPowerMonthRankAct(model); err != nil {
			model.Log.Errorf("GroupPowerMonthRankAct fail:%v", err)
		}
	})

	c.Start()
}