HttpResult.java 1.36 KB
Newer Older
liqin's avatar
liqin committed
1
package cn.chnmuseum.party.common.validator;
liqin's avatar
liqin committed
2 3 4

public class HttpResult {
    // 响应的状态码
wzp's avatar
wzp committed
5
    private String resultCode;
liqin's avatar
liqin committed
6 7

    // 响应的响应信息
wzp's avatar
wzp committed
8
    private String message;
liqin's avatar
liqin committed
9 10

    // 响应的响应体
wzp's avatar
wzp committed
11
    private Object data;
liqin's avatar
liqin committed
12 13 14 15

    public HttpResult() {
    }

wzp's avatar
wzp committed
16
    public HttpResult(String resultCode, String message) {
wzp's avatar
wzp committed
17 18
        this.resultCode = resultCode;
        this.message = message;
liqin's avatar
liqin committed
19 20
    }

liqin's avatar
liqin committed
21 22 23 24 25 26
    public HttpResult(String resultCode, String message, Object data) {
        this.resultCode = resultCode;
        this.message = message;
        this.data = data;
    }

wzp's avatar
wzp committed
27
    public HttpResult(String resultCode, Object data) {
wzp's avatar
wzp committed
28 29
        this.resultCode = resultCode;
        this.data = data;
liqin's avatar
liqin committed
30 31
    }

wzp's avatar
wzp committed
32
    public String getResultCode() {
wzp's avatar
wzp committed
33
        return resultCode;
liqin's avatar
liqin committed
34 35
    }

wzp's avatar
wzp committed
36
    public void setResultCode(String resultCode) {
wzp's avatar
wzp committed
37
        this.resultCode = resultCode;
liqin's avatar
liqin committed
38 39
    }

wzp's avatar
wzp committed
40 41
    public String getMessage() {
        return message;
liqin's avatar
liqin committed
42 43
    }

wzp's avatar
wzp committed
44 45
    public void setMessage(String message) {
        this.message = message;
liqin's avatar
liqin committed
46 47
    }

wzp's avatar
wzp committed
48 49
    public Object getData() {
        return data;
liqin's avatar
liqin committed
50 51
    }

wzp's avatar
wzp committed
52 53
    public void setData(Object data) {
        this.data = data;
liqin's avatar
liqin committed
54 55 56 57
    }

    @Override
    public String toString() {
wzp's avatar
wzp committed
58 59 60 61
        return "HttpResult{" +
                "resultCode=" + resultCode +
                ", message='" + message + '\'' +
                ", data=" + data +
liqin's avatar
liqin committed
62 63 64
                '}';
    }
}