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