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






基于javaweb的SSM旅游综合服务管理系统(java+ssm+jsp+bootstrap+mysql)
项目介绍
本项目分为管理员与用户两种角色; 管理员角色包含以下功能: 管理员登录,发布资讯,资讯管理,添加景点,景点管理,查看会员信息,添加酒店,酒店管理,添加路线,路线管理,管理网站信息,路线预定管理,酒店预定管理等功能。
用户角色包含以下功能: 查看首页,修改个人信息,查看首页,查看旅游景点,预定酒店,修改用户信息,修改密码,预定客房,查看旅游攻略,查看旅游资讯等功能。
环境需要
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.数据库:MySql 5.7版本; 6.是否Maven项目:否;
技术栈
- 后端:Spring+SpringMVC+Mbytes 2. 前端:JSP+css+javascript+bootstrap+jQuery
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中config-jdbc.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,在浏览器中输入localhost:8080/ssm_lvyou_fuwu
——————————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
| { map.put("mgf", "操作失败"); map.put("success", false); } } catch (Exception e) { map.put("mgf", "错误:"+e.getMessage()); map.put("success", false); } String result = new JSONObject(map).toString(); ResponseUtil.write(response, result); return null; }
@RequestMapping("/line_list") public String Get(Line l) { Pages p=new Pages(); p.setPagesize(10); int startindex=request.getParameter("startindex")==null?0:Integer.parseInt(request.getParameter("startindex")); p.setStartindex(startindex); l.setPage(p); try { List<Line> list = lineService.Get(l); System.out.println(list); request.setAttribute("list", list); request.setAttribute("pages", PageList.Page(request,"line/line_list.do", lineService.GetCount(l), p.getPagesize(), p.getStartindex(),request.getQueryString())); return "admin/line"; } catch (Exception e) { return null; } }
@RequestMapping("/web_list") public String Get2(Line l) { Pages p=new Pages(); p.setPagesize(10); int startindex=request.getParameter("startindex")==null?0:Integer.parseInt(request.getParameter("startindex")); p.setStartindex(startindex); l.setPage(p); try { List<Line> list = lineService.Get(l); System.out.println(list); request.setAttribute("list", list); request.setAttribute("pages", PageList.Page(request,"line/web_list.do", lineService.GetCount(l), p.getPagesize(), p.getStartindex(),request.getQueryString())); return "line"; } catch (Exception e) { return null;
|
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
| int lid=Integer.parseInt(request.getParameter("lid")); rd.setClientId(c.getId()); rd.setLineId(lid); int count = linedingService.Add(rd); if(count>0) { map.put("mgf", "预订成功"); map.put("success", true); } else { map.put("mgf", "预订失败"); map.put("success", false); } } catch (Exception e) { map.put("mgf", "错误:"+e.getMessage()); map.put("success", false); } String result = new JSONObject(map).toString(); ResponseUtil.write(response, result); return null; }
@RequestMapping("/my_list") public String GetByClientID() { try { Client c=(Client)request.getSession().getAttribute("client"); List<LineDing> list = linedingService.GetByClientID(c.getId()); for(int i=0;i<list.size();i++) { Line l=lineService.GetByID(list.get(i).getLineId()); list.get(i).setLine(l);
} System.out.println(list); request.setAttribute("list", list); return "mylineding"; } catch (Exception e) { return null; } }
@RequestMapping("/admin_list") public String Get() { try { List<LineDing> list = linedingService.Get();
|
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
| map.put("success", false); } } catch (Exception e) { map.put("mgf", "错误:"+e.getMessage()); map.put("success", false); } String result = new JSONObject(map).toString(); ResponseUtil.write(response, result); return null; }
@RequestMapping("/my_list") public String GetByClientID() { try { Client c=(Client)request.getSession().getAttribute("client"); List<LineDing> list = linedingService.GetByClientID(c.getId()); for(int i=0;i<list.size();i++) { Line l=lineService.GetByID(list.get(i).getLineId()); list.get(i).setLine(l);
} System.out.println(list); request.setAttribute("list", list); return "mylineding"; } catch (Exception e) { return null; } }
@RequestMapping("/admin_list") public String Get() { try { List<LineDing> list = linedingService.Get(); for(int i=0;i<list.size();i++) { Line l=lineService.GetByID(list.get(i).getLineId()); list.get(i).setLine(l); Client c=clientService.GetByID(list.get(i).getClientId()); list.get(i).setClient(c);
|
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
| { map.put("mgf", "点评失败"); map.put("success", false); } } catch (Exception e) { map.put("mgf", "错误:"+e.getMessage()); map.put("success", false); } String result = new JSONObject(map).toString(); ResponseUtil.write(response, result); return null; }
@RequestMapping("/my_list") public String GetByClientID() { try { Client c=(Client)request.getSession().getAttribute("client"); List<JinPing> list = jinpingService.GetByClientID(c.getId()); for(int i=0;i<list.size();i++) { Jin j=jinService.GetByID(list.get(i).getJinId()); list.get(i).setJin(j);; } System.out.println(list); request.setAttribute("list", list); return "myjinping"; } catch (Exception e) { return null; } }
@RequestMapping("/admin_list") public String GetByNewsID(int jid) { try { List<JinPing> list = jinpingService.GetByJinID(jid); for(int i=0;i<list.size();i++) { Jin n=jinService.GetByID(list.get(i).getJinId()); list.get(i).setJin(n);; } System.out.println(list); request.setAttribute("list", list); return "admin/pinglun"; } catch (Exception e) {
|
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
| map.put("success", false); } else if(!a.getPwd().equals(admin.getPwd())) { map.put("mgf", "密码错误"); map.put("success", false); } else { request.getSession().setAttribute("admin", a); map.put("mgf", "验证通过!"); map.put("success", true); } } catch (Exception e) { map.put("mgf", "错误:"+e.getMessage()); map.put("success", false); } String result = new JSONObject(map).toString(); ResponseUtil.write(response, result); return null; }
@RequestMapping("/exit") public String Exit() { Map<String,Object> map = new HashMap<String,Object>(); try { request.getSession().removeAttribute("admin"); map.put("mgf", "已安全退出!"); map.put("success", true); } catch (Exception e) { map.put("mgf", "错误:"+e.getMessage()); map.put("success", false); } String result = new JSONObject(map).toString(); ResponseUtil.write(response, result); return null; }
@RequestMapping("/tui") public String tui(Model model) { Pages p=new Pages(); p.setPagesize(6); Jin j=new Jin(); j.setPage(p); Line l=new Line(); l.setPage(p); List<Jin> jin = jinService.Get(j); Introduce intr = introduceService.GetByID(1); List<Line> ls = lineService.Get(l); model.addAttribute("jin", jin); model.addAttribute("intr", intr);
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=081122532008200px
https://javayms.pages.dev?id=081122532008200px