예제 #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";
 }
예제 #2
0
 @ResponseBody
 @RequestMapping("/remove")
 public Response remove(@RequestParam("id") Long id) {
   return roleService.remove(id);
 }
예제 #3
0
 @ResponseBody
 @RequestMapping("/add")
 public Response add(Role role) {
   return roleService.add(role);
 }
예제 #4
0
 @ResponseBody
 @RequestMapping("/modify")
 public Response modify(Role role) {
   return roleService.modify(role);
 }
예제 #5
0
 @ResponseBody
 @RequestMapping("/ajaxFindById")
 public Response ajaxFindById(@RequestParam("id") Long id) {
   Response response = roleService.findById(id);
   return response;
 }
예제 #6
0
 @ResponseBody
 @RequestMapping("/loadRoles")
 public Response findMenus(@RequestParam("userId") Long userId) {
   return roleService.loadAllRolesAndWithCurRoles(userId);
 }