修复获取分页总数异常
This commit is contained in:
@@ -7,6 +7,7 @@ import xtools.core.extend.PagingUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* <p>Title : PageResp</p>
|
||||
@@ -81,6 +82,9 @@ public final class PageResp<T> implements Serializable {
|
||||
* @return 总页数
|
||||
*/
|
||||
public Long getPageCount() {
|
||||
return PagingUtils.getLastPage(this.total, this.pageSize);
|
||||
if (Objects.isNull(this.pageCount)) {
|
||||
this.pageCount = PagingUtils.getLastPage(this.total, this.pageSize);
|
||||
}
|
||||
return this.pageCount;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user