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) {