public List<Map<String, Object>> treeData(@RequestParam(required=false) Long extId, HttpServletResponse response) {
response.setContentType("application/json; charset=UTF-8");
List<Map<String, Object>> mapList = Lists.newArrayList();
List<Menu> list = systemService.findAllMenu();
for (int i=0; i<list.size(); i++){
Menu e = list.get(i);
if (extId == null || (extId!=null && !extId.equals(e.getId()) && e.getParentIds().indexOf(","+extId+",")==-1)){
Map<String, Object> map = Maps.newHashMap();
map.put("id", e.getId());
map.put("pId", e.getParent()!=null?e.getParent().getId():0);
map.put("name", e.getName());
mapList.add(map);
}
}
return mapList;
}