Skip to content

Commit 88621aa

Browse files
author
Stephen.lin
authored
Update Pager.java
修复获取分页总数的算法
1 parent 2bb10c4 commit 88621aa

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/zuicoding/platform/mybatis/pagination

1 file changed

+1
-1
lines changed

src/main/java/com/zuicoding/platform/mybatis/pagination/Pager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void setTotal(int total) {
5656
}
5757

5858
public int getPageTotal() {
59-
pageTotal = (pageTotal % pageSize ) == 0 ? pageTotal / pageSize : (pageTotal / pageSize) + 1;
59+
pageTotal = (total % pageSize ) == 0 ? total / pageSize : (total / pageSize) + 1;
6060
return pageTotal;
6161
}
6262

0 commit comments

Comments
 (0)