抓蛙师
2022-07-16 55ba098e506df00e982581eeb4c074a344d60177
StreamUtils优化分组方法返回由HashMap无序转为LinkedHashMap有序
已修改1个文件
6 ■■■■ 文件已修改
ruoyi-common/src/main/java/com/ruoyi/common/utils/StreamUtils.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/utils/StreamUtils.java
@@ -125,7 +125,7 @@
        }
        return collection
            .stream()
            .collect(Collectors.groupingBy(key, Collectors.toList()));
            .collect(Collectors.groupingBy(key, LinkedHashMap::new, Collectors.toList()));
    }
    /**
@@ -146,7 +146,7 @@
        }
        return collection
            .stream()
            .collect(Collectors.groupingBy(key1, Collectors.groupingBy(key2, Collectors.toList())));
            .collect(Collectors.groupingBy(key1, LinkedHashMap::new, Collectors.groupingBy(key2, LinkedHashMap::new, Collectors.toList())));
    }
    /**
@@ -167,7 +167,7 @@
        }
        return collection
            .stream()
            .collect(Collectors.groupingBy(key1, Collectors.toMap(key2, Function.identity(), (l, r) -> l)));
            .collect(Collectors.groupingBy(key1, LinkedHashMap::new, Collectors.toMap(key2, Function.identity(), (l, r) -> l)));
    }
    /**