jiazx0107@163.com
2023-05-17 620eab6cca2bc9ef9ea6d3067a0a5ba1deadbd1c
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
package com.ld.igds.three.data;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
 
import java.io.Serializable;
import java.util.Date;
 
/**
 * 三维接口响应参数定义
 *
 * @author chen
 * @param <T>
 */
@Data
public class ThreeResponse<T> implements Serializable {
 
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
 
    /**
     * 响应编码
     */
    private String code;
 
    /**
     * 响应信息
     */
    private String msg;
 
    /**
     * 签名
     */
    private String sign;
 
    /**
     * 自由编码
     */
    private String outId;
 
    /**
     * 响应时间(yyyy-MM-dd HH:mm:ss)
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date resDate;
 
    /**
     * 业务数据
     */
    private T data;
 
    public ThreeResponse() {
        super();
    }
 
    public ThreeResponse(String code, String msg) {
        this.code = code;
        this.msg = msg;
        this.resDate = new Date();
    }
 
    public ThreeResponse(String code, String msg, String sign, String outId) {
        this.code = code;
        this.msg = msg;
        this.sign = sign;
        this.outId = outId;
        this.resDate = new Date();
    }
 
    public ThreeResponse(String code, String msg, String sign, String outId, T data) {
        this.code = code;
        this.msg = msg;
        this.sign = sign;
        this.outId = outId;
        this.resDate = new Date();
        this.data = data;
    }
}