|
|
|
@ -1,8 +1,6 @@
|
|
|
|
|
package com.ruoyi.common.core.domain;
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
|
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -14,10 +12,13 @@ public class AjaxResult extends HashMap<String, Object>
|
|
|
|
|
{
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
|
|
|
|
/** 状态码 */
|
|
|
|
|
public static final String CODE_TAG = "code";
|
|
|
|
|
|
|
|
|
|
/** 返回内容 */
|
|
|
|
|
public static final String MSG_TAG = "msg";
|
|
|
|
|
|
|
|
|
|
/** 数据对象 */
|
|
|
|
|
public static final String DATA_TAG = "data";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -44,18 +45,6 @@ public class AjaxResult extends HashMap<String, Object>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 状态类型 */
|
|
|
|
|
private Type type;
|
|
|
|
|
|
|
|
|
|
/** 状态码 */
|
|
|
|
|
private int code;
|
|
|
|
|
|
|
|
|
|
/** 返回内容 */
|
|
|
|
|
private String msg;
|
|
|
|
|
|
|
|
|
|
/** 数据对象 */
|
|
|
|
|
private Object data;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
|
|
|
|
|
*/
|
|
|
|
@ -190,53 +179,4 @@ public class AjaxResult extends HashMap<String, Object>
|
|
|
|
|
{
|
|
|
|
|
return new AjaxResult(Type.ERROR, msg, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Type getType()
|
|
|
|
|
{
|
|
|
|
|
return type;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setType(Type type)
|
|
|
|
|
{
|
|
|
|
|
this.type = type;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getCode()
|
|
|
|
|
{
|
|
|
|
|
return code;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setCode(int code)
|
|
|
|
|
{
|
|
|
|
|
this.code = code;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getMsg()
|
|
|
|
|
{
|
|
|
|
|
return msg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setMsg(String msg)
|
|
|
|
|
{
|
|
|
|
|
this.msg = msg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Object getData()
|
|
|
|
|
{
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setData(Object data)
|
|
|
|
|
{
|
|
|
|
|
this.data = data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String toString() {
|
|
|
|
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
|
|
|
.append("code", getCode())
|
|
|
|
|
.append("msg", getMsg())
|
|
|
|
|
.append("data", getData())
|
|
|
|
|
.toString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|