fix: 体系数据列表手动分页层级错误
This commit is contained in:
+6
-6
@@ -178,7 +178,7 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<List<StandSystemDTO>> standardSystemList(StandSystemDTO standSystemDTO) {
|
||||
public IPage<StandSystemDTO> standardSystemList(StandSystemDTO standSystemDTO) {
|
||||
String menuId = standSystemDTO.getMenuId();
|
||||
// 校验menuId不能为空
|
||||
if (StringUtils.isBlank(menuId)) {
|
||||
@@ -201,9 +201,9 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
// 按照标准体系排序
|
||||
// 体系内部按照国内/海外/企业排序
|
||||
// 每个类别的标准内部按照搜索中心设定的类别排序
|
||||
// 假设 pageNum 和 pageSize 都是从1开始的
|
||||
Integer pageNum = standSystemDTO.getPage();
|
||||
Integer pageSize = standSystemDTO.getPageSize();
|
||||
// 手动分页
|
||||
int pageNum = standSystemDTO.getPage();
|
||||
int pageSize = standSystemDTO.getPageSize();
|
||||
|
||||
// 计算总页数
|
||||
int total = resultList.size();
|
||||
@@ -217,8 +217,8 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
List<StandSystemDTO> pageList = resultList.subList(start, end);
|
||||
|
||||
// 使用MyBatis Plus的Page类来构造分页对象
|
||||
Page<List<StandSystemDTO>> page = new Page<>(pageNum, pageSize, total);
|
||||
page.setRecords(Collections.singletonList(pageList)); // 设置当前页面的记录
|
||||
Page<StandSystemDTO> page = new Page<>(pageNum, pageSize, total);
|
||||
page.setRecords(pageList); // 设置当前页面的记录
|
||||
page.setTotal(total); // 设置总记录数
|
||||
page.setPages(totalPages); // 设置总页数
|
||||
return page;
|
||||
|
||||
Reference in New Issue
Block a user