Map<String, CustomerInfo> infoMap = infoList.stream() .collect(Collectors.toMap(CustomerInfo::getId, customerInfo -> customerInfo, BinaryOperator.maxBy(Comparator.comparing(CustomerInfo::getEtlDate))));
java lambda表达式 列表转map, key值相同的记录取时间字段最大的记录
最新推荐文章于 2024-06-27 14:41:57 发布