From 08021fc14cf4cc5988cec72cef5fa48f0271d5a2 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期一, 28 四月 2025 18:14:03 +0800
Subject: [PATCH] 大屏修改
---
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/GlobalException.java | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/GlobalException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/GlobalException.java
index 278b195..3aedecf 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/GlobalException.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/GlobalException.java
@@ -14,6 +14,11 @@
private String message;
/**
+ * 错误码
+ */
+ private Integer code;
+
+ /**
* 错误明细,内部调试错误
* <p>
* 和 {@link CommonResult#getDetailMessage()} 一致的设计
@@ -26,8 +31,17 @@
public GlobalException() {
}
+ public GlobalException(Integer code) {
+ this.code = code;
+ }
+
public GlobalException(String message) {
this.message = message;
+ }
+
+ public GlobalException(String message, Integer code) {
+ this.message = message;
+ this.code = code;
}
public String getDetailMessage() {
@@ -48,4 +62,12 @@
this.message = message;
return this;
}
+
+ public Integer getCode() {
+ return code;
+ }
+
+ public void setCode(Integer code) {
+ this.code = code;
+ }
}
\ No newline at end of file
--
Gitblit v1.7.1