jeestie4如何把一个list放到page中
-- 最新版本的没用过,下面是rxgo 源码老版本的例子
-- 实体 :Teacher
List<Teacher> list1 = teacherService.findList(teacher);
Page<Teacher> page = new Page<Teacher>(request,response);
int pn = page.getPageNo();
int ps = page.getPageSize();
List<Teacher> list2 = new ArrayList<Teacher>();
for(int b=(pn-1)*ps;b<(pn*ps);b++){
list2.add(list1.get(b));
}
page.setCount(list1.size());
page.setList(list2);
model.addAttribute("page",page);
-- 仅供参考
2024-12-23 06:57
2024-12-23 05:47
2024-12-23 05:11
2024-12-23 05:04
2024-12-23 04:50