一 : list 转 map
1 : 实体类List -> Map
list.collect(Collectors.toMap(A::getId(), Function.identity(), (x, y) -> x));
2 : JSONList -> Map
list.stream().collect(Collectors.toMap(a->a.getString(“key"), b->b.getInteger("value"), (v1, v2) -> v1));
二 : List 分组 求出每个出现的个数
1 : List -> Map
Map<String, Long> couponMap = list.stream().collect(Collectors.groupingBy(x -> x.getString(“key"), Collectors.counting()));