From 1dfeae6a031d07f90280ef9c2561130803543299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=9A=E5=B1=BF?= <1491182878@qq.com> Date: Thu, 24 Jun 2021 00:27:37 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A5=E5=BF=97=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=8F=96=E6=B6=88=E5=AD=97=E6=AE=B5=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/common/core/page/PageDomain.java | 164 +++++++++--------- 1 file changed, 83 insertions(+), 81 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java index 119b385f..40a97326 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java @@ -1,81 +1,83 @@ -package com.ruoyi.common.core.page; - -import com.ruoyi.common.utils.StringUtils; - -/** - * 分页数据 - * - * @author ruoyi - */ -public class PageDomain -{ - /** 当前记录起始索引 */ - private Integer pageNum; - - /** 每页显示记录数 */ - private Integer pageSize; - - /** 排序列 */ - private String orderByColumn; - - /** 排序的方向desc或者asc */ - private String isAsc = "asc"; - - public String getOrderBy() - { - if (StringUtils.isEmpty(orderByColumn)) - { - return ""; - } - return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc; - } - - public Integer getPageNum() - { - return pageNum; - } - - public void setPageNum(Integer pageNum) - { - this.pageNum = pageNum; - } - - public Integer getPageSize() - { - return pageSize; - } - - public void setPageSize(Integer pageSize) - { - this.pageSize = pageSize; - } - - public String getOrderByColumn() - { - return orderByColumn; - } - - public void setOrderByColumn(String orderByColumn) - { - this.orderByColumn = orderByColumn; - } - - public String getIsAsc() - { - return isAsc; - } - - public void setIsAsc(String isAsc) - { - // 兼容前端排序类型 - if ("ascending".equals(isAsc)) - { - isAsc = "asc"; - } - else if ("descending".equals(isAsc)) - { - isAsc = "desc"; - } - this.isAsc = isAsc; - } -} +package com.ruoyi.common.core.page; + +import com.ruoyi.common.utils.StringUtils; + +/** + * 分页数据 + * + * @author ruoyi + */ +public class PageDomain +{ + /** 当前记录起始索引 */ + private Integer pageNum; + + /** 每页显示记录数 */ + private Integer pageSize; + + /** 排序列 */ + private String orderByColumn; + + /** 排序的方向desc或者asc */ + private String isAsc = "asc"; + + public String getOrderBy() + { + if (StringUtils.isEmpty(orderByColumn)) + { + return ""; + } + return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc; + } + + public Integer getPageNum() + { + return pageNum; + } + + public void setPageNum(Integer pageNum) + { + this.pageNum = pageNum; + } + + public Integer getPageSize() + { + return pageSize; + } + + public void setPageSize(Integer pageSize) + { + this.pageSize = pageSize; + } + + public String getOrderByColumn() + { + return orderByColumn; + } + + public void setOrderByColumn(String orderByColumn) + { + this.orderByColumn = orderByColumn; + } + + public String getIsAsc() + { + return isAsc; + } + + public void setIsAsc(String isAsc) + { + if (StringUtils.isNotEmpty(isAsc)) { + // 兼容前端排序类型 + if ("ascending".equals(isAsc)) + { + isAsc = "asc"; + } + else if ("descending".equals(isAsc)) + { + isAsc = "desc"; + } + this.isAsc = isAsc; + } + } +}