——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






基于javaweb的SSM图书管理系统(java+ssm+jsp+jquery+mysql)
项目介绍
本图书馆管理系统主要分为前台和后台两大功能模块,共包含两种角色,分别是:读者、管理员。
其功能如下:
1.前台功能 前台首页、网站公告、图书浏览、图书详情、图书搜索、图书分类展示、推荐图书、全部图书、预约图书、图书借阅、图书评论、收藏图书、用户注册、用户登陆、用户中心、修改个人信息、修改密码、我的借阅历史、我的收藏、我的意见反馈、退出等功能。
2.后台功能 后台系统登陆、用户信息管理、新闻公告信息管理、图书类型管理、图书信息管理、图书预约管理、延期申请管理、图书评价管理、意见反馈管理、统计信息等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目; 6.数据库:MySql 5.7/8.0等版本均可;
技术栈
后台框架:Spring、SpringMVC、MyBatis UI界面:JSP、jQuery 数据库:MySQL
使用说明
使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目;
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } this.getRequest().setAttribute("id", id); return "users/addTopic"; }
@RequestMapping("addTopic.action") public String addTopic(String id) { this.front(); if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } Orders orders = this.ordersService.getOrdersById(id); orders.setStatus("已评价"); this.ordersService.updateOrders(orders); Topic topic = new Topic(); String userid = (String) this.getSession().getAttribute("userid"); topic.setAddtime(VeDate.getStringDate()); topic.setOrdersid(id); topic.setBooksid(orders.getBooksid()); topic.setContents(this.getRequest().getParameter("contents")); topic.setNum(this.getRequest().getParameter("num")); topic.setUsersid(userid); this.topicService.insertTopic(topic); return "redirect:/index/showOrders.action"; }
@RequestMapping("preApplys.action") public String preApplys(String id) { this.front(); if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } Orders orders = this.ordersService.getOrdersById(id); this.getRequest().setAttribute("orders", orders); return "users/addApplys"; }
@RequestMapping("addApplys.action") public String addApplys(Applys applys) { this.front(); if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } String userid = (String) this.getSession().getAttribute("userid"); applys.setAddtime(VeDate.getStringDateShort()); applys.setStatus("待处理"); applys.setUsersid(userid); this.applysService.insertApplys(applys); Orders orders = this.ordersService.getOrdersById(applys.getOrdersid()); orders.setIsdelay("是"); this.ordersService.updateOrders(orders); return "redirect:/index/myApplys.action";
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
@RequestMapping("status.action") public String status(String id) { String status = "锁定"; Users users = this.usersService.getUsersById(id); if (status.equals(users.getStatus())) { status = "解锁"; } users.setStatus(status); this.usersService.updateUsers(users); return "redirect:/users/getAllUsers.action"; }
@RequestMapping("getAllUsers.action") public String getAllUsers(String number) { List<Users> usersList = this.usersService.getAllUsers(); PageHelper.getUserPage(usersList, "users", "getAllUsers", 10, number, this.getRequest()); return "admin/listusers"; }
@RequestMapping("queryUsersByCond.action") public String queryUsersByCond(String cond, String name, String number) { Users users = new Users(); if (cond != null) { if ("username".equals(cond)) { users.setUsername(name); } if ("password".equals(cond)) { users.setPassword(name); } if ("realname".equals(cond)) { users.setRealname(name); } if ("sex".equals(cond)) { users.setSex(name); } if ("birthday".equals(cond)) { users.setBirthday(name); } if ("contact".equals(cond)) { users.setContact(name); } if ("status".equals(cond)) { users.setStatus(name); } if ("regdate".equals(cond)) { users.setRegdate(name); } }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| cate.setAddtime(VeDate.getStringDateShort()); this.cateService.insertCate(cate); return "redirect:/cate/createCate.action"; }
@RequestMapping("deleteCate.action") public String deleteCate(String id) { this.cateService.deleteCate(id); return "redirect:/cate/getAllCate.action"; }
@RequestMapping("deleteCateByIds.action") public String deleteCateByIds() { String[] ids = this.getRequest().getParameterValues("cateid"); if (ids != null) { for (String cateid : ids) { this.cateService.deleteCate(cateid); } } return "redirect:/cate/getAllCate.action"; }
@RequestMapping("updateCate.action") public String updateCate(Cate cate) { this.cateService.updateCate(cate); return "redirect:/cate/getAllCate.action"; }
@RequestMapping("getAllCate.action") public String getAllCate(String number) { List<Cate> cateList = this.cateService.getAllCate(); PageHelper.getUserPage(cateList, "cate", "getAllCate", 10, number, this.getRequest()); return "admin/listcate"; }
@RequestMapping("queryCateByCond.action") public String queryCateByCond(String cond, String name, String number) { Cate cate = new Cate(); if(cond != null){ if ("catename".equals(cond)) { cate.setCatename(name); } if ("addtime".equals(cond)) { cate.setAddtime(name); } if ("memo".equals(cond)) {
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
@RequestMapping("createApplys.action") public String createApplys() { List<Orders> ordersList = this.ordersService.getAllOrders(); this.getRequest().setAttribute("ordersList", ordersList); List<Users> usersList = this.usersService.getAllUsers(); this.getRequest().setAttribute("usersList", usersList); List<Books> booksList = this.booksService.getAllBooks(); this.getRequest().setAttribute("booksList", booksList); return "admin/addapplys"; }
@RequestMapping("addApplys.action") public String addApplys(Applys applys) { this.applysService.insertApplys(applys); return "redirect:/applys/createApplys.action"; }
@RequestMapping("deleteApplys.action") public String deleteApplys(String id) { this.applysService.deleteApplys(id); return "redirect:/applys/getAllApplys.action"; }
@RequestMapping("deleteApplysByIds.action") public String deleteApplysByIds() { String[] ids = this.getRequest().getParameterValues("applysid"); if (ids != null) { for (String applysid : ids) { this.applysService.deleteApplys(applysid); } } return "redirect:/applys/getAllApplys.action"; }
@RequestMapping("updateApplys.action") public String updateApplys(Applys applys) { this.applysService.updateApplys(applys); return "redirect:/applys/getAllApplys.action"; }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| @RequestMapping("addorder.action") public String addorder(String id) { this.front(); if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } String userid = (String) this.getSession().getAttribute("userid"); Orders orders = new Orders(); orders.setBooksid(id); orders.setOrdercode("BD" + VeDate.getStringDatex()); orders.setAddtime(VeDate.getStringDateShort()); orders.setStatus("预约"); orders.setUsersid(userid); this.ordersService.insertOrders(orders); return "redirect:/index/showOrders.action"; }
@RequestMapping("showOrders.action") public String showOrders(String number) { this.front(); if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } String userid = (String) this.getSession().getAttribute("userid"); Orders orders = new Orders(); orders.setUsersid(userid); List<Orders> ordersList = this.ordersService.getOrdersByCond(orders); PageHelper.getIndexPage(ordersList, "orders", "showOrders", null, 10, number, this.getRequest()); return "users/orderlist"; }
@RequestMapping("cancel.action") public String cancel(String id) { this.front(); if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } this.ordersService.deleteOrders(id); return "redirect:/index/showOrders.action"; }
@RequestMapping("preTopic.action") public String preTopic(String id) { this.front(); if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } this.getRequest().setAttribute("id", id); return "users/addTopic"; }
@RequestMapping("addTopic.action")
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=000023061907201am
https://javayms.pages.dev?id=000023061907201am