修改分页开始地址
This commit is contained in:
parent
21ed04bac5
commit
727d347c71
|
|
@ -13,7 +13,7 @@ public class PageInfo <T> implements Serializable {
|
||||||
this.pageIndex = page ;
|
this.pageIndex = page ;
|
||||||
|
|
||||||
// 计算分页数据
|
// 计算分页数据
|
||||||
int fromIndex = page * pageSize; // 起始索引
|
int fromIndex = (page - 1) * pageSize; // 起始索引
|
||||||
int toIndex = Math.min(fromIndex + pageSize, total); // 结束索引
|
int toIndex = Math.min(fromIndex + pageSize, total); // 结束索引
|
||||||
|
|
||||||
// 检查页码是否超出范围
|
// 检查页码是否超出范围
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue