feat: add isError and isSuccess method

Signed-off-by: runphp <runphp@qq.com>
pull/246/head
runphp 2 years ago committed by Gitee
parent afa23c2111
commit 732071ef58
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -102,4 +102,12 @@ public class R<T> implements Serializable
{
this.data = data;
}
public Boolean isError() {
return !isSuccess();
}
public Boolean isSuccess() {
return R.SUCCESS == getCode();
}
}

Loading…
Cancel
Save