From 0bb73e7a0c489df4cf86b48dec2cf0d235a665b2 Mon Sep 17 00:00:00 2001 From: qinjie <463333974@qq.com> Date: Thu, 28 Nov 2024 03:12:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/isu/gaswellwatch/controller/MenuController.java | 3 +++ .../com/isu/gaswellwatch/service/impl/SummaryServiceImpl.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/isu/gaswellwatch/controller/MenuController.java b/src/main/java/com/isu/gaswellwatch/controller/MenuController.java index 5975a83..580f9dd 100644 --- a/src/main/java/com/isu/gaswellwatch/controller/MenuController.java +++ b/src/main/java/com/isu/gaswellwatch/controller/MenuController.java @@ -19,6 +19,9 @@ import java.util.List; @RestController @RequestMapping("menu") public class MenuController { + +// INSERT INTO `gaswellwatch`.`menu` (`id`, `parent`, `name`, `code`, `icon`, `sort`, `extra`, `create_time`, `update_time`) VALUES (1834501113332629504, 0, '日志管理', 'logManage', 'Document', 7, '{\"url\":\"logManage\",\"menuType\":{\"key\":\"4\",\"value\":\"\"}}', '2024-09-13 15:55:23', '2024-11-27 18:00:57'); +// INSERT INTO `gaswellwatch`.`menu` (`id`, `parent`, `name`, `code`, `icon`, `sort`, `extra`, `create_time`, `update_time`) VALUES (1834501183620775936, 0, '提醒记录', 'recordingManage', 'Location', 8, '{\"url\":\"recordingManage\",\"menuType\":{\"key\":\"4\",\"value\":\"\"}}', '2024-09-13 15:55:40', '2024-11-27 18:01:01'); /** * 服务对象 */ 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 03f8c22..bf6f290 100644 --- a/src/main/java/com/isu/gaswellwatch/service/impl/SummaryServiceImpl.java +++ b/src/main/java/com/isu/gaswellwatch/service/impl/SummaryServiceImpl.java @@ -47,7 +47,9 @@ public class SummaryServiceImpl implements SummaryService { if(deviceGroup.containsKey(deviceVO.getProduct().getCode())){ deviceGroup.get(deviceVO.getProduct().getCode()).add(deviceVO); }else { - deviceGroup.put(deviceVO.getProduct().getCode(),List.of(deviceVO)); + List deviceVOList1 = new ArrayList<>(); + deviceVOList1.add(deviceVO); + deviceGroup.put(deviceVO.getProduct().getCode(), deviceVOList1); } }