nft stake task logic

This commit is contained in:
lianghuanjie
2024-12-30 12:53:34 +08:00
parent 31a674080d
commit 029289e84c
5 changed files with 102 additions and 5 deletions

View File

@@ -6,10 +6,9 @@ import (
"nova_task/internal/model"
"nova_task/internal/pkg/errs"
"nova_task/internal/pkg/utils"
"time"
"nova_task/internal/svc"
"nova_task/internal/types"
"time"
"github.com/zeromicro/go-zero/core/logx"
)
@@ -53,7 +52,9 @@ func (l *GetNftListLogic) GetNftList() (*types.UserNftList, error) {
nft, err := l.svcCtx.StakeNftModel.FindOneByUidTokenId(l.ctx, uid, token)
if err == nil {
hasStake = nft.State == 1
stakeAt = nft.UpdatedAt.Format(time.DateOnly)
if hasStake {
stakeAt = nft.UpdatedAt.Format(time.DateOnly)
}
}
nftList = append(nftList, types.UserNft{
TokenId: token,