Score
0
Watch 3.3K Star 7.8K Fork 3.6K

卓源软件 / JeeSite 4.xJavaAGPL-3.0

前端分页问题

Open
菜鸟求助  Opened this issue

该问题是怎么引起的?

我在service中使用递归的方式 实现了一个list集合 我将它放入page中 实现不了分页

重现步骤

public Page findManyChildPage(Page page, Bom bom) {
//去重后的上级BOM
Map<String,Bom> list = new HashMap<String, Bom>();
//查询结果
Map<String,Bom> lists = getManyBomListByChild(bom,null, list);
List result = new ArrayList();
for (Bom value : lists.values()) {
result.add(value);
}
bom.setPage(page);
// page.setList(result);
page.setCount(result.size());
List result2 = new ArrayList();
if(result.size()>0) {
for(int i = page.getPageSize()*(page.getPageNo()-1);i<page.getPageSize()*page.getPageNo();i++) {
if(i<result.size()) {
result2.add(result.get(i));
}
}
}
page.setList(result2);

	return page;
}

报错信息

total 1 participants

Comments (0)

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
Java
1
https://gitee.com/thinkgem/jeesite4.git
git@gitee.com:thinkgem/jeesite4.git
thinkgem
jeesite4
JeeSite 4.x

Help Search

220309 7019f5b6 1899542 220318 4015cbb9 1899542