From 39fe3d30d128dd3b93c0e82d444063f290910f3c Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Fri, 15 Mar 2024 09:29:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E6=B3=95=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plusone/commons/util/PagingAndSortingQueryParams.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/PagingAndSortingQueryParams.java b/src/main/java/xyz/zhouxy/plusone/commons/util/PagingAndSortingQueryParams.java index 149af29..0a12e18 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/PagingAndSortingQueryParams.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/PagingAndSortingQueryParams.java @@ -43,6 +43,8 @@ import xyz.zhouxy.plusone.commons.annotation.Virtual; */ public class PagingAndSortingQueryParams { + // TODO 【优化】 优化该工具,使之支持分别按照多个不同列的递增或递减排序。 + private static final int DEFAULT_PAGE_SIZE = 15; private int size; @@ -96,7 +98,7 @@ public class PagingAndSortingQueryParams { } public final void setSize(@Nullable Integer size) { - this.size = size != null ? size : getDefaultSize(); + this.size = size != null ? size : defaultSizeInternal(); } public final void setPageNum(@Nullable Long pageNum) { @@ -106,7 +108,7 @@ public class PagingAndSortingQueryParams { // Setters end @Virtual - protected int getDefaultSize() { + protected int defaultSizeInternal() { return DEFAULT_PAGE_SIZE; }