From 00ba09faae466ec256d4eb3bfa5ab028aaa61d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E5=90=8C=E5=AD=A6?= Date: Tue, 28 Oct 2025 13:44:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(activate):=20=E5=A4=84=E7=90=86=E8=AE=B8?= =?UTF-8?q?=E5=8F=AF=E6=96=87=E4=BB=B6=E8=AF=BB=E5=8F=96=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gather/tool/active/controller/ActivateController.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/activate-tool/src/main/java/com/njcn/gather/tool/active/controller/ActivateController.java b/tools/activate-tool/src/main/java/com/njcn/gather/tool/active/controller/ActivateController.java index 630ff5a5..030154f5 100644 --- a/tools/activate-tool/src/main/java/com/njcn/gather/tool/active/controller/ActivateController.java +++ b/tools/activate-tool/src/main/java/com/njcn/gather/tool/active/controller/ActivateController.java @@ -6,6 +6,7 @@ import cn.hutool.json.JSONUtil; import com.njcn.common.pojo.annotation.OperateInfo; import com.njcn.common.pojo.enums.common.LogEnum; import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.LogUtil; import com.njcn.gather.tool.active.service.ActivateService; @@ -57,7 +58,12 @@ public class ActivateController extends BaseController { public HttpResult getLicense() { String methodDescribe = getMethodDescribe("checkLicense"); LogUtil.njcnDebug(log, "{},获取许可信息", methodDescribe); - ActivationCodePlaintext activationCodePlaintext = activateService.readLicenseFile(); + ActivationCodePlaintext activationCodePlaintext = null; + try { + activationCodePlaintext = activateService.readLicenseFile(); + } catch (BusinessException e) { + methodDescribe = "无效的许可信息"; + } String macAddress = NetUtil.getLocalMacAddress(); if (activationCodePlaintext == null) { activationCodePlaintext = new ActivationCodePlaintext();