From 785c7495c11b76b60aa86545eecc3ec3b870d5a5 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期一, 24 十月 2022 09:43:35 +0800
Subject: [PATCH] Merge remote-tracking branch 'ruoyi-vue/master' into dev

---
 ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java
index 70584c6..1c7b1d8 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java
@@ -75,4 +75,11 @@
         return r;
     }
 
+    public static <T> Boolean isError(R<T> ret) {
+        return !isSuccess(ret);
+    }
+
+    public static <T> Boolean isSuccess(R<T> ret) {
+        return R.SUCCESS == ret.getCode();
+    }
 }

--
Gitblit v1.9.3