|
@@ -1,5 +1,8 @@
|
|
|
package com.ruoyi.common.core.page;
|
|
|
|
|
|
+import lombok.Data;
|
|
|
+import lombok.Setter;
|
|
|
+
|
|
|
import java.io.Serializable;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -8,7 +11,8 @@ import java.util.List;
|
|
|
*
|
|
|
* @author ruoyi
|
|
|
*/
|
|
|
-public class TableDataInfo implements Serializable
|
|
|
+@Data
|
|
|
+public class TableDataInfo<T> implements Serializable
|
|
|
{
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
@@ -16,7 +20,7 @@ public class TableDataInfo implements Serializable
|
|
|
private long total;
|
|
|
|
|
|
/** 列表数据 */
|
|
|
- private List<?> rows;
|
|
|
+ private List<T> rows;
|
|
|
|
|
|
/** 消息状态码 */
|
|
|
private int code;
|
|
@@ -37,7 +41,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;
|
|
@@ -48,38 +52,19 @@ public class TableDataInfo implements Serializable
|
|
|
return total;
|
|
|
}
|
|
|
|
|
|
- public void setTotal(long total)
|
|
|
- {
|
|
|
- this.total = total;
|
|
|
- }
|
|
|
-
|
|
|
- public List<?> getRows()
|
|
|
+ public List<T> 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;
|
|
|
- }
|
|
|
}
|