fix(activate): 处理许可文件读取异常
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user