Skip to content

Commit a057b7a

Browse files
runphpgitee-org
authored andcommitted
fix: 改为静态方法, isError和isSuccess方法会被json序列化
isError和isSuccess会被json序列化 `{"error":false,"success":true}` Signed-off-by: runphp <runphp@qq.com>
1 parent 0e4a1c8 commit a057b7a

File tree

1 file changed

+4
-4
lines changed
  • ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain

1 file changed

+4
-4
lines changed

ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ public void setData(T data)
103103
this.data = data;
104104
}
105105

106-
public Boolean isError()
106+
public static <T> Boolean isError(R<T> ret)
107107
{
108-
return !isSuccess();
108+
return !isSuccess(ret);
109109
}
110110

111-
public Boolean isSuccess()
111+
public static <T> Boolean isSuccess(R<T> ret)
112112
{
113-
return R.SUCCESS == getCode();
113+
return R.SUCCESS == ret.getCode();
114114
}
115115
}

0 commit comments

Comments
 (0)