——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7
开发工具 eclipse/idea/myeclipse/sts等均可配置运行
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SpringBoot旅游网站管理系统设计和实现(java+springboot+html+thymeleaf+mysql+spring+maven)
运行环境: java jdk 1.8 IDE环境 主要功能说明: 管理员角色包含以下功能:管理员登录,用户管理,旅游路线管理,旅游景点管理,酒店管理,旅游攻略管理,车票管理,订单管理,数据分析等功能。 用户角色包含以下功能:用户注册,用户登录,旅游路线预定,旅游景区预定,餐饮住宿,车票预定,旅游保险预定,旅游攻略,我的订单查看,个人资料管理等功能。 用了技术框架: HTML+CSS+JavaScript+jsp+mysql+Spring+Springboot+mybatis+maven+layui 所用的数据库: Mysql数据库
主要功能截图:
用户端:
注册和登录
首页功能菜单展示:
线路管理
旅游景点查看和预订等、预订完成在我的订单查看付款
餐饮查看和预订等、预订完成在我的订单查看付款
车票查看和预订等、预订完成在我的订单查看付款
保险查看和预订等、预订完成在我的订单查看付款
旅游攻略
注意事项:
后台管理员功能:
数据分析:
——————————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 try { count = travelRouteService.count2(); } catch (Exception e) { e.printStackTrace(); } pageParam.setCount(count); if (count<=7 ){ pageParam.setSize(1 ); }else { pageParam.setSize(count%7 ==0 ?count/7 :count/7 +1 ); } pageParam.setPageNumber(1 ); pageParam.setPageSize(7 ); } mv.addObject("pageData" , travelRouteService.findByPage(pageParam.getPageNumber(),pageParam.getPageSize())); mv.addObject("pageParam" ,pageParam); mv.setViewName("portal/travelRoute" ); return mv; } @RequestMapping("/travelRoutePortalView") public ModelAndView travelRoutePortalView (String id) { ModelAndView mv = this .getModeAndView(); try { mv.addObject("entity" ,travelRouteService.findById(id)); }catch (Exception e){ e.printStackTrace(); } mv.setViewName("portal/travelRouteView" ); return mv; } @RequestMapping("/travelRouteCreatOrder") public ModelAndView travelRouteCreatOrder (String id,HttpSession httpSession) { ModelAndView mv = this .getModeAndView(); try { TravelRoute travelRoute = travelRouteService.findById(id); User user = userService.findByUserName(httpSession.getAttribute("userName" ).toString()); Order order = new Order(); order.setImgUrl(travelRoute.getImgUrl());
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("/scenicSpotData") public ModelAndView scenicSpotDate () throws Exception { ModelAndView mv=this .getModeAndView(); mv.addObject("state0" ,scenicSpotService.state0count()); mv.addObject("state1" ,scenicSpotService.state1count()); mv.addObject("state2" ,scenicSpotService.state2count()); mv.setViewName("data/scenicSpotData" ); return mv; } @RequestMapping("/hotelData") public ModelAndView hotelDate () throws Exception { ModelAndView mv=this .getModeAndView(); mv.addObject("state0" ,hotelService.state0count()); mv.addObject("state1" ,hotelService.state1count()); mv.addObject("state2" ,hotelService.state2count()); mv.setViewName("data/hotelData" ); return mv; } @RequestMapping("/orderData") public ModelAndView orderDate () throws Exception { ModelAndView mv=this .getModeAndView(); mv.addObject("state0" ,orderService.state0count()); mv.addObject("state1" ,orderService.state1count()); mv.addObject("state2" ,orderService.state2count()); mv.setViewName("data/orderData" ); return mv; } @RequestMapping("/strategyData") public ModelAndView strategyDate () throws Exception { ModelAndView mv=this .getModeAndView(); mv.addObject("state0" ,strategyService.state0count()); mv.addObject("state1" ,strategyService.state1count()); mv.addObject("state2" ,strategyService.state2count()); mv.setViewName("data/strategyData" ); return mv; } @RequestMapping("/carData") public ModelAndView carDate () throws Exception {
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 carService.update(entity); } } catch (Exception e) { e.printStackTrace(); } return REDIRECT+"/manager/carList" ; } @RequestMapping("/carDelete") public String travelRouteDelete (String id) { if (Tools.notEmpty(id)){ try { carService.deleteByid(id); }catch (Exception e){ e.printStackTrace(); } } return REDIRECT+"/manager/carList" ; } } package com.cn.travel.web.manager;@Controller @RequestMapping("/manager") public class AdminController extends BaseController { @Autowired AdminService adminService;
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 } @RequestMapping("/orderEdit") public ModelAndView orderEdit (String id) { ModelAndView mv = this .getModeAndView(); try { mv.addObject("entity" ,orderService.findById(id)); }catch (Exception e){ e.printStackTrace(); } mv.setViewName("order/orderEdit" ); return mv; } @RequestMapping("/orderSave") public String orderSave (HttpServletRequest request, String id) { Order entity = null ; try { if (Tools.notEmpty(id)){ entity = orderService.findById(id); }else { entity = new Order(); } this .bindValidateRequestEntity(request,entity); if (Tools.isEmpty(entity.getId())){ entity.setId(Tools.getUUID()); orderService.save(entity); }else { orderService.update(entity); } } catch (Exception e) { e.printStackTrace(); } return REDIRECT+"/manager/orderList" ; } @RequestMapping("/orderDelete") public String orderDelete (String id) { if (Tools.notEmpty(id)){ try { orderService.deleteByid(id); }catch (Exception e){ e.printStackTrace(); } } return REDIRECT+"/manager/orderList" ; }
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 } } return REDIRECT+"/manager/scenicSpotList" ; } } package com.cn.travel.web.manager;@Controller @RequestMapping("/manager") public class TravelRouteController extends BaseController { @Autowired TravelRouteService travelRouteService; private String filePath = System.getProperty("user.dir" ) + "/src/main/resources/static/" ; @RequestMapping("/travelRouteList") public ModelAndView travelRouteList (PageParam pageParam, @RequestParam(value = "query", required = false) String query) { ModelAndView mv = this .getModeAndView(); if (pageParam.getPageNumber()<1 ){ pageParam =new PageParam(); long count = 0 ; try { count = travelRouteService.count(); } catch (Exception e) { e.printStackTrace(); } pageParam.setCount(count); if (count<=10 ){ pageParam.setSize(1 ); }else { pageParam.setSize(count%10 ==0 ?count/10 :count/10 +1 );
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 return REDIRECT+"/manager/adminList" ; } } package com.cn.travel.web.manager;@Controller @RequestMapping("/manager") public class DataController extends BaseController { @Autowired UserService userService; @Autowired TravelRouteService travelRouteService; @Autowired ScenicSpotService scenicSpotService; @Autowired HotelService hotelService; @Autowired OrderService orderService; @Autowired StrategyService strategyService; @Autowired CarService carService; @Autowired InsuranceService insuranceService; @RequestMapping("/userData") public ModelAndView userDate () throws Exception { ModelAndView mv=this .getModeAndView(); mv.addObject("state1" ,userService.state1count()); mv.addObject("state2" ,userService.state2count()); mv.setViewName("data/userData" ); return mv; } @RequestMapping("/travelRouteData") public ModelAndView travelRouteDate () throws Exception { ModelAndView mv=this .getModeAndView();
——————————PayStart——————————
项目链接: https://javayms.github.io?id=581422312105200ji https://javayms.pages.dev?id=581422312105200ji