提交 | 用户 | age
|
b8f5f5
|
1 |
package com.hz.util.http.dto; |
C |
2 |
|
|
3 |
/** |
|
4 |
* 请求返回统一dto |
|
5 |
*/ |
|
6 |
public class HttpHzResponse { |
|
7 |
|
|
8 |
/**请求状态*/ |
|
9 |
private String code; |
|
10 |
/**错误信息*/ |
|
11 |
private String msg; |
|
12 |
/**返回信息*/ |
|
13 |
private String data; |
|
14 |
|
fa1ffd
|
15 |
/**请求返回状态-成功*/ |
b5bfe5
|
16 |
public static final String CODE_200 = "200"; |
fa1ffd
|
17 |
/**请求返回状态-成功*/ |
C |
18 |
public static final String CODE_201 = "201"; |
b5bfe5
|
19 |
|
c5817f
|
20 |
/**封装校验请求码方法*/ |
C |
21 |
public boolean checkRequesCode(){ |
|
22 |
if(CODE_200.equals(code) || CODE_201.equals(code)){ |
|
23 |
return true; |
|
24 |
} |
|
25 |
return false; |
|
26 |
} |
|
27 |
|
b8f5f5
|
28 |
public String getCode() { |
C |
29 |
return code; |
|
30 |
} |
|
31 |
|
|
32 |
public void setCode(String code) { |
|
33 |
this.code = code; |
|
34 |
} |
|
35 |
|
|
36 |
public String getMsg() { |
|
37 |
return msg; |
|
38 |
} |
|
39 |
|
|
40 |
public void setMsg(String msg) { |
|
41 |
this.msg = msg; |
|
42 |
} |
|
43 |
|
|
44 |
public String getData() { |
|
45 |
return data; |
|
46 |
} |
|
47 |
|
|
48 |
public void setData(String data) { |
|
49 |
this.data = data; |
|
50 |
} |
|
51 |
} |