From 11de8aa17bdcedc2063fa5a527fb06754c4dad56 Mon Sep 17 00:00:00 2001 From: taest <876239615@qq.com> Date: Thu, 22 Sep 2022 01:21:17 +0000 Subject: [PATCH] =?UTF-8?q?AjaxResult=E4=B8=ADisError=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: taest <876239615@qq.com> --- .../java/com/ruoyi/common/core/web/domain/AjaxResult.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java index 814b0c2..37df18d 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java @@ -154,7 +154,7 @@ public class AjaxResult extends HashMap */ public boolean isSuccess() { - return !isError(); + return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG)); } /** @@ -164,7 +164,7 @@ public class AjaxResult extends HashMap */ public boolean isError() { - return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG)); + return !isSuccess(); } /**