package com.sandu.common.domain;
|
|
import lombok.Data;
|
import lombok.EqualsAndHashCode;
|
|
/**
|
* controller返回json
|
*
|
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
|
* @version 1.0
|
* @website https://www.zhyd.me
|
* @date 2018/4/16 16:26
|
* @since 1.0
|
*/
|
@Data
|
@EqualsAndHashCode(callSuper = false)
|
public class ResponseVO<T> {
|
private Integer code;
|
private String message;
|
private String exception;
|
private Long currentTime;
|
private T data;
|
|
public ResponseVO(Integer code, String message, T data) {
|
this.code = code;
|
this.message = message;
|
this.data = data;
|
this.currentTime = System.currentTimeMillis();
|
}
|
|
public ResponseVO(Integer code, String message, T data, String exception) {
|
this(code, message, data);
|
this.exception = exception;
|
}
|
}
|