集合快速分组

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