diff --git a/pom.xml b/pom.xml index 1ba56af3..c8b41b20 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ 2.1.1 - 2.3.10.RELEASE + 2.3.11.RELEASE UTF-8 UTF-8 1.8 @@ -26,7 +26,7 @@ 4.1.2 1.7 0.9.1 - 3.4.2 + 3.4.3 5.5.8 2.2.6.RELEASE 11.0 diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PagePlus.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PagePlus.java index 2bffe305..812a683d 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PagePlus.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PagePlus.java @@ -123,15 +123,27 @@ public class PagePlus implements IPage { return this.optimizeCountSql; } - @Override - public boolean isSearchCount() { - return this.total >= 0L && this.isSearchCount; - } + @Override + public long getPages() { + // 解决 github issues/3208 + return IPage.super.getPages(); + } - public PagePlus setSearchCount(boolean isSearchCount) { - this.isSearchCount = isSearchCount; - return this; - } + public static PagePlus of(long current, long size) { + return of(current, size, 0); + } + + public static PagePlus of(long current, long size, long total) { + return of(current, size, total, true); + } + + public static PagePlus of(long current, long size, boolean searchCount) { + return of(current, size, 0, searchCount); + } + + public static PagePlus of(long current, long size, long total, boolean searchCount) { + return new PagePlus<>(current, size, total, searchCount); + } }