Commit 2f9c11b2 by huangjy

fix:空返回PageVO.emptyPage()

parent 5e346a75
......@@ -126,7 +126,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
List<PlatElderChildrenInfo> platElderChildrenInfoList = getPlatElderChildrenInfosByOpenid(platElderChildrenInfo.getOpenid());
log.info("子女端账号:{}",JSON.toJSONString(platElderChildrenInfo));
if(CollectionUtils.isEmpty(platElderChildrenInfoList)){
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> elderIdList = platElderChildrenInfoList.stream().map(PlatElderChildrenInfo::getElderId).collect(Collectors.toList());
PlatAlarmRecordQueryDTO data = dto.getData();
......
......@@ -429,7 +429,7 @@ public class DataScreenServiceImpl implements DataScreenService {
//获取该账号的权限组织
List<PlatOrg> orgs = belongToScopeList(dto.getType());
if(orgs.isEmpty()){
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
......@@ -440,7 +440,7 @@ public class DataScreenServiceImpl implements DataScreenService {
.in(PlatOrg::getId, dto.getOrgIds())
.eq(PlatOrg::getType, dto.getType()));
if(platOrgs.isEmpty()){
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> orgIdList = platOrgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
dto.setOrgIds(orgIdList);
......@@ -507,7 +507,7 @@ public class DataScreenServiceImpl implements DataScreenService {
//获取该账号的权限组织
List<PlatOrg> orgs = belongToScopeList(dto.getType());
if(orgs.isEmpty()){
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
......@@ -518,7 +518,7 @@ public class DataScreenServiceImpl implements DataScreenService {
.in(PlatOrg::getId, dto.getOrgIds())
.eq(PlatOrg::getType, dto.getType()));
if(platOrgs.isEmpty()){
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> orgIdList = platOrgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
dto.setOrgIds(orgIdList);
......@@ -534,7 +534,7 @@ public class DataScreenServiceImpl implements DataScreenService {
Page<PlatDeviceListVO> page = platDeviceService.getDevices(dto, p);
List<PlatDeviceListVO> voList = page.getRecords();
if(CollectionUtils.isEmpty(voList)){
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> spaceIdList = voList.stream().flatMap(vo -> {
......
......@@ -135,7 +135,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
//List<PlatDeviceListVO> voList = BeanDtoVoUtils.listVo(records, PlatDeviceListVO.class);
if (CollectionUtils.isEmpty(records)) {
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> spaceIdList = records.stream().flatMap(vo -> {
......
......@@ -103,7 +103,7 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild
List<PlatElderChildrenInfoListVO> voList = BeanDtoVoUtils.listVo(voPage.getRecords(), PlatElderChildrenInfoListVO.class);
if (CollectionUtils.isEmpty(voList)) {
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> openIdList = voList.stream().map(PlatElderChildrenInfoListVO::getOpenid).collect(Collectors.toList());
List<PlatElderChildrenInfo> platElderChildrenInfos = list(new QueryWrapper<PlatElderChildrenInfo>().lambda()
......
......@@ -315,7 +315,7 @@ public class PlatRoomBedDeviceServiceImpl extends ServiceImpl<PlatRoomBedDeviceM
});
return PageUtil.toPageVO(data, pages);
}else {
return new PageVO<>();
return PageVO.emptyPage();
}
}
......
......@@ -175,7 +175,7 @@ public class WorkStationServiceImpl implements WorkStationService {
//获取该账号的权限组织
List<PlatOrg> orgs = belongToScopeList(PlatOrgEnum.OrgTypeEnum.INSTITUTION.getValue());
if (orgs.isEmpty()) {
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
dto.setOrgIds(orgIds);
......@@ -185,7 +185,7 @@ public class WorkStationServiceImpl implements WorkStationService {
List<String> orgIds = orgs.stream().filter(t->PlatOrgEnum.OrgTypeEnum.INSTITUTION.getValue().equals(t.getType()))
.map(PlatOrg::getId).collect(Collectors.toList());
if(orgIds.isEmpty()){
return new PageVO<>();
return PageVO.emptyPage();
}
dto.setOrgIds(orgIds);
}
......@@ -194,7 +194,7 @@ public class WorkStationServiceImpl implements WorkStationService {
spaces = platSpaceService.list(new QueryWrapper<PlatSpace>().lambda()
.in(PlatSpace::getOrgId, dto.getOrgIds()));
if (spaces.isEmpty()) {
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> spaceIds = spaces.stream().map(PlatSpace::getId).collect(Collectors.toList());
......@@ -222,7 +222,7 @@ public class WorkStationServiceImpl implements WorkStationService {
});
if(StringUtil.isNotEmpty(dto.getAlarmType())){
if(elderIdList.isEmpty()){
return new PageVO<>();
return PageVO.emptyPage();
}
dto.setElderIds(elderIdList);
}
......@@ -233,7 +233,7 @@ public class WorkStationServiceImpl implements WorkStationService {
new Page<>(page.getPage(),page.getLimit()), page.getData());
List<WorkStationInstitutionRoomVO> roomVOList = pages.getRecords();
if (roomVOList.isEmpty()) {
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> roomIds = roomVOList.stream().map(WorkStationInstitutionRoomVO::getRoomId).collect(Collectors.toList());
//获取床号及长者/设备
......@@ -482,7 +482,7 @@ public class WorkStationServiceImpl implements WorkStationService {
//获取该账号的权限组织
List<PlatOrg> orgs = belongToScopeList(PlatOrgEnum.OrgTypeEnum.HOME.getValue());
if (orgs.isEmpty()) {
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
dto.setOrgIds(orgIds);
......@@ -492,7 +492,7 @@ public class WorkStationServiceImpl implements WorkStationService {
List<String> orgIds = orgs.stream().filter(t->PlatOrgEnum.OrgTypeEnum.HOME.getValue().equals(t.getType()))
.map(PlatOrg::getId).collect(Collectors.toList());
if(orgIds.isEmpty()){
return new PageVO<>();
return PageVO.emptyPage();
}
dto.setOrgIds(orgIds);
}
......@@ -515,7 +515,7 @@ public class WorkStationServiceImpl implements WorkStationService {
}
if (spaces.isEmpty()) {
return new PageVO<>();
return PageVO.emptyPage();
}
List<String> elderIdList = new ArrayList<>();
List<PlatAlarmRecord> alarmRecords = platAlarmRecordService.list(
......@@ -534,7 +534,7 @@ public class WorkStationServiceImpl implements WorkStationService {
});
if(StringUtil.isNotEmpty(dto.getAlarmType())){
if(elderIdList.isEmpty()){
return new PageVO<>();
return PageVO.emptyPage();
}
dto.setElderIds(elderIdList);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment