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 c3df6aef..d8774609 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,4 +102,14 @@ public class R implements Serializable { this.data = data; } + + public Boolean isError() + { + return !isSuccess(); + } + + public Boolean isSuccess() + { + return R.SUCCESS == getCode(); + } }