update /ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java.

isSuccess和isError逻辑修改:
只有状态码为成功的才是success,其他均为error

Signed-off-by: 王显锋 <wang-xianfeng@qq.com>
This commit is contained in:
王显锋 2022-09-05 08:21:40 +00:00 committed by Gitee
parent afa23c2111
commit b25e109a51
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public boolean isSuccess()
{
return !isError();
return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG));
}
/**
@ -164,7 +164,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public boolean isError()
{
return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG));
return !isSuccess();
}
/**