@RequestMapping("checkname/{type}")
 @ResponseBody
 public String checkName(HttpServletRequest request, String permissionRoleName, String uid) {
   if (uid == null && permissionRoleService.getPermissionRoleByName(permissionRoleName) == null) {
     return "true";
   } else if (uid != null
       && permissionRoleName.equals(
           permissionRoleService.getByUuid(UUID.UUIDFromString(uid)).getPermissionRoleName())) {
     return "true";
   } else if (permissionRoleService.getPermissionRoleByName(permissionRoleName) != null) {
     return "false";
   }
   return "true";
 }
 @RequestMapping("change")
 public String changePermissionRole(UUID uuid, Model model) {
   model.addAttribute("model", "permissionrole");
   model.addAttribute("title", "修改权限角色");
   model.addAttribute("titles", new String[] {"权限角色名", "角色描述"});
   model.addAttribute("names", new String[] {"permissionRoleName", "permissionRoleDescribe"});
   model.addAttribute("permissionTree", permissionService.getPermissionTree().toString());
   model.addAttribute("roleDatarangeTree", getRoleDatarangeTree());
   model.addAttribute("permission", permissionRoleService.getPermissions(uuid.toString()));
   model.addAttribute("roleDatarange", permissionRoleService.getRoleDataranges(uuid.toString()));
   PermissionRole r = permissionRoleService.getByUuid(uuid);
   model.addAttribute("entry", r);
   return "user/update-modal";
 }