| | |
| | | package com.whyc.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | 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(value = "对象") |
| | | @ApiModelProperty |
| | | private T data; |
| | | |
| | | public Response setCode(Integer code) { |
| | | public Response<T> setCode(Integer code) { |
| | | this.code = code; |
| | | return this; |
| | | } |
| | | |
| | | public Response setData(T data) { |
| | | public Response<T> setData(T data) { |
| | | this.data = data; |
| | | return this; |
| | | } |
| | | |
| | | public Response set(Integer code,T data) { |
| | | public Response<T> set(Integer code,T data) { |
| | | this.code = code; |
| | | this.data = data; |
| | | return this; |
| | |
| | | return code; |
| | | } |
| | | |
| | | public Object getData() { |
| | | public T getData() { |
| | | return data; |
| | | } |
| | | } |