Map<Long, AreaInfo> cityCollect = list.stream().collect(Collectors.toMap(AreaInfo::getCityId, po -> po, (key, key2) -> key2));
Map<Long, AreaInfo> cityCollect = list.stream().collect(Collectors.toMap(AreaInfo::getCityId, po -> po));
兩者有區別,建議第一中,第二種會有報錯,拋出異常