R add isError and isSuccess method

This commit is contained in:
RuoYi 2022-09-12 17:22:07 +08:00
parent 87c53a049b
commit f5bec70911
1 changed files with 10 additions and 0 deletions

View File

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