|
|
@@ -29,17 +29,17 @@ public class PolicyManage { |
|
|
|
private final INdKqZzsfwPolicyService policyService; |
|
|
|
|
|
|
|
|
|
|
|
public PageVo<NdKqZzsfwPolicyVO> list(int pageNumber, int pageSize) { |
|
|
|
public PageVo<NdKqZzsfwPolicyVO> list(long pageNumber, long pageSize) { |
|
|
|
Page<NdKqZzsfwPolicy> page = Page.of(pageNumber,pageSize); |
|
|
|
policyService.page(page,Wrappers.lambdaQuery(NdKqZzsfwPolicy.class) |
|
|
|
Page<NdKqZzsfwPolicy> pageRes = policyService.page(page, Wrappers.lambdaQuery(NdKqZzsfwPolicy.class) |
|
|
|
.orderByAsc(NdKqZzsfwPolicy::getSort)); |
|
|
|
|
|
|
|
if(CollUtil.isEmpty(page.getRecords())){ |
|
|
|
if(CollUtil.isEmpty(pageRes.getRecords())){ |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<NdKqZzsfwPolicyVO> res = page.getRecords().stream() |
|
|
|
List<NdKqZzsfwPolicyVO> res = pageRes.getRecords().stream() |
|
|
|
.map(p -> BeanUtil.copyProperties(p,NdKqZzsfwPolicyVO.class)) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
return PageVo.of(res,page.getTotal()); |
|
|
|
return PageVo.of(res,pageRes.getTotal()); |
|
|
|
} |
|
|
|
} |