Example #1
0
 @RequestMapping("/list_n{page:\\d+}")
 public String list(
     @PathVariable("page") Integer page,
     @RequestParam(value = "roleCode", required = false) String roleCode,
     @RequestParam(value = "roleName", required = false) String roleName,
     Model model) {
   Role role = new Role();
   role.setPageSize(20);
   role.setPage(page);
   role.setRoleCode(roleCode);
   role.setRoleName(roleName);
   Paging<Role> roles = roleService.findByRole(role);
   model.addAttribute("result", roles);
   model.addAttribute("s", role);
   return "admin/role/list";
 }
Example #2
0
 @ResponseBody
 @RequestMapping("/remove")
 public Response remove(@RequestParam("id") Long id) {
   return roleService.remove(id);
 }
Example #3
0
 @ResponseBody
 @RequestMapping("/add")
 public Response add(Role role) {
   return roleService.add(role);
 }
Example #4
0
 @ResponseBody
 @RequestMapping("/modify")
 public Response modify(Role role) {
   return roleService.modify(role);
 }
Example #5
0
 @ResponseBody
 @RequestMapping("/ajaxFindById")
 public Response ajaxFindById(@RequestParam("id") Long id) {
   Response response = roleService.findById(id);
   return response;
 }
Example #6
0
 @ResponseBody
 @RequestMapping("/loadRoles")
 public Response findMenus(@RequestParam("userId") Long userId) {
   return roleService.loadAllRolesAndWithCurRoles(userId);
 }