1. 分组根据CustomerId
Map<String, List<dto>> collect = details.stream()
.collect(Collectors.groupingBy(dto::getCustomerId));
2. 单列求和Score
int totalScore = details.stream().mapToInt(dto::getScore).sum();
3. 提取单列数据集合
List<Integer> ids = details.stream().map(dto::getId).collect(Collectors.toList());