diff --git a/src/main/java/com/isu/gaswellwatch/service/impl/SummaryServiceImpl.java b/src/main/java/com/isu/gaswellwatch/service/impl/SummaryServiceImpl.java index bf6f290..9bab869 100644 --- a/src/main/java/com/isu/gaswellwatch/service/impl/SummaryServiceImpl.java +++ b/src/main/java/com/isu/gaswellwatch/service/impl/SummaryServiceImpl.java @@ -30,13 +30,13 @@ public class SummaryServiceImpl implements SummaryService { @Override public List getIndexPieSummary() { -// Map onlineMap = redisTemplate.opsForHash().entries(ONLINE_DEVICE_CACHE); + Map onlineMap = redisTemplate.opsForHash().entries(ONLINE_DEVICE_CACHE); //TODO 记得改回从缓存里取值 - Map onlineMap = new HashMap<>(); - onlineMap.put("1","true"); - onlineMap.put("2","false"); - onlineMap.put("3","true"); - onlineMap.put("4","true"); +// Map onlineMap = new HashMap<>(); +// onlineMap.put("1","true"); +// onlineMap.put("2","false"); +// onlineMap.put("3","true"); +// onlineMap.put("4","true"); List deviceIdList = onlineMap.keySet().stream().map(Long::parseLong).toList(); List deviceVOList = deviceService.getDeviceVOByIds(deviceIdList); diff --git a/src/main/resources/mapper/DeviceDao.xml b/src/main/resources/mapper/DeviceDao.xml index 8d97725..757ce90 100644 --- a/src/main/resources/mapper/DeviceDao.xml +++ b/src/main/resources/mapper/DeviceDao.xml @@ -67,7 +67,7 @@