|
|
@@ -36,7 +36,7 @@ public class AssetMintService {
|
|
|
public void mint(Long assetId) {
|
|
|
Asset asset = assetRepo.findById(assetId).orElseThrow(new BusinessException("asset不存在"));
|
|
|
User user = userRepo.findById(asset.getUserId()).orElseThrow(new BusinessException("用户不存在"));
|
|
|
- if (StringUtils.isEmpty(user.getPublicKey())) {
|
|
|
+ if (StringUtils.isEmpty(user.getNftAccount())) {
|
|
|
NFTAccount account = nftService.createAccount(user.getUsername() + "_");
|
|
|
user.setNftAccount(account.getAccountId());
|
|
|
user.setKmsId(account.getAccountKmsId());
|