Пример #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());
 }