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

@@ -7,6 +7,7 @@ import (
"nova_task/internal/logic/nft"
"nova_task/internal/pkg/errs"
"nova_task/internal/svc"
"nova_task/internal/types"
)
type StakeSettleLogic struct {
@@ -24,10 +25,10 @@ func NewStakeSettleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Stake
}
}
func (l *StakeSettleLogic) StakeSettle() error {
func (l *StakeSettleLogic) StakeSettle(req *types.StakeSettleReq) error {
threading.GoSafe(func() {
lg := nft.NewStakeSettleLogic(context.Background(), l.svcCtx)
lg.StakeSettle()
lg.StakeSettle(req.Date)
})
return errs.Success()