ResponseVo.java
1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.lhcredit.framework.web.domain;
import com.lhcredit.common.constant.WebStatusEnum;
import java.io.Serializable;
/**
* Json模型
*
* @author LGJ
*/
public class ResponseVo implements Serializable {
private static final long serialVersionUID = -2942787198846252437L;
private String code = "";//状态码
private String msg = "";// 提示信息
private Object data = null;// 数据
public ResponseVo() {
super();
}
public ResponseVo(String code, String msg, Object data) {
super();
this.code = code;
this.msg = msg;
this.data = data;
}
@Override
public String toString() {
return "ResponseVo [code=" + code + ", msg=" + msg + ", data=" + data + "]";
}
public ResponseVo(WebStatusEnum webStatusEnum, Object data) {
super();
this.data = data;
this.msg = webStatusEnum.getMsg();
this.code = webStatusEnum.getCode();
}
public String getCode() {
return code;
}
public void setCode(String 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;
}
}