@RequestMapping("saveRoleRes") @ResponseBody public ResultMessage addRoleRes(Long id, String resourceIds) { ResultMessage message = new ResultMessage(); message.setStatus(message.SUCCESS); sysRoleService.addRoleRes(id, resourceIds); return message; }
@RequestMapping(value = "save") public String save(String roleName, String roleCode, String roleDesc) { sysRoleService.addRole(roleName, roleCode, roleDesc, true); return "redirect:/sys/role/index"; }
@RequestMapping(value = "delete") public String delete(Long... id) { sysRoleService.deleteRole(id); return "redirect:/sys/role/index"; }
@RequestMapping("index") public void index(Model model) { model.addAttribute("sysRoles", sysRoleService.getAllRoles()); }