Commit 66718bb2 by huangjy

fix:wifi配网问题

parent 61fe2e4d
...@@ -195,21 +195,21 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev ...@@ -195,21 +195,21 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
} }
PlatElder platElder = platElderService.getById(dto.getElderId()); PlatElder platElder = platElderService.getById(dto.getElderId());
if (platElder == null || StringUtils.isEmpty(platElder.getRoomId())) { if (platElder == null || StringUtils.isEmpty(platElder.getRoomId())) {
return new PageVO<>(); return PageVO.emptyPage();
} }
List<PlatRoomBedDevice> platRoomBedDevices = platRoomBedDeviceService.list(new QueryWrapper<PlatRoomBedDevice>().lambda() List<PlatRoomBedDevice> platRoomBedDevices = platRoomBedDeviceService.list(new QueryWrapper<PlatRoomBedDevice>().lambda()
.eq(PlatRoomBedDevice::getRoomId, platElder.getRoomId())); .eq(PlatRoomBedDevice::getRoomId, platElder.getRoomId()));
if (CollectionUtils.isEmpty(platRoomBedDevices)) { if (CollectionUtils.isEmpty(platRoomBedDevices)) {
return new PageVO<>(); return PageVO.emptyPage();
} }
List<String> deviceIdList = StreamUtil.map(platRoomBedDevices, PlatRoomBedDevice::getDeviceId); List<String> deviceIdList = StreamUtil.map(platRoomBedDevices, PlatRoomBedDevice::getDeviceId);
Page<PlatDevice> platDevicePage = baseMapper.selectPage(p, new QueryWrapper<PlatDevice>().lambda().in(BaseEntity::getId, deviceIdList)); Page<PlatDevice> platDevicePage = baseMapper.selectPage(p, new QueryWrapper<PlatDevice>().lambda().in(BaseEntity::getId, deviceIdList));
List<PlatDevice> platDeviceList = platDevicePage.getRecords(); List<PlatDevice> platDeviceList = platDevicePage.getRecords();
if (CollectionUtils.isEmpty(platDeviceList)) { if (CollectionUtils.isEmpty(platDeviceList)) {
return new PageVO<>(); return PageVO.emptyPage();
} }
List<PlatDeviceOther> platDeviceOtherList = platDeviceOtherService.list(new QueryWrapper<PlatDeviceOther>().lambda() List<PlatDeviceOther> platDeviceOtherList = platDeviceOtherService.list(new QueryWrapper<PlatDeviceOther>().lambda()
.eq(PlatDeviceOther::getDeviceId, deviceIdList)); .in(PlatDeviceOther::getDeviceId, deviceIdList));
Map<String, PlatDeviceOther> platDeviceOtherMap = StreamUtil.toMapDep(platDeviceOtherList, PlatDeviceOther::getDeviceId); Map<String, PlatDeviceOther> platDeviceOtherMap = StreamUtil.toMapDep(platDeviceOtherList, PlatDeviceOther::getDeviceId);
List<PlatChildDeviceListVO> voList = Lists.newArrayList(); List<PlatChildDeviceListVO> voList = Lists.newArrayList();
PlatChildDeviceListVO vo; PlatChildDeviceListVO vo;
......
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