Skip to content

Commit

Permalink
!258 fix: 改为静态方法, isError和isSuccess方法会被json序列化
Browse files Browse the repository at this point in the history
Merge pull request !258 from runphp/N/A
  • Loading branch information
yangzongzhuan authored and gitee-org committed Sep 30, 2022
2 parents 0e4a1c8 + a057b7a commit 48a0d5b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ public void setData(T data)
this.data = data;
}

public Boolean isError()
public static <T> Boolean isError(R<T> ret)
{
return !isSuccess();
return !isSuccess(ret);
}

public Boolean isSuccess()
public static <T> Boolean isSuccess(R<T> ret)
{
return R.SUCCESS == getCode();
return R.SUCCESS == ret.getCode();
}
}

0 comments on commit 48a0d5b

Please sign in to comment.