From ebae0c1137ba96d38e5b2323577129d2c9ff2e6e Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期四, 22 五月 2025 09:45:59 +0800 Subject: [PATCH] 1、优化配置文件; 2、优化ID生成器代码; 3、修改注释; 4、修改权限初始化时算法; 5、导出Excel文件功能归为一个新类; 6、工站数据库存入验空修改; --- 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