mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2025-09-03 03:07:55 +00:00
feat: add isError and isSuccess method
Signed-off-by: runphp <runphp@qq.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user