From f272b48edcd23cb2a1f43f9343939a9d9f3cc545 Mon Sep 17 00:00:00 2001 From: qinjie <463333974@qq.com> Date: Thu, 28 Nov 2024 10:14:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SummaryServiceImpl.java | 12 ++++++------ src/main/resources/mapper/DeviceDao.xml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) 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 @@