From 7165632fcb7b3b782b8959cfe1e7e1c51872e228 Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期二, 25 六月 2024 16:34:18 +0800
Subject: [PATCH] station used list and delete
---
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/privilege/PriSv.java | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/privilege/PriSv.java b/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/privilege/PriSv.java
index 8339844..189cf85 100644
--- a/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/privilege/PriSv.java
+++ b/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/privilege/PriSv.java
@@ -8,8 +8,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@@ -37,10 +36,17 @@
return rsVo ;
}
- public Map<String, List<BaPrivilege>> selectByType(){
+ public List<Map<String, Object>> selectByType(){
List<BaPrivilege> priList = dao.selectAll();
Map<String, List<BaPrivilege>> map = priList.stream()
.collect(Collectors.groupingBy(BaPrivilege::getTypeName));
- return map;
+ List<Map<String,Object>> resultList=new ArrayList<>();
+ map.forEach((key, value) -> {
+ Map<String, Object> temp = new HashMap<>();
+ temp.put("name", key);
+ temp.put("list", value);
+ resultList.add(temp);
+ });
+ return resultList;
}
}
--
Gitblit v1.8.0