| | |
| | | /**
|
| | | * 返回错误消息
|
| | | *
|
| | | * @return
|
| | | * @return 错误消息
|
| | | */
|
| | | public static AjaxResult error()
|
| | | {
|
| | |
| | | * 返回错误消息
|
| | | *
|
| | | * @param msg 返回内容
|
| | | * @return 警告消息
|
| | | * @return 错误消息
|
| | | */
|
| | | public static AjaxResult error(String msg)
|
| | | {
|
| | |
| | | *
|
| | | * @param msg 返回内容
|
| | | * @param data 数据对象
|
| | | * @return 警告消息
|
| | | * @return 错误消息
|
| | | */
|
| | | public static AjaxResult error(String msg, Object data)
|
| | | {
|
| | |
| | | *
|
| | | * @param code 状态码
|
| | | * @param msg 返回内容
|
| | | * @return 警告消息
|
| | | * @return 错误消息
|
| | | */
|
| | | public static AjaxResult error(int code, String msg)
|
| | | {
|
| | |
| | | */
|
| | | public boolean isSuccess()
|
| | | {
|
| | | return !isError();
|
| | | return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 是否为警告消息
|
| | | *
|
| | | * @return 结果
|
| | | */
|
| | | public boolean isWarn()
|
| | | {
|
| | | return Objects.equals(HttpStatus.WARN, this.get(CODE_TAG));
|
| | | }
|
| | |
|
| | | /**
|