From 6146d63f2c8ad4df70c77fe27d28351e706faf56 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 25 Jun 2021 17:40:05 +0800 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 --- .../common/core/web/page/PageDomain.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/PageDomain.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/PageDomain.java index e681c672b..e97b4e556 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/PageDomain.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/PageDomain.java @@ -67,15 +67,18 @@ public class PageDomain public void setIsAsc(String isAsc) { - // 兼容前端排序类型 - if ("ascending".equals(isAsc)) + if (StringUtils.isNotEmpty(isAsc)) { - isAsc = "asc"; + // 兼容前端排序类型 + if ("ascending".equals(isAsc)) + { + isAsc = "asc"; + } + else if ("descending".equals(isAsc)) + { + isAsc = "desc"; + } + this.isAsc = isAsc; } - else if ("descending".equals(isAsc)) - { - isAsc = "desc"; - } - this.isAsc = isAsc; } }