feat: add isError and isSuccess method

Signed-off-by: runphp <runphp@qq.com>
This commit is contained in:
runphp
2022-09-07 08:52:23 +00:00
committed by Gitee
parent afa23c2111
commit 732071ef58

View File

@@ -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();
}
}