系统使用技术:servlet
前端技术:css、js等
开发工具:eclipse
数据库:mysql5.7
项目介绍:
该系统适合基础中等及偏下,需要系统功能完善并且页面美观的同学。主要功能包括:权限管理(菜单管理、用户管理、角色管理)、新闻管理、留言管理、社团财务管理、社团管理、社团风采管理、社团活动管理、学生管理等。本系统现有角色超级管理员、管理员、社长,如果需要增加角色只需要登录超级管理员进行添加并对角色授权。
下面我们来看看功能。
系统登陆界面:
http://localhost:8080/team/f?action=index
系统首页
查看社团、活动、风采内容
社团活动详情
选择某一个活动,进行查看
社团详情
查看社团具体信息
个人中心
个人登录后可以查看个人信息
管理员首页
对系统统计
新闻管理
对新闻进行操作
角色管理
对角色进行操作
社团管理
对社团进行操作
社团申请
查看学生对社团的申请,并审核
代码
进入首页:
/** * 跳转到首页 * @param request * @param response */ private void index(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String contextPath = request.getServletContext().getContextPath(); User user = CurrentUserUtils.getCurrentUser(request); if (user==null) { request.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=utf-8"); response.getWriter().write("<script>alert('用户失效!'),parent.location.href='"+contextPath+"/mui/login.jsp'</script>"); } List<Map<String, Object>> menus = new ArrayList<Map<String, Object>>(); List<Menu> parentMenus = menuRoleDao.getUserMenus(user.getRole(), "0"); for (Menu menu : parentMenus) { Map<String, Object> map = new HashMap<String, Object>(); map.put("parentMenu", menu); List<Menu> childrenMenus = menuRoleDao.getUserMenus(user.getRole(), menu.getId()); map.put("sonMenus", childrenMenus); menus.add(map); } String projectName = PropertiesUtil.getValue("projectName"); request.getSession().setAttribute("projectName", projectName); request.getSession().setAttribute("indexMenus", menus); request.getRequestDispatcher("/mui/index.jsp").forward(request, response); }
登录:
private void login(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ String contextPath = request.getServletContext().getContextPath(); System.out.println(contextPath); String username = request.getParameter("username"); String password = request.getParameter("password"); User login = userDao.login(username, MD5.Encrypt(password)); if (login!=null) { if(login.getIsBolck().equals("1")){ request.setAttribute("msg", "登录失败,用户名已锁定,请联系管理员"); request.setAttribute("username", username); request.setAttribute("password", password); request.getRequestDispatcher("/mui/login.jsp").forward(request, response); } request.getSession().setAttribute("login", login); response.sendRedirect(contextPath+"/user?method=index"); }else{ request.setAttribute("msg", "登录失败,用户名或密码错误"); request.setAttribute("username", username); request.setAttribute("password", password); request.getRequestDispatcher("/mui/login.jsp").forward(request, response); } }
导出:
private void export(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Teams teams = new Teams(); List<Teams> ss = teamsService.findAll(teams); List<TeamsVO> result = new ArrayList<>(); for(int i = 0;i<ss.size();i++){ TeamsVO teamsvo = new TeamsVO(); teamsvo.setId(String.valueOf(i+1)); teamsvo.setTeamName(ss.get(i).getTeamName()); teamsvo.setBuildTime(ss.get(i).getBuildTime()); teamsvo.setBuildStu(ss.get(i).getBuildStu()); if("0".equals(ss.get(i).getAuditType())){ teamsvo.setAuditType("未审核"); }else if("1".equals(ss.get(i).getAuditType())){ teamsvo.setAuditType("审核通过"); }else if("2".equals(ss.get(i).getAuditType())){ teamsvo.setAuditType("审核不通过"); }else{ teamsvo.setAuditType("错误"); } teamsvo.setMembers(ss.get(i).getMembers()); teamsvo.setRemark(ss.get(i).getRemark()); result.add(teamsvo); } String[] columnNames = {"序号","社团名字", "成立时间" , "创建人" , "审核状态" , "成员数" , "备注"}; String fileName = "社团列表导出"; ExportExcelWrapper<TeamsVO> util = new ExportExcelWrapper<TeamsVO>(); util.exportExcel(fileName, fileName, columnNames, result, response, ExportExcelUtil.EXCEL_FILE_2003); }
以上就是部分功能展示,从整体上来看,本系统功能是十分完整的,而且也与当前的热点话题关联,界面设计简洁大方,交互友好,数据库设计也很合理,规模适中,比较适合毕业设计和课程设计的相关应用。
好了,今天就到这儿吧,小伙伴们点赞、收藏、评论,一键三连走起呀,下期见~~