Commit 0bcbacc7 authored by 赵啸非's avatar 赵啸非

添加大厅与窗口关联

parent 4d7b2b29
...@@ -32,9 +32,11 @@ public class MemoryPagination { ...@@ -32,9 +32,11 @@ public class MemoryPagination {
return Collections.emptyList(); return Collections.emptyList();
} }
int totalCount = records.size(); int totalCount = records.size();
if(pageSize==-1){
pageSize=totalCount;
}
int remainder = totalCount % pageSize; int remainder = totalCount % pageSize;
int pageCount = (remainder > 0) ? totalCount / pageSize + 1 : totalCount / pageSize; int pageCount = (remainder > 0) ? totalCount / pageSize + 1 : totalCount / pageSize;
System.out.println("remainder:"+remainder);
if (remainder == 0) { if (remainder == 0) {
return records.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); return records.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
} else { } else {
......
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