diff --git a/conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java b/conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java index 2c3375d..b7948b0 100644 --- a/conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java +++ b/conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java @@ -645,6 +645,17 @@ public class ConfluxServiceImpl implements ConfluxService { @Override public AjaxResult createNftData(CheckArgs checkArgs) { + if (StringUtils.isEmpty(checkArgs.getAppId()) || StringUtils.isEmpty(checkArgs.getPrivateKey())) { + return AjaxResult.error("参数缺失!"); + } + PrivateKey privateKey = privateKeyService.selectPrivateKeyByAppId(checkArgs.getAppId()); + if (null == privateKey) { + return AjaxResult.error("appId错误!"); + } + String md5Key = Md5Utils.md5Salt(privateKey.getPrivateKey()); + if (!checkArgs.getPrivateKey().equals(md5Key)) { + return AjaxResult.error("privateKey私钥出错!"); + } try { //元数据地址 String directoryPath = nftConfig.getDirectoryPath();