Map<Long, Long> map = yxhActivityDOS.stream().collect(Collectors.toMap(YxhActivityDO::getStoreId, YxhActivityDO::getActivityCount));
博客主要围绕将List中的两列数据转换为Map集合展开,这属于数据处理操作,在信息技术领域的数据处理场景中较为常见。
Map<Long, Long> map = yxhActivityDOS.stream().collect(Collectors.toMap(YxhActivityDO::getStoreId, YxhActivityDO::getActivityCount));
450
645
2633
5254
2967

被折叠的 条评论
为什么被折叠?