Map<String, List<Good>> collect = ll.stream().collect(Collectors.groupingBy(Good::getShiGoodsType)); 把list集合按其中的的属性分组