From e748d7c052c9b06f2a2ffe5dbc1cb21babfdbdb4 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 05 七月 2024 10:09:07 +0800
Subject: [PATCH] 添加右键菜单相关语言,对应界面添加客户名称字段,配置标签打印按钮和打印类型下拉框
---
north-glass-erp/src/main/java/com/example/erp/exception/GlobalExceptionHandle.java | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/exception/GlobalExceptionHandle.java b/north-glass-erp/src/main/java/com/example/erp/exception/GlobalExceptionHandle.java
index b7227dc..cba151d 100644
--- a/north-glass-erp/src/main/java/com/example/erp/exception/GlobalExceptionHandle.java
+++ b/north-glass-erp/src/main/java/com/example/erp/exception/GlobalExceptionHandle.java
@@ -9,6 +9,8 @@
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
+import java.util.Arrays;
+
@ControllerAdvice
public class GlobalExceptionHandle {
/**
@@ -20,10 +22,11 @@
return Result.error(se.getCode(),se.getMessage());
}
+ // 鎷︽埅锛氭棤鏉冮檺寮傚父
@ExceptionHandler(NotPermissionException.class)
@ResponseBody
public Result handlerException(NotPermissionException e) {
- return Result.error(Constants.Code_401,"This user has no permission to access this resource");
+ return Result.error(Constants.Code_401,e.getPermission());
}
// 鎷︽埅锛氭湭鐧诲綍寮傚父
--
Gitblit v1.8.0