| | |
| | | package com.ruoyi.common.core.domain; |
| | | |
| | | import cn.hutool.core.lang.Validator; |
| | | import cn.hutool.http.HttpStatus; |
| | | |
| | | import java.util.HashMap; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | |
| | | /** |
| | | * 操作消息提醒 |
| | |
| | | { |
| | | super.put(CODE_TAG, code); |
| | | super.put(MSG_TAG, msg); |
| | | if (StringUtils.isNotNull(data)) |
| | | if (Validator.isNotNull(data)) |
| | | { |
| | | super.put(DATA_TAG, data); |
| | | } |
| | |
| | | */ |
| | | public static AjaxResult success(String msg, Object data) |
| | | { |
| | | return new AjaxResult(HttpStatus.SUCCESS, msg, data); |
| | | return new AjaxResult(HttpStatus.HTTP_OK, msg, data); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static AjaxResult error(String msg, Object data) |
| | | { |
| | | return new AjaxResult(HttpStatus.ERROR, msg, data); |
| | | return new AjaxResult(HttpStatus.HTTP_INTERNAL_ERROR, msg, data); |
| | | } |
| | | |
| | | /** |