update 聊天室列表新增返回对象,新增部分swagger注解
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.m2pool.common.core.web.page;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -11,23 +13,29 @@ import java.util.List;
|
||||
* @Author dy
|
||||
*/
|
||||
@Data
|
||||
public class TableDataInfo implements Serializable
|
||||
@ApiModel(description = "分页返回对象")
|
||||
public class TableDataInfo<T> implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 总记录数 */
|
||||
@ApiModelProperty(value = "总记录数", example = "1")
|
||||
private long total;
|
||||
|
||||
/** 总页数 */
|
||||
@ApiModelProperty(value = "总页数", example = "1")
|
||||
private long totalPage;
|
||||
|
||||
/** 列表数据 */
|
||||
private List<?> rows;
|
||||
@ApiModelProperty(value = "查询结果集合")
|
||||
private List<T> rows;
|
||||
|
||||
/** 消息状态码 */
|
||||
@ApiModelProperty(value = "消息状态码", example = "200")
|
||||
private int code;
|
||||
|
||||
/** 消息内容 */
|
||||
@ApiModelProperty(value = "查询结果描述", example = "成功")
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
@@ -43,7 +51,7 @@ public class TableDataInfo implements Serializable
|
||||
* @param list 列表数据
|
||||
* @param total 总记录数
|
||||
*/
|
||||
public TableDataInfo(List<?> list, int total)
|
||||
public TableDataInfo(List<T> list, int total)
|
||||
{
|
||||
this.rows = list;
|
||||
this.total = total;
|
||||
|
||||
@@ -18,6 +18,8 @@ public class SwaggerWebConfiguration implements WebMvcConfigurer {
|
||||
/** swagger-ui 地址 */
|
||||
registry.addResourceHandler("/swagger-ui/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/");
|
||||
registry.addResourceHandler("/doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user