modify: 手动结算软质押奖励支持指定日期

This commit is contained in:
lianghuanjie
2025-01-13 11:04:27 +08:00
parent 70848daafc
commit 76d7cbf575
7 changed files with 79 additions and 23 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/zeromicro/go-zero/core/logx"
"nova_task/internal/logic/nft"
"nova_task/internal/svc"
"time"
)
type Cron struct {
@@ -25,7 +26,8 @@ func (c *Cron) Spec() string {
}
func (c *Cron) Run() {
logx.Debugw("run settle cron task")
date := time.Now().AddDate(0, 0, -1).Format(time.DateOnly)
logx.Debugw("run settle cron task", logx.Field("settle-date", date))
lg := nft.NewStakeSettleLogic(c.ctx, c.svcCtx)
lg.StakeSettle()
lg.StakeSettle(date)
}