From 552a75399aa5296858e79007cce15aa3e9b7c442 Mon Sep 17 00:00:00 2001 From: fxbin Date: Wed, 5 Apr 2023 22:40:20 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BC=98=E5=8C=96=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bubble/fireworks/core/model/PageResult.java | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/bubble-fireworks-project/bubble-fireworks-core/src/main/java/cn/fxbin/bubble/fireworks/core/model/PageResult.java b/bubble-fireworks-project/bubble-fireworks-core/src/main/java/cn/fxbin/bubble/fireworks/core/model/PageResult.java index 56723ea0..df6f6c17 100644 --- a/bubble-fireworks-project/bubble-fireworks-core/src/main/java/cn/fxbin/bubble/fireworks/core/model/PageResult.java +++ b/bubble-fireworks-project/bubble-fireworks-core/src/main/java/cn/fxbin/bubble/fireworks/core/model/PageResult.java @@ -77,21 +77,7 @@ public PageResult setPageSize(Long pageSize) { } public PageResult compute(Integer pageSize, Integer pageNo, Long total) { - this.pageSize = Long.valueOf(pageSize); - this.pageNo = Long.valueOf(pageNo); - if (total > 0) { - this.total = total; - - if (total % this.pageSize > 0) { - this.totalPage = (total / this.pageSize) + 1; - } else { - this.totalPage = (total / this.pageSize); - } - } else { - this.totalPage = 0L; - this.total = 0L; - } - return this; + return this.compute(pageSize.longValue(), pageNo.longValue(), total); } public PageResult compute(Long pageSize, Long pageNo, Long total) {