0verride
public Pair<List<ApplyDto>,Long> selectDbApplyList(ApplyDto applyDto){
Long id=applyDto.getId();
//办事顺信
DbSupervision dbSupervision = abSupervisionMapper.selectDbSupervisionByDbId(id);
if(dbSupervision == null){
throw new RuntimeException("督办信息为空”+id);
}
String dbNumber =dbSupervision.getDbNumber();
DbApply dbApply =supervisionManager.applyDtoToDo(applyDto);
dbApply.setDbNumber(abNumber);
List<ApplyDto> result = new ArrayList<>();
Pair<List<ApplyDto>,Long> pair e new ImmutablePair<>(new ArrayList<>(), right: 0l);
PageHelper.startPage(applyDto.getPageNum(),applyDto getPageSize());
List<DbApply> dbApplies = abApplyMapper.selectDbApplyList(dbAppLy);
PageInfo<List<DbApply>> pageInfo = new PageInfo(dbApplies);
if(CollectionUtils.isEmpty(dbApplies)){
return pair;
}
for (obApply innerpbapply :dbApplies){
result.add(supervisionManager.applyDoToDto(innerDbapply));
}
return new ImmutablePair<>(result,pageInfo.getTotal());
}
@GetMapping("/getApplyList")
public TableDataInfo list(ApplyDto applyDto)TableDataInfo dataTable = getDataTable(new ArrayList<>());
Pair<List<ApplyDto>,Long> pain = dbApplyService.selectDbApplyList(applyDto);
List<ApplyDto> left = pain.getLeft();
dataTable.setRows(left);
dataTable.setTotal(pain.getRight());
return dataTable;
}
标签:return,分页,spring,applyDto,boot,Long,new,dataTable,dbApplies
From: https://www.cnblogs.com/codeLearn/p/18000704