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..e215aecc 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 @@ -16,7 +16,7 @@ import com.ruoyi.common.core.web.page.TableDataInfo; /** * web层通用数据处理 - * + * * @author ruoyi */ public class BaseController @@ -60,9 +60,9 @@ 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("查询成功"); @@ -72,7 +72,7 @@ public class BaseController /** * 响应返回结果 - * + * * @param rows 影响行数 * @return 操作结果 */ @@ -83,7 +83,7 @@ public class BaseController /** * 响应返回结果 - * + * * @param result 结果 * @return 操作结果 */ 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..9e62ff24 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 @@ -5,10 +5,10 @@ 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; @@ -33,11 +33,11 @@ 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; } @@ -82,4 +82,4 @@ public class TableDataInfo implements Serializable { this.msg = msg; } -} \ No newline at end of file +}