34 lines
723 B
Go
34 lines
723 B
Go
package admin
|
|
|
|
import (
|
|
"context"
|
|
"github.com/zeromicro/go-zero/core/threading"
|
|
"nova_task/internal/logic/nft"
|
|
"nova_task/internal/pkg/errs"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
"nova_task/internal/svc"
|
|
)
|
|
|
|
type NftHolderUpdateLogic struct {
|
|
logx.Logger
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
}
|
|
|
|
func NewNftHolderUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *NftHolderUpdateLogic {
|
|
return &NftHolderUpdateLogic{
|
|
Logger: logx.WithContext(ctx),
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (l *NftHolderUpdateLogic) NftHolderUpdate() error {
|
|
threading.GoSafe(func() {
|
|
lg := nft.NewHolderUpdateLogic(context.Background(), l.svcCtx)
|
|
lg.HolderUpdate()
|
|
})
|
|
return errs.Success()
|
|
}
|