Commit 66718bb2 by huangjy

fix:wifi配网问题

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