modify: 手动结算软质押奖励支持指定日期
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user