package com.xiaowei.bean;
import java.util.HashMap;
import java.util.Map;
/**
*
* @author Mr.XIAO
*
*/
public class Msg {
private Integer code;
private String msg;
private Map<String, Object> extend = new HashMap<String, Object>();
// 发送成功方法
public static Msg success() {
Msg msg = new Msg();
msg.code = 100;
msg.msg = "处理成功!";
return msg;
}
// 发送失败方法
public static Msg error() {
Msg msg = new Msg();
msg.code = 200;
msg.msg = "处理失败!";
return msg;
}
// 可以链式操作
public Msg add(String key, Object value) {
this.getExtend().put(key, value);
return this;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Map<String, Object> getExtend() {
return extend;
}
public void setExtend(Map<String, Object> extend) {
this.extend = extend;
}
}
最近下载更多
2398164158 LV3
2023年9月24日
李亮 LV19
2023年3月6日
543666826 LV34
2021年11月19日
erw234 LV2
2021年11月8日
level LV5
2021年6月10日
小红猪仔 LV4
2021年4月30日
jiugeshidatui LV2
2020年12月19日
qazzaq123 LV20
2020年11月23日
liang_sen LV7
2020年10月9日
离沫Winner LV1
2020年7月28日
最近浏览更多
vincemokea LV9
4月30日
WBelong LV8
2024年4月2日
2398164158 LV3
2023年9月24日
siximu912 LV10
2023年7月14日
gecongkai LV8
2023年6月22日
6389181 LV7
2023年6月14日
微信网友_6260196253601792 LV7
2023年6月8日
25702204 LV1
2023年5月24日
shu1234
2023年5月22日
暂无贡献等级
yeyuuu LV6
2023年5月18日

