hjl
2024-06-18 aaa3384609da2dfb7d6788a2a2b3d92a2bff0813
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
package com.ruoyi.common.core.domain;
 
import com.ruoyi.common.core.enums.CodeEnum;
 
import java.io.Serializable;
 
public class Result<T> implements Serializable {
    private T datas;
    private Integer resp_code;
    private String resp_msg;
 
    public static <T> Result<T> succeed(String msg) {
        return of(null, CodeEnum.SUCCESS.getCode(), msg);
    }
 
    public static <T> Result<T> succeed(T model, String msg) {
        return of(model, CodeEnum.SUCCESS.getCode(), msg);
    }
 
    public static <T> Result<T> succeed(T model) {
        return of(model, CodeEnum.SUCCESS.getCode(), "SUCCESS");
    }
 
    public static <T> Result<T> of(T datas, Integer code, String msg) {
        return new Result(datas, code, msg);
    }
 
    public static <T> Result<T> failed(String msg) {
        return of(null, CodeEnum.ERROR.getCode(), msg);
    }
 
    public static <T> Result<T> failed(T model, String msg) {
        return of(model, CodeEnum.ERROR.getCode(), msg);
    }
 
    public T getDatas() {
        return this.datas;
    }
 
    public Integer getResp_code() {
        return this.resp_code;
    }
 
    public String getResp_msg() {
        return this.resp_msg;
    }
 
    public void setDatas(T datas) {
        this.datas = datas;
    }
 
    public void setResp_code(Integer resp_code) {
        this.resp_code = resp_code;
    }
 
    public void setResp_msg(String resp_msg) {
        this.resp_msg = resp_msg;
    }
 
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof Result)) {
            return false;
        } else {
            Result<?> other = (Result) o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label47:
                {
                    Object this$resp_code = this.getResp_code();
                    Object other$resp_code = other.getResp_code();
                    if (this$resp_code == null) {
                        if (other$resp_code == null) {
                            break label47;
                        }
                    } else if (this$resp_code.equals(other$resp_code)) {
                        break label47;
                    }
 
                    return false;
                }
 
                Object this$datas = this.getDatas();
                Object other$datas = other.getDatas();
                if (this$datas == null) {
                    if (other$datas != null) {
                        return false;
                    }
                } else if (!this$datas.equals(other$datas)) {
                    return false;
                }
 
                Object this$resp_msg = this.getResp_msg();
                Object other$resp_msg = other.getResp_msg();
                if (this$resp_msg == null) {
                    if (other$resp_msg != null) {
                        return false;
                    }
                } else if (!this$resp_msg.equals(other$resp_msg)) {
                    return false;
                }
 
                return true;
            }
        }
    }
 
    protected boolean canEqual(Object other) {
        return other instanceof Result;
    }
 
    public int hashCode() {
        int result = 1;
        Object $resp_code = this.getResp_code();
        result = result * 59 + ($resp_code == null ? 43 : $resp_code.hashCode());
        Object $datas = this.getDatas();
        result = result * 59 + ($datas == null ? 43 : $datas.hashCode());
        Object $resp_msg = this.getResp_msg();
        result = result * 59 + ($resp_msg == null ? 43 : $resp_msg.hashCode());
        return result;
    }
 
    public String toString() {
        return "Result(datas=" + this.getDatas() + ", resp_code=" + this.getResp_code() + ", resp_msg=" + this.getResp_msg() + ")";
    }
 
    public Result() {
    }
 
    public Result(T datas, Integer resp_code, String resp_msg) {
        this.datas = datas;
        this.resp_code = resp_code;
        this.resp_msg = resp_msg;
    }
}