!258 fix: 改为静态方法, isError和isSuccess方法会被json序列化

Merge pull request !258 from runphp/N/A
pull/115/MERGE
若依 2 years ago committed by Gitee
commit 48a0d5bc9d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -103,13 +103,13 @@ public class R<T> implements Serializable
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();
}
}

Loading…
Cancel
Save