码迷,mamicode.com
首页 > 其他好文 > 详细

废弃代码 region/tree

时间:2018-06-07 17:50:55      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:highlight   create   div   end   control   use   created   str   for   

/**
 * Created by mcmctb on 2018/6/7 13:14
 */
@RestController
@RequestMapping("region")
@CheckClientToken
@CheckUserToken
public class RegionController extends BaseController<RegionBiz, Region>{
    @RequestMapping(value = "/tree", method = RequestMethod.GET)
    public List<AreaTree> getTree() {
        List<Region> regions = this.baseBiz.selectListAll();
        List<City> city = this.baseBiz.selectListAll();
        List<District> district = this.baseBiz.selectListAll();
        List<RegionTree> trees = new ArrayList<>();
        regions.forEach(region ->{
            trees.add(new RegionTree(region.getId(),region.getParentId(),region.getRegionName(),region.getRegionCode()));
        });
        return TreeUtil.bulid(trees, "-1", null);
    }
}

  

废弃代码 region/tree

标签:highlight   create   div   end   control   use   created   str   for   

原文地址:https://www.cnblogs.com/tabCtrlShift/p/9151690.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!