• 旅游定制服务|基于SSM实现旅游个性化定制网站平台


    旅游定制订单管理

    旅游订单管理

    作者主页:编程千纸鹤

    作者简介:Java、前端、Pythone开发多年,做过高程,项目经理,架构师

    主要内容:Java项目开发、毕业设计开发、面试技术整理、最新技术分享

    收藏点赞不迷路  关注作者有好处

    项目编号:BS-PT-071

    一,项目简介

    据公布的中国2019年旅游产业分析报告统计的信息: 2018年,中国旅游业发展迅猛,产业规模持续扩大,产品体系日益完善,市场秩序不断优化,中国2018年旅游业总收入达6.0万亿元,对中国GDP的综合贡献为9.9万亿元,占国内GDP总量的11.0%,逐渐成为国民经济新的增长点。

    改革开放以来,我国的旅游业有了非常迅速的发展,但是比较而言,我国国内旅游业发展的广度深度都远远不能适应经济发展和人民生活水平提高的需要。随着市场经济的发展和人民收入水平的进一步提高,人民对旅游消费的需求将进一步上升,国内旅游业在国民经济中的地位和作用越来越重要。

    但我国旅游产业仍然基础薄弱,管理手段滞后,信息化程度低,企业效益较差。旅游行政管理部门存在管理方式落后,缺乏信息化管理手段,信息沟通渠道不通畅等问题.,面对困难和挑战,我国旅游业必须转变观念,创新思维,以信息化建设为突破口和新手段,整合各种资源,从而实现整个行业的新跨越。

    目前有许多综合性的旅游服务平台,像比较知名的携程、窝窝网、途牛网等。他们提供一个全方位的旅游信息服务平台,针对国内外的旅游景点提供相关的出行服务,但各地现在还是比较缺乏一个专业的各景点旅游信息化服务平台,主要存在的问题有:

    1.这些平台提供的服务比较庞杂,不能针对相关景点的旅游信息提供比较全面的服务信息。

    2.就一些地方性来讲,旅游资源相当丰富,很多有特的旅游景点和旅游线路没有得到开发,这些平台无法覆盖各地的完整信息。

    3.外地人想去相关旅游景区旅游,想尝试一下本地比较有本地特色的旅游线路,这些平台都没有提供,他们只提供了一些比较知名的景点,像少林寺、龙门石窟等。

    这是一个旅游管理系统。系统主要有2个角色,分别是普通用户和管理员。普通用户可以进行登录注册,查看或修改个人信息,检索和浏览旅游产品信息,产品下单,订单详情查看、定制出行、咨询客服等操作,而网页端管理员可以进行用户管理,产品和产品-销售的增删查改,主题管理,订单管理、数据统计等操作。

    用户注册时,发送的验证码到邮箱需要配置代码中的邮箱号码和邮箱验证码

    修改email.properties文件,替换下面的xxx为你真实信息,email_password是邮箱授权码

    二,环境介绍

    语言环境:Java:  jdk1.8

    数据库:Mysql: mysql5.7

    应用服务器:Tomcat:  tomcat8.5.31

    开发工具:IDEA或eclipse

    后台开发技术:SSM框架

    前端开发技术:Bootstrap+Jquery+Ajax+Css

    三,系统展示

    前端首页

    旅游产品搜索

     个性旅游定制

    旅游线路购买

     

    个人中心

     

     

     我的订单

    我的定制

    后台管理登陆

    后台管理首页

     

    旅游商品管理

    旅游主题管理

    用户信息管理

    四,核心代码展示

    1. package com.zzh.controller.backend;
    2. import com.zzh.common.ServerResponse;
    3. import com.zzh.entity.Product;
    4. import com.zzh.entity.ProductDesc;
    5. import com.zzh.entity.ThemeProduct;
    6. import com.zzh.service.IProductDescService;
    7. import com.zzh.service.IProductService;
    8. import com.zzh.service.IThemeProductService;
    9. import com.zzh.service.IThemeService;
    10. import org.springframework.beans.factory.annotation.Autowired;
    11. import org.springframework.stereotype.Controller;
    12. import org.springframework.ui.Model;
    13. import org.springframework.web.bind.annotation.PathVariable;
    14. import org.springframework.web.bind.annotation.RequestMapping;
    15. import org.springframework.web.bind.annotation.ResponseBody;
    16. import java.util.Date;
    17. /**
    18. *

    19. * 前端控制器
    20. *

    21. *
    22. * @author znz
    23. * @since 2022-11-13
    24. */
    25. @Controller
    26. @RequestMapping("/manager/product")
    27. public class ProductManagerController {
    28. @Autowired
    29. private IProductService productService;
    30. @Autowired
    31. private IProductDescService productDescService;
    32. @Autowired
    33. private IThemeService themeService;
    34. @Autowired
    35. private IThemeProductService themeProductService;
    36. /**
    37. * 新增
    38. * @return
    39. */
    40. @RequestMapping("/save")
    41. @ResponseBody
    42. public ServerResponse save(Product product, ProductDesc productDesc, String[] themeName){
    43. System.out.println(product.getPrice());
    44. ThemeProduct[] themeProducts=new ThemeProduct[themeName.length];
    45. for (int i=0;i
    46. String themeId=themeService.selectIdByName(themeName[i]);
    47. if (null==themeId){
    48. return ServerResponse.createByErrorMessage("不存在该主题");
    49. }
    50. themeProducts[i]=new ThemeProduct();
    51. themeProducts[i].setThemeId(themeId);
    52. themeProducts[i].setThemeName(themeName[i]);
    53. }
    54. try {
    55. productService.create(product,productDesc,themeProducts);
    56. } catch (Exception e) {
    57. return ServerResponse.createByError();
    58. }
    59. return ServerResponse.createBySuccess();
    60. }
    61. @RequestMapping("/update/{pid}")
    62. @ResponseBody
    63. public ServerResponse update(@PathVariable String pid,Product product, ProductDesc productDesc, String[] themeName){
    64. product.setPid(pid);
    65. ThemeProduct[] themeProducts=new ThemeProduct[themeName.length];
    66. for (int i=0;i
    67. String themeId=themeService.selectIdByName(themeName[i]);
    68. if (null==themeId){
    69. return ServerResponse.createByErrorMessage("不存在该主题");
    70. }
    71. themeProducts[i]=new ThemeProduct();
    72. themeProducts[i].setThemeId(themeId);
    73. themeProducts[i].setThemeName(themeName[i]);
    74. }
    75. try {
    76. productService.update(product,productDesc,themeProducts);
    77. } catch (Exception e) {
    78. return ServerResponse.createByError();
    79. }
    80. return ServerResponse.createBySuccess();
    81. }
    82. /**
    83. * 下架
    84. * @param pid
    85. * @return
    86. */
    87. @ResponseBody
    88. @RequestMapping("/shelf/{pid}")
    89. public ServerResponse shelf(@PathVariable String pid){
    90. Product product=new Product();
    91. product.setPid(pid);
    92. product.setStatus(2);//下架
    93. return ServerResponse.createByResult(product.updateById());
    94. }
    95. /**
    96. * 删除
    97. * @param pid
    98. * @return
    99. */
    100. @ResponseBody
    101. @RequestMapping(value = "/delete/{pid}")
    102. public ServerResponse delete(@PathVariable String pid){
    103. productService.cascadeDeleteById(pid);
    104. return ServerResponse.createBySuccess();
    105. }
    106. /**
    107. * 批量删除
    108. * @param pids
    109. * @return
    110. */
    111. @ResponseBody
    112. @RequestMapping("/deleteBatchIds")
    113. public ServerResponse deleteBatchIds(String[] pids){
    114. if (pids.length>60){
    115. return ServerResponse.createByErrorMessage("超出一次删除的记录");
    116. }
    117. productService.deleteBatchIds(pids);
    118. return ServerResponse.createBySuccess();
    119. }
    120. private boolean setThemeProduct(String[] themeName,ThemeProduct[] themeProducts){
    121. themeProducts=new ThemeProduct[themeName.length];
    122. for (int i=0;i
    123. String themeId=themeService.selectIdByName(themeName[i]);
    124. if (null==themeId){
    125. return false;
    126. }
    127. themeProducts[i]=new ThemeProduct();
    128. themeProducts[i].setThemeId(themeId);
    129. themeProducts[i].setThemeName(themeName[i]);
    130. }
    131. return true;
    132. }
    133. @RequestMapping("/addView")
    134. public String addView(Model model){
    135. model.addAttribute("theme",themeService.selectList(null));
    136. return "backend/product_add";
    137. }
    138. @RequestMapping("/listView")
    139. public String listView(){
    140. return "backend/product_list";
    141. }
    142. @RequestMapping("/updateView/{pid}")
    143. public String updateView(@PathVariable String pid, Model model){
    144. Product product=productService.selectById(pid);
    145. ProductDesc productDesc=productDescService.selectById(pid);
    146. model.addAttribute("product",product);
    147. model.addAttribute("productDesc",productDesc);
    148. model.addAttribute("theme",themeService.selectList(null));
    149. model.addAttribute("tp",themeProductService.selectByPid(pid));
    150. // model.addAttribute("themeProduct",themeProductService.selectByPid(product.getPid()));
    151. //复选框的值先缺着
    152. return "backend/product_update";
    153. }
    154. /**
    155. * 检查日期输入合法性
    156. * @return
    157. */
    158. private boolean checkDateInputIllegal(Date stratDate,Date endDate){
    159. //计算天数
    160. int days = (int)(stratDate.getTime()-endDate.getTime())/ (1000*3600*24);
    161. if (days<0||days>60){
    162. return false;
    163. }
    164. return true;
    165. }
    166. }
    1. package com.zzh.controller.backend;
    2. import com.baomidou.mybatisplus.mapper.EntityWrapper;
    3. import com.baomidou.mybatisplus.plugins.Page;
    4. import com.zzh.common.ResponseCode;
    5. import com.zzh.common.ServerResponse;
    6. import com.zzh.entity.ProductSell;
    7. import com.zzh.service.IProductSellService;
    8. import org.springframework.beans.factory.annotation.Autowired;
    9. import org.springframework.stereotype.Controller;
    10. import org.springframework.ui.Model;
    11. import org.springframework.web.bind.annotation.*;
    12. import java.io.UnsupportedEncodingException;
    13. import java.util.ArrayList;
    14. import java.util.Arrays;
    15. import java.util.Calendar;
    16. import java.util.Date;
    17. /**
    18. *

    19. * 前端控制器
    20. *

    21. *
    22. * @author znz
    23. * @since 2022-11-13
    24. */
    25. @Controller
    26. @RequestMapping("/manager/productSell")
    27. public class ProductSellManageController {
    28. @Autowired
    29. private IProductSellService productSellService;
    30. /**
    31. * 列表
    32. * @param current
    33. * @param size
    34. * @return
    35. */
    36. @RequestMapping("/list")
    37. @ResponseBody
    38. public ServerResponse list(@RequestParam(value="current",defaultValue="1") int current, @RequestParam(value="size",defaultValue="10") int size){
    39. if (current<0||size<0){
    40. return ServerResponse.createByErrorCodeMessage(ResponseCode.ILLEGAL_ARGUMENT.getCode(),ResponseCode.ILLEGAL_ARGUMENT.getDesc());
    41. }
    42. return ServerResponse.createBySuccess(productSellService.selectPage(new Page(current,size))) ;
    43. }
    44. /**
    45. * 列表
    46. * @param current
    47. * @param size
    48. * @return
    49. */
    50. @RequestMapping("/list/{pid}")
    51. @ResponseBody
    52. public ServerResponse listBypid(@PathVariable String pid,@RequestParam(value="current",defaultValue="1") int current, @RequestParam(value="size",defaultValue="10") int size){
    53. if (current<0||size<0){
    54. return ServerResponse.createByErrorCodeMessage(ResponseCode.ILLEGAL_ARGUMENT.getCode(),ResponseCode.ILLEGAL_ARGUMENT.getDesc());
    55. }
    56. EntityWrapper entityWrapper=new EntityWrapper();
    57. entityWrapper.eq("pid",pid);
    58. entityWrapper.orderBy("start_date",true);
    59. return ServerResponse.createBySuccess(productSellService.selectPage(new Page(current,size),entityWrapper)) ;
    60. }
    61. /**
    62. * 新增
    63. * @param productSell
    64. * @return
    65. */
    66. @RequestMapping("/save")
    67. @ResponseBody
    68. public ServerResponse create(ProductSell productSell){
    69. productSell.setCreateTime(new Date());
    70. return ServerResponse.createBySuccess(productSell.insert());
    71. }
    72. /**
    73. *修改
    74. * @param id
    75. * @param productSell
    76. * @return
    77. */
    78. @ResponseBody
    79. @RequestMapping("/update/{id}")
    80. public ServerResponse update(@PathVariable String id, ProductSell productSell){
    81. productSell.setId(id);
    82. productSell.setUpdateTime(new Date());
    83. return ServerResponse.createByResult(productSell.updateById());
    84. }
    85. /**
    86. * 删除
    87. * @param id
    88. * @return
    89. */
    90. @ResponseBody
    91. @RequestMapping("/delete/{id}")
    92. public ServerResponse delete(@PathVariable String id){
    93. ProductSell productSell=new ProductSell();
    94. productSell.setId(id);
    95. return ServerResponse.createByResult(productSell.deleteById());
    96. }
    97. /**
    98. * 批量删除
    99. * @param ids
    100. * @return
    101. */
    102. @ResponseBody
    103. @RequestMapping("/delete")
    104. public ServerResponse delete(String[] ids){
    105. return ServerResponse.createByResult(productSellService.deleteBatchIds(Arrays.asList(ids)));
    106. }
    107. /**
    108. * 批量新增
    109. * @param productSells
    110. * @return
    111. */
    112. @RequestMapping("/insertBatch")
    113. @ResponseBody
    114. public ServerResponse insertBatch(ProductSell productSells,int days){
    115. if (days>30){
    116. return ServerResponse.createByErrorMessage("不能连续设置超过30天的产品销售");
    117. }
    118. ArrayList productSellArrayList=new ArrayList<>();
    119. for (int i=1;i<=days;i++){
    120. ProductSell productSell=new ProductSell(productSells);
    121. Calendar c = Calendar.getInstance();
    122. c.setTime(productSell.getStartDate());
    123. c.add(Calendar.DAY_OF_MONTH, i);// +i天
    124. productSell.setStartDate(c.getTime());
    125. productSell.setCreateTime(new Date());
    126. productSellArrayList.add(productSell);
    127. }
    128. return ServerResponse.createByResult(productSellService.insertBatch(productSellArrayList));
    129. }
    130. @RequestMapping("/addView")
    131. public String addView(String pid, String title,Double price, Model model) throws UnsupportedEncodingException {
    132. String param = new String(title.getBytes("ISO8859-1"), "UTF-8");//解决get乱码
    133. model.addAttribute("pid",pid);
    134. model.addAttribute("title",param);
    135. model.addAttribute("price",price);
    136. return "backend/productSell_add";
    137. }
    138. @RequestMapping("/listView/{pid}")
    139. public String listView(@PathVariable String pid,Model model){
    140. model.addAttribute("pid",pid);
    141. return "backend/productSell_list";
    142. }
    143. @RequestMapping("/updateView/{id}")
    144. public String updateView(@PathVariable String id,Model model){
    145. model.addAttribute("productSell", productSellService.selectById(id));
    146. return "backend/productSell_update";
    147. }
    148. }

    五,项目总结

    本课题是基于Java语言的Spring框架整合springmvc和mybatis作为后台进行设计,页面采用JSP,前端使用的是JS、CSS、JQUEY、BootStrap来实现并设计页面;数据库采用目前比较流行的MYSQL数据库进行信息存储,应用服务器采用Tomcat8.5。

    1. 前端UI

    作为一个旅游网站,前台界面起到了对客户浏览信息进行导航的作用,前台设计的简洁、易上手十分重要。前端用户可以登陆进行旅游线路的购买、个人信息的修改、订单查看和支付的操作,以及网站各模块信息查询功能。

    2)后台:

    后台为系统的核心,提供了对整个前台信息进行管理操作的主要作用。后台管理员可以对前端的信息进行添加、修改、发布、删除、查看等操作。主要包括旅游线路管理、景点信息管理、订单管理、留言评论管理、酒店管理、管理员登录退出模块。

    3)数据库设计:

    数据库做为整个网站的信息存储的重要组成部分。网站信息全部存储在MYSQL数据库中,MYSQL作为一款免费的数据库软件应用比较广泛,无论性能还是安全性都是得到开发者一致的认可。

  • 相关阅读:
    (附源码)spring boot物联网智能管理平台 毕业设计 211120
    基于数据驱动的变电站巡检机器人自抗扰控制
    Apache Knox 2.0.0使用
    头像上传功能
    机器学习项目实战合集列表
    EMNLP2023 | 让模型学会将提示插入到合适的中间层
    web前端课程设计 HTML+CSS+JavaScript旅游风景云南城市网页设计与实现 web前端课程设计代码 web课程设计 HTML网页制作代码
    LeetCode LCP 50. 宝石补给【模拟】简单
    数据读写:Unity中基于C#脚本实现数据读写功能
    VLAN 数据帧的处理
  • 原文地址:https://blog.csdn.net/BS009/article/details/127996759