mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-02-05 00:11:57 +08:00
!246 feat: add isError and isSuccess method
Merge pull request !246 from runphp/N/A
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