Exemplo n.º 1
0
 @RequestMapping("sortUpdate")
 @ResponseBody
 public Map<String, Object> sortUpdate(Params params, HttpServletRequest request)
     throws Exception {
   resourceService.updateSortOrder(params.getResources());
   return resources(new Resource(), request);
 }
Exemplo n.º 2
0
  @ResponseBody
  @RequestMapping("addRoleRes")
  public Map<String, Object> addRoleRes(String roleId, Params params) {
    Map<String, Object> map = new HashMap<String, Object>();
    List<String> list = params.getId();
    try {
      if (null != list && list.size() > 0) {
        resourceService.addRoleRes(roleId, list);
        map.put("flag", "true");
      } else {
        map.put("flag", "false");
      }
    } catch (Exception e) {
      map.put("flag", "false");
    }

    return map;
  }