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;
|
}
|
}
|