aa52e24a779a669ffe999e08ecab2e2286652508.svn-base
1.81 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package com.phxl.common.utils;
/**
* api通用状态返回
*
* @author Pxie
*/
public class ReturnCode {
/**
* 未登录
*/
public final static int UNLOGIN = -1;
/**
* 成功
*/
public final static int SUCCESS = 1;
/**
* 后端提醒
*/
public final static int WARN = 2;
/**
* 系统错误
*/
public final static int ERROR = 500;
/**
* 登录超时
*/
public final static int TOKEN_OUT = 4;
/**
* 加密签名错误
*/
public final static int SIGN_ERROR = 5;
public final static String SUCCESSMSG = "success";
public final static String FAILMSG = "fail";
public final static String PARAMETERERROR = "参数缺少或者不对";
private Integer ret = 1;
private String msg = "success";
private Object data;
public ReturnCode() {
}
public ReturnCode(int ret) {
this.ret = ret;
}
public ReturnCode(int ret, Object o) {
this.ret = ret;
data = o;
}
public ReturnCode(int ret, String msg) {
this.ret = ret;
this.msg = msg;
}
public ReturnCode(int ret, Object data, int act) {
this.ret = ret;
this.data = data;
}
public ReturnCode(int ret, int act) {
super();
this.ret = ret;
}
public ReturnCode(int ret, String msg, Object data) {
this.ret = ret;
this.msg = msg;
this.data = data;
}
public Integer getRet() {
return ret;
}
public void setRet(Integer ret) {
this.ret = ret;
}
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;
}
}