diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/controller/BaseController.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/controller/BaseController.java index 609238e8..12a77f2b 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/controller/BaseController.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/controller/BaseController.java @@ -59,14 +59,13 @@ public class BaseController /** * 响应请求分页数据 */ - @SuppressWarnings({ "rawtypes", "unchecked" }) - protected TableDataInfo getDataTable(List list) + protected TableDataInfo getDataTable(List list) { - TableDataInfo rspData = new TableDataInfo(); + TableDataInfo rspData = new TableDataInfo<>(); rspData.setCode(HttpStatus.SUCCESS); rspData.setRows(list); rspData.setMsg("查询成功"); - rspData.setTotal(new PageInfo(list).getTotal()); + rspData.setTotal(new PageInfo<>(list).getTotal()); return rspData; } diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/TableDataInfo.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/TableDataInfo.java index 41dc0fe7..d323c1b3 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/TableDataInfo.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/TableDataInfo.java @@ -8,7 +8,7 @@ import java.util.List; * * @author ruoyi */ -public class TableDataInfo implements Serializable +public class TableDataInfo implements Serializable { private static final long serialVersionUID = 1L; @@ -16,7 +16,7 @@ public class TableDataInfo implements Serializable private long total; /** 列表数据 */ - private List rows; + private List rows; /** 消息状态码 */ private int code; @@ -37,7 +37,7 @@ public class TableDataInfo implements Serializable * @param list 列表数据 * @param total 总记录数 */ - public TableDataInfo(List list, int total) + public TableDataInfo(List list, int total) { this.rows = list; this.total = total; @@ -53,12 +53,12 @@ public class TableDataInfo implements Serializable this.total = total; } - public List getRows() + public List getRows() { return rows; } - public void setRows(List rows) + public void setRows(List rows) { this.rows = rows; }