Map<Integer, List<ScmGoodsDealDO>> isDealGoodsWithGoodsList = scmGoodsList.stream().collect(Collectors.groupingBy(ScmGoodsDealDO::getIsDealGoods));
java 对数组按条件进行分组
于 2021-03-11 20:57:43 首次发布
Map<Integer, List<ScmGoodsDealDO>> isDealGoodsWithGoodsList = scmGoodsList.stream().collect(Collectors.groupingBy(ScmGoodsDealDO::getIsDealGoods));