Commit 22cf471b by 王祖波

手动分页修改

parent 8fd76fa1
...@@ -145,6 +145,7 @@ public class ContactFollowServiceImpl implements ContactFollowService { ...@@ -145,6 +145,7 @@ public class ContactFollowServiceImpl implements ContactFollowService {
int totalPage = (int) Math.ceil((double) totalCount / pageSize); int totalPage = (int) Math.ceil((double) totalCount / pageSize);
int fromIndex = Math.max((pageNum - 1) * pageSize, 0); int fromIndex = Math.max((pageNum - 1) * pageSize, 0);
fromIndex = Math.min(fromIndex, list.size());
int toIndex = Math.min(fromIndex + pageSize, totalCount); int toIndex = Math.min(fromIndex + pageSize, totalCount);
toIndex = Math.min(toIndex, list.size()); toIndex = Math.min(toIndex, list.size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment