From b362e5864660045df97f75ad02341be2569c3af6 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 9 Oct 2022 21:16:52 +0800 Subject: [PATCH] R isError and isSuccess static --- .../src/main/java/com/ruoyi/common/core/domain/R.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 c4e10e487..835f68b86 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 @@ -102,13 +102,13 @@ public class R implements Serializable this.data = data; } - public Boolean isError() + public static Boolean isError(R ret) { - return !isSuccess(); + return !isSuccess(ret); } - public Boolean isSuccess() + public static Boolean isSuccess(R ret) { - return R.SUCCESS == getCode(); + return R.SUCCESS == ret.getCode(); } }