From 39a0e05f87494d6cc84001b0b6d8e534685aaed6 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 21 五月 2021 17:58:01 +0800 Subject: [PATCH] update 请求响应对象 与 分页对象 结构修改 适配接口文档配置 --- ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java | 61 ++++++++++++++++++------------ 1 files changed, 37 insertions(+), 24 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java index 4e71fc1..81c596b 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java @@ -1,5 +1,7 @@ package com.ruoyi.common.core.page; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -9,39 +11,50 @@ /** * 琛ㄦ牸鍒嗛〉鏁版嵁瀵硅薄 - * - * @author ruoyi + * + * @author Lion Li */ @Data @NoArgsConstructor @Accessors(chain = true) -public class TableDataInfo<T> implements Serializable -{ - private static final long serialVersionUID = 1L; +@ApiModel("鍒嗛〉鍝嶅簲瀵硅薄") +public class TableDataInfo<T> implements Serializable { + private static final long serialVersionUID = 1L; - /** 鎬昏褰曟暟 */ - private long total; + /** + * 鎬昏褰曟暟 + */ + @ApiModelProperty("鎬昏褰曟暟") + private long total; - /** 鍒楄〃鏁版嵁 */ - private List<T> rows; + /** + * 鍒楄〃鏁版嵁 + */ + @ApiModelProperty("鍒楄〃鏁版嵁") + private List<T> rows; - /** 娑堟伅鐘舵�佺爜 */ - private int code; + /** + * 娑堟伅鐘舵�佺爜 + */ + @ApiModelProperty("娑堟伅鐘舵�佺爜") + private int code; - /** 娑堟伅鍐呭 */ - private String msg; + /** + * 娑堟伅鍐呭 + */ + @ApiModelProperty("娑堟伅鍐呭") + private String msg; - /** - * 鍒嗛〉 - * - * @param list 鍒楄〃鏁版嵁 - * @param total 鎬昏褰曟暟 - */ - public TableDataInfo(List<T> list, long total) - { - this.rows = list; - this.total = total; - } + /** + * 鍒嗛〉 + * + * @param list 鍒楄〃鏁版嵁 + * @param total 鎬昏褰曟暟 + */ + public TableDataInfo(List<T> list, long total) { + this.rows = list; + this.total = total; + } } -- Gitblit v1.9.3