From ec076c1e0db01fc5e1de4045dffd850cf82632bd Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期六, 29 十月 2022 00:00:00 +0800
Subject: [PATCH] update 优化 单元测试乱码问题 指定运行编码

---
 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