From c33c3de43afabebbc685f0738843a7ac53ae50c5 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 11 五月 2021 17:14:53 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev

---
 ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java |   59 ++++++++++-------------------------------------------------
 1 files changed, 10 insertions(+), 49 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 847685b..72c284f 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,8 @@
 package com.ruoyi.common.core.page;
 
+import lombok.*;
+import lombok.experimental.Accessors;
+
 import java.io.Serializable;
 import java.util.List;
 
@@ -8,7 +11,11 @@
  * 
  * @author ruoyi
  */
-public class TableDataInfo implements Serializable
+
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+public class TableDataInfo<T> implements Serializable
 {
     private static final long serialVersionUID = 1L;
 
@@ -16,7 +23,7 @@
     private long total;
 
     /** 鍒楄〃鏁版嵁 */
-    private List<?> rows;
+    private List<T> rows;
 
     /** 娑堟伅鐘舵�佺爜 */
     private int code;
@@ -25,61 +32,15 @@
     private String msg;
 
     /**
-     * 琛ㄦ牸鏁版嵁瀵硅薄
-     */
-    public TableDataInfo()
-    {
-    }
-
-    /**
      * 鍒嗛〉
      * 
      * @param list 鍒楄〃鏁版嵁
      * @param total 鎬昏褰曟暟
      */
-    public TableDataInfo(List<?> list, int total)
+    public TableDataInfo(List<T> list, int total)
     {
         this.rows = list;
         this.total = total;
     }
 
-    public long getTotal()
-    {
-        return total;
-    }
-
-    public void setTotal(long total)
-    {
-        this.total = total;
-    }
-
-    public List<?> getRows()
-    {
-        return rows;
-    }
-
-    public void setRows(List<?> rows)
-    {
-        this.rows = rows;
-    }
-
-    public int getCode()
-    {
-        return code;
-    }
-
-    public void setCode(int code)
-    {
-        this.code = code;
-    }
-
-    public String getMsg()
-    {
-        return msg;
-    }
-
-    public void setMsg(String msg)
-    {
-        this.msg = msg;
-    }
 }

--
Gitblit v1.9.3