liuxm
2024-04-29 6a428f0ee32c8aea1fe8d4a20bf45e94ed855e3e
分类查询权限方法修改
2个文件已修改
16 ■■■■■ 已修改文件
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/privilege/PriSv.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/privilege/PrivilegeCtrl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
    }
}
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/privilege/PrivilegeCtrl.java
@@ -37,7 +37,7 @@
     */
    @GetMapping(path="getByType")
    @SsoPowerAop(power = "10100010")
    public BaseResponse<Map<String, List<BaPrivilege>>> getByType(){
    public BaseResponse<List<Map<String, Object>>> getByType(){
       try {
           return BaseResponseUtils.buildSuccess(sv.selectByType());
       }catch (Exception e){