package com.whyc.dto;
|
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiResponse;
|
import springfox.documentation.annotations.ApiIgnore;
|
|
import java.io.Serializable;
|
|
/**
|
* 接口数据响应对象
|
*/
|
@ApiModel
|
public class Response<T> implements Serializable {
|
|
private Integer code;
|
@ApiModelProperty
|
private T data;
|
private String msg;
|
|
public Response<T> setCode(Integer code) {
|
this.code = code;
|
return this;
|
}
|
|
public Response<T> setData(T data) {
|
this.data = data;
|
return this;
|
}
|
|
public Response<T> set(Integer code,T data) {
|
this.code = code;
|
this.data = data;
|
return this;
|
}
|
|
public Response<T> set(Integer code,T data,String msg) {
|
this.code = code;
|
this.data = data;
|
this.msg = msg;
|
return this;
|
}
|
|
public Response<T> set(Integer code) {
|
this.code = code;
|
return this;
|
}
|
|
public Integer getCode() {
|
return code;
|
}
|
|
public T getData() {
|
return data;
|
}
|
|
public String getMsg() {
|
return msg;
|
}
|
|
public void setMsg(String msg) {
|
this.msg = msg;
|
}
|
}
|