|
|
@@ -331,8 +331,10 @@ public class TenantServiceImpl implements TenantService { |
|
|
|
//分页参数校验 |
|
|
|
query.checkParam(); |
|
|
|
//开启分页 |
|
|
|
List<TenantVo> tenantVos = tenantMapper.findList(query); |
|
|
|
List<TenantVo> collect = tenantVos.stream().map(x -> { |
|
|
|
// 设置分页参数 |
|
|
|
IPage<TenantVo> pageDate = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
IPage<TenantVo> tenantVos = tenantMapper.findListByPage(pageDate,query); |
|
|
|
List<TenantVo> collect = tenantVos.getRecords().stream().map(x -> { |
|
|
|
TenantVo vo = new TenantVo(); |
|
|
|
BeanUtils.copyProperties(x, vo); |
|
|
|
//并不是真正意义上的租户id |
|
|
@@ -383,15 +385,8 @@ public class TenantServiceImpl implements TenantService { |
|
|
|
vo.setList(businessSystemVoList); |
|
|
|
return vo; |
|
|
|
}).filter(x -> x != null).collect(Collectors.toList()); |
|
|
|
//粗暴的分页 |
|
|
|
Integer pageNum = query.getPage(); |
|
|
|
Integer pageSize = query.getLimit(); |
|
|
|
int startIndex = (pageNum - 1) * pageSize; |
|
|
|
int endIndex = Math.min(startIndex + pageSize, collect.size()); |
|
|
|
List<TenantVo> subList = collect.subList(startIndex, endIndex); |
|
|
|
IPage<TenantVo> page = new Page<>(pageNum, pageSize); |
|
|
|
page.setTotal(collect.size()); |
|
|
|
return JsonResult.success(page.setRecords(subList)); |
|
|
|
pageDate.setRecords(collect); |
|
|
|
return JsonResult.success(pageDate); |
|
|
|
} |
|
|
|
|
|
|
|
/** |