示例#1
0
 /**
  * 保存新增的数据
  *
  * @param modelMap
  * @param sysUserRole
  * @return
  * @throws Exception
  */
 @RequiresPermissions("sysUserRole:insert")
 @RequestMapping(value = "/saveUserRole", method = RequestMethod.POST)
 @ResponseBody
 public String saveUserRole(
     HttpSession session,
     HttpServletResponse response,
     HttpServletRequest request,
     ModelMap modelMap,
     SysUserRole sysUserRole)
     throws Exception {
   sysUserRoleService.saveSysUserRole(sysUserRole);
   RequestResponseUtil.putResponseStr(session, response, request, StringConstant.TRUE);
   return null;
 }
示例#2
0
 /**
  * 获取列表展示数据
  *
  * @param modelMap
  * @param sysUserRole
  * @return
  * @throws Exception
  */
 @RequiresPermissions("sysUserRole:select")
 @RequestMapping(value = "/getTreeJson", method = RequestMethod.POST)
 @ResponseBody
 public String getTreeData(
     HttpSession session,
     HttpServletResponse response,
     HttpServletRequest request,
     ModelMap modelMap,
     SysUserRole sysUserRole)
     throws Exception {
   List<TreeJson> tList = sysUserRoleService.getTreeJson(sysUserRole);
   JSONArray jsonObj = JSONArray.fromObject(tList);
   return jsonObj.toString();
 }