集合快速分组 achtungbaby 2021-07-16 82 阅读1分钟 // 根据不同商品分组 Map<Long, List<list>> map = list.stream().collect(Collectors.groupingBy(s -> s.goodsId()));