- 集合根据id分组
Map<String, List<AreaBO>> areaGroupByLevel = areaList.stream()
.collect(Collectors.groupingBy(AreaBO::getParent));
2.过滤
List<SkuSupermarketBO> priceList = value.stream().filter(item -> item != null && item.getPrice() != null)
.collect(Collectors.toList());
3.提取id重组集合
List<Long> skuIdList = SkuCommunityList.stream()
.collect(Collectors.mapping(SkuCommunityBO::getGoodsSkuId, Collectors.toList()));