!246 feat: add isError and isSuccess method
Merge pull request !246 from runphp/N/A
This commit is contained in:
commit
11d8274462
@ -102,4 +102,12 @@ public class R<T> implements Serializable
|
|||||||
{
|
{
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean isError() {
|
||||||
|
return !isSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean isSuccess() {
|
||||||
|
return R.SUCCESS == getCode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user