自动化立体仓库 - WMS系统
1
zhangc
7 天以前 cbbc882e4f93d87d91c1734901a7fc2ca0399774
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
package com.zy.asrs.task.core;
 
import java.io.Serializable;
 
/**
 * Created by vincent on 2020/7/7
 */
public class ReturnT<T> implements Serializable {
 
    public static final long serialVersionUID = 42L;
    public static final int SUCCESS_CODE = 200;
    public static final int FAIL_CODE = 500;
    private int code;
    private String msg;
    private T content;
 
    public ReturnT() {
    }
 
    public ReturnT(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
 
    public ReturnT(T content) {
        this.code = 200;
        this.content = content;
    }
 
    public boolean isSuccess(){
        return this.code == 200;
    }
 
    public int getCode() {
        return this.code;
    }
 
    public ReturnT<T> setCode(int code) {
        this.code = code;
        return this;
    }
 
    public String getMsg() {
        return this.msg;
    }
 
    public ReturnT<T> setMsg(String msg) {
        this.msg = msg;
        return this;
    }
 
    public T getContent() {
        return this.content;
    }
 
    public ReturnT<T> setContent(T content) {
        this.content = content;
        return this;
    }
 
    public String toString() {
        return "ReturnT [code=" + this.code + ", msg=" + this.msg + ", content=" + this.content + "]";
    }
 
}