admin 管理员组

文章数量: 887021


2024年1月16日发(作者:串口通信)

setCookieUser(request,response); return s("登录成功", userInfo); } } @RequestMapping("/users/getUsersByWhere/{pageNo}/{pageSize}") public @ResponseBody Result getUsersByWhere(UserInfo userInfo, @PathVariable int pageNo, @PathVariable int pageSize, HttpSession session){ if ("".equals(seid())){ seid(null); } if (eid() == -1){ eid(sionUser(session).getRoleid()); } (ng()); PageModel model = new PageModel<>(pageNo,userInfo); eSize(pageSize); return rsByWhere(model); } @RequestMapping("/user/add") public @ResponseBody Result addUser(UserInfo userInfo){ n(userInfo); try { int num = (userInfo); if(num>0){ return s(); }else { return ess(); } }catch (Exception e){ return (e); } } @RequestMapping("/user/update") public @ResponseBody Result updateUser(UserInfo userInfo){ try { int num = (userInfo); if(num>0){ return s(); }else { return ess(); } }catch (Exception e){ return (e); } } @RequestMapping("/user/del/{id}") public @ResponseBody Result deleteUser(@PathVariable String id){ try { int num = (id); if(num>0){ return s(); }else { return ess(); } }catch (Exception e){ return (e); } } @RequestMapping("/getSessionUser") @ResponseBody public UserInfo getSessionUser(HttpSession session){ UserInfo sessionUser = (UserInfo) ribute(T_USERNAME);

UserInfo sessionUser = (UserInfo) ribute(T_USERNAME); sword(null); return sessionUser; } @RequestMapping("/logout") public String logout(HttpServletRequest request, HttpServletResponse response){ delCookieUser(request, response); sion().removeAttribute(T_USERNAME); return "login"; } @RequestMapping("/getAllRoles") public @ResponseBody Result getAllRoles(){ try { List roles = Roles(); if (()>0){ return s(roles); }else { return ess(); } }catch (Exception e){ return (e); } } @RequestMapping("/role/add") public @ResponseBody Result addRole(Role role){ try { int num = e(role); if(num>0){ aultPrivilegesWhenAddRole(eid().toString()); return s(); }else { return ess(); } }catch (Exception e){ return (e); } } @RequestMapping("/role/update") public @ResponseBody Result updateRole(Role role){ try { int num = Role(role); if(num>0){ return s(); }else { return ess(); } }catch (Exception e){ return (e); } } @RequestMapping("/role/del/{roleid}") public @ResponseBody Result deleteRole(@PathVariable String roleid){ try { vilegesWenDelRole(roleid); int num = Role(roleid); if(num>0){ return s(); }else { aultPrivilegesWhenAddRole(roleid); return ess(); }


本文标签: 作者 串口