Пример #1
0
 @ResponseBody
 @RequestMapping(
     value = "/s/role/save",
     method = RequestMethod.GET,
     produces = "application/json;text/html;charset=UTF-8")
 public String save(Role role) {
   return JsonUtil.toString(ResultUtil.set(roleService.save(role) != null ? true : false));
 }
Пример #2
0
 @ResponseBody
 @RequestMapping(
     value = "/s/role/delete",
     method = RequestMethod.GET,
     produces = "application/json;text/html;charset=UTF-8")
 public String delete(Role role) {
   return JsonUtil.toString(
       ResultUtil.set(roleService.delete(roleService.findById(role.getId()))));
 }