获取省市区流写法
private List<Region> getThreeLevel() {
//查询所有省份,将省份下的城市 区县 学校信息存入对应的省份下
List<Region> regionList = areaMapper.getThreeLevel();
List<Region> resultRegion = regionList.stream().filter(x -> x.getTopId() == 100000).collect(Collectors.toList());
resultRegion.forEach(x -> {
List<Region> collect = regionList.stream().filter(y -> x.getDivisionId() == y.getTopId()).collect(Collectors.toList());
x.setChildNodes(collect);
collect.forEach(y -> y.setChildNodes(regionList.stream().filter(z -> y.getDivisionId() == z.getTopId()).collect(Collectors.toList())));
});
return resultRegion;
}