|
|
|
@ -66,7 +66,9 @@ public class FavoritedDeviceServiceImpl implements FavoritedDeviceService { |
|
|
|
} |
|
|
|
if (null != pageSearchParam.getClassId()){ |
|
|
|
pageSearchParam.setCategoryIdList(Constants.CATEGORY_MAP.get(pageSearchParam.getClassId())); |
|
|
|
} |
|
|
|
} else { |
|
|
|
pageSearchParam.setCategoryIdList(Constants.ALL_CATEGORY_IDS); |
|
|
|
} |
|
|
|
|
|
|
|
PageHelper.startPage(pageSearchParam.getPageNum() == null ? 1 : pageSearchParam.getPageNum(), pageSearchParam.getPageSize() == null ? 20 : pageSearchParam.getPageSize()); |
|
|
|
List<FavoritedDeviceVO> favoritedDeviceVOList = favoritedDeviceMapperExt.getListPage(pageSearchParam); |
|
|
|
@ -117,9 +119,10 @@ public class FavoritedDeviceServiceImpl implements FavoritedDeviceService { |
|
|
|
data = alarmDataMap.get(deviceId); |
|
|
|
} |
|
|
|
|
|
|
|
if (data != null) { |
|
|
|
resultList.add(data); |
|
|
|
if (data == null) { |
|
|
|
data = vo; // 保留原 VO,避免返回条数不足
|
|
|
|
} |
|
|
|
resultList.add(data); |
|
|
|
} |
|
|
|
|
|
|
|
return new PageInfo<>(resultList); |
|
|
|
|