stream流按某类型分组后操作

比如查询出了所有学生的各科成绩列表,再按学生分组求和 Map<Integer, Double> collect = testList.stream().collect(Collectors.groupingBy(UserEntity::getUserId, Collectors.summingDou
posted @ 2023-02-24 09:08  fchhk  阅读(23)  评论(0编辑  收藏  举报