|
@@ -42,8 +42,8 @@ public class AreaService {
|
|
|
*/
|
|
|
public Map<String, AreaPo> getAreaMap(List<AreaPo> cities, List<AreaPo> districts) {
|
|
|
Map<String, AreaPo> map = new HashMap<>();
|
|
|
- cities.forEach(t -> map.put(String.valueOf(t.getAreaId()), t));
|
|
|
- districts.forEach(t -> map.put(String.valueOf(t.getAreaId()), t));
|
|
|
+ cities.forEach(t -> map.put(t.getAreaId(), t));
|
|
|
+ districts.forEach(t -> map.put(t.getAreaId(), t));
|
|
|
return map;
|
|
|
}
|
|
|
|
|
@@ -55,10 +55,10 @@ public class AreaService {
|
|
|
public Map<String, List<AreaPo>> getDistrictListMap(List<AreaPo> cities, List<AreaPo> districts) {
|
|
|
Map<String, List<AreaPo>> map = new HashMap<>();
|
|
|
for (AreaPo city : cities) {
|
|
|
- map.put(String.valueOf(city.getAreaId()), new ArrayList<>());
|
|
|
+ map.put(city.getAreaId(), new ArrayList<>());
|
|
|
for (AreaPo district : districts) {
|
|
|
if (city.getAreaId().equals(district.getParentId())) {
|
|
|
- map.get(String.valueOf(city.getAreaId())).add(district);
|
|
|
+ map.get(city.getAreaId()).add(district);
|
|
|
}
|
|
|
}
|
|
|
}
|