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

news2025/7/5 1:40:40

旅游定制订单管理

旅游订单管理

作者主页:编程千纸鹤

作者简介: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

三,系统展示

前端首页

旅游产品搜索

 个性旅游定制

旅游线路购买

 

个人中心

 

 

 我的订单

我的定制

后台管理登陆

后台管理首页

 

旅游商品管理

旅游主题管理

用户信息管理

四,核心代码展示

package com.zzh.controller.backend;


import com.zzh.common.ServerResponse;
import com.zzh.entity.Product;
import com.zzh.entity.ProductDesc;
import com.zzh.entity.ThemeProduct;
import com.zzh.service.IProductDescService;
import com.zzh.service.IProductService;
import com.zzh.service.IThemeProductService;
import com.zzh.service.IThemeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author znz
 * @since 2022-11-13
 */
@Controller
@RequestMapping("/manager/product")
public class ProductManagerController {


    @Autowired
    private IProductService productService;
    @Autowired
    private IProductDescService productDescService;
    @Autowired
    private IThemeService themeService;
    @Autowired
    private IThemeProductService themeProductService;





    /**
     * 新增
     * @return
     */
    @RequestMapping("/save")
    @ResponseBody
    public ServerResponse save(Product product, ProductDesc productDesc, String[] themeName){

        System.out.println(product.getPrice());



        ThemeProduct[] themeProducts=new ThemeProduct[themeName.length];
        for (int i=0;i<themeName.length;i++){
            String themeId=themeService.selectIdByName(themeName[i]);
            if (null==themeId){
                return ServerResponse.createByErrorMessage("不存在该主题");
            }
            themeProducts[i]=new ThemeProduct();
            themeProducts[i].setThemeId(themeId);
            themeProducts[i].setThemeName(themeName[i]);
        }



        try {
            productService.create(product,productDesc,themeProducts);
        } catch (Exception e) {
            return ServerResponse.createByError();
        }

        return ServerResponse.createBySuccess();
    }

    @RequestMapping("/update/{pid}")
    @ResponseBody
    public ServerResponse update(@PathVariable String pid,Product product, ProductDesc productDesc, String[] themeName){

        product.setPid(pid);
        ThemeProduct[] themeProducts=new ThemeProduct[themeName.length];
        for (int i=0;i<themeName.length;i++){
            String themeId=themeService.selectIdByName(themeName[i]);
            if (null==themeId){
                return ServerResponse.createByErrorMessage("不存在该主题");
            }
            themeProducts[i]=new ThemeProduct();
            themeProducts[i].setThemeId(themeId);
            themeProducts[i].setThemeName(themeName[i]);
        }

        try {
            productService.update(product,productDesc,themeProducts);
        } catch (Exception e) {
            return ServerResponse.createByError();
        }

        return ServerResponse.createBySuccess();
    }



    /**
     * 下架
     * @param pid
     * @return
     */
    @ResponseBody
    @RequestMapping("/shelf/{pid}")
    public ServerResponse shelf(@PathVariable  String pid){
        Product product=new Product();
        product.setPid(pid);
        product.setStatus(2);//下架
        return ServerResponse.createByResult(product.updateById());
    }

    /**
     * 删除
     * @param pid
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/delete/{pid}")
    public ServerResponse delete(@PathVariable  String pid){

        productService.cascadeDeleteById(pid);
        return ServerResponse.createBySuccess();
    }

    /**
     * 批量删除
     * @param pids
     * @return
     */

    @ResponseBody
    @RequestMapping("/deleteBatchIds")
    public ServerResponse deleteBatchIds(String[] pids){
        if (pids.length>60){
            return ServerResponse.createByErrorMessage("超出一次删除的记录");
        }
        productService.deleteBatchIds(pids);
        return ServerResponse.createBySuccess();
    }


    private boolean setThemeProduct(String[] themeName,ThemeProduct[] themeProducts){
        themeProducts=new ThemeProduct[themeName.length];
        for (int i=0;i<themeName.length;i++){
            String themeId=themeService.selectIdByName(themeName[i]);
            if (null==themeId){
                return false;
            }
            themeProducts[i]=new ThemeProduct();
            themeProducts[i].setThemeId(themeId);
            themeProducts[i].setThemeName(themeName[i]);
        }
        return true;
    }


    @RequestMapping("/addView")
    public String addView(Model model){

        model.addAttribute("theme",themeService.selectList(null));
        return "backend/product_add";
    }

    @RequestMapping("/listView")
    public String listView(){
        return "backend/product_list";
    }

    @RequestMapping("/updateView/{pid}")
    public String updateView(@PathVariable String pid, Model model){
        Product product=productService.selectById(pid);
        ProductDesc productDesc=productDescService.selectById(pid);

        model.addAttribute("product",product);
        model.addAttribute("productDesc",productDesc);
        model.addAttribute("theme",themeService.selectList(null));
        model.addAttribute("tp",themeProductService.selectByPid(pid));
//        model.addAttribute("themeProduct",themeProductService.selectByPid(product.getPid()));
        //复选框的值先缺着
        return "backend/product_update";
    }

    /**
     * 检查日期输入合法性
     * @return
     */
    private boolean checkDateInputIllegal(Date stratDate,Date endDate){
        //计算天数
        int  days = (int)(stratDate.getTime()-endDate.getTime())/ (1000*3600*24);
        if (days<0||days>60){
            return false;
        }
        return true;
    }

}

package com.zzh.controller.backend;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.zzh.common.ResponseCode;
import com.zzh.common.ServerResponse;
import com.zzh.entity.ProductSell;
import com.zzh.service.IProductSellService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author znz
 * @since 2022-11-13
 */
@Controller
@RequestMapping("/manager/productSell")
public class ProductSellManageController {

    @Autowired
    private IProductSellService productSellService;

    /**
     * 列表
     * @param current
     * @param size
     * @return
     */
    @RequestMapping("/list")
    @ResponseBody
    public ServerResponse list(@RequestParam(value="current",defaultValue="1") int current, @RequestParam(value="size",defaultValue="10") int size){

        if (current<0||size<0){
            return ServerResponse.createByErrorCodeMessage(ResponseCode.ILLEGAL_ARGUMENT.getCode(),ResponseCode.ILLEGAL_ARGUMENT.getDesc());
        }

        return ServerResponse.createBySuccess(productSellService.selectPage(new Page(current,size))) ;
    }

    /**
     * 列表
     * @param current
     * @param size
     * @return
     */
    @RequestMapping("/list/{pid}")
    @ResponseBody
    public ServerResponse listBypid(@PathVariable String pid,@RequestParam(value="current",defaultValue="1") int current, @RequestParam(value="size",defaultValue="10") int size){

        if (current<0||size<0){
            return ServerResponse.createByErrorCodeMessage(ResponseCode.ILLEGAL_ARGUMENT.getCode(),ResponseCode.ILLEGAL_ARGUMENT.getDesc());
        }
        EntityWrapper<ProductSell> entityWrapper=new EntityWrapper();
        entityWrapper.eq("pid",pid);
        entityWrapper.orderBy("start_date",true);
        return ServerResponse.createBySuccess(productSellService.selectPage(new Page(current,size),entityWrapper)) ;
    }

    /**
     * 新增
     * @param productSell
     * @return
     */
    @RequestMapping("/save")
    @ResponseBody
    public ServerResponse create(ProductSell productSell){
        productSell.setCreateTime(new Date());
        return ServerResponse.createBySuccess(productSell.insert());
    }

    /**
     *修改
     * @param id
     * @param productSell
     * @return
     */
    @ResponseBody
    @RequestMapping("/update/{id}")
    public ServerResponse update(@PathVariable  String id, ProductSell productSell){
        productSell.setId(id);
        productSell.setUpdateTime(new Date());
        return ServerResponse.createByResult(productSell.updateById());
    }

    /**
     * 删除
     * @param id
     * @return
     */
    @ResponseBody
    @RequestMapping("/delete/{id}")
    public  ServerResponse delete(@PathVariable String id){
        ProductSell productSell=new ProductSell();
        productSell.setId(id);
        return ServerResponse.createByResult(productSell.deleteById());
    }

    /**
     * 批量删除
     * @param ids
     * @return
     */
    @ResponseBody
    @RequestMapping("/delete")
    public  ServerResponse delete(String[] ids){
        return ServerResponse.createByResult(productSellService.deleteBatchIds(Arrays.asList(ids)));
    }

    /**
     * 批量新增
     * @param productSells
     * @return
     */
    @RequestMapping("/insertBatch")
    @ResponseBody
    public ServerResponse insertBatch(ProductSell productSells,int days){
        if (days>30){
            return ServerResponse.createByErrorMessage("不能连续设置超过30天的产品销售");
        }
        ArrayList<ProductSell> productSellArrayList=new ArrayList<>();
        for (int i=1;i<=days;i++){
            ProductSell productSell=new ProductSell(productSells);
            Calendar c = Calendar.getInstance();
            c.setTime(productSell.getStartDate());
            c.add(Calendar.DAY_OF_MONTH, i);// +i天
            productSell.setStartDate(c.getTime());
            productSell.setCreateTime(new Date());
            productSellArrayList.add(productSell);
        }

        return ServerResponse.createByResult(productSellService.insertBatch(productSellArrayList));
    }

    @RequestMapping("/addView")
    public String addView(String pid, String title,Double price, Model model) throws UnsupportedEncodingException {
        String param = new String(title.getBytes("ISO8859-1"), "UTF-8");//解决get乱码
        model.addAttribute("pid",pid);
        model.addAttribute("title",param);
        model.addAttribute("price",price);
        return "backend/productSell_add";
    }

    @RequestMapping("/listView/{pid}")
    public String listView(@PathVariable String pid,Model model){
        model.addAttribute("pid",pid);
        return "backend/productSell_list";
    }

    @RequestMapping("/updateView/{id}")
    public String updateView(@PathVariable String id,Model model){
        model.addAttribute("productSell", productSellService.selectById(id));
        return "backend/productSell_update";
    }
}

五,项目总结

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

  1. 前端UI

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

2)后台:

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

3)数据库设计:

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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/29080.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

大一新生HTML期末作业,网页制作作业——明星介绍易烊千玺网站HTML+CSS

&#x1f389;精彩专栏推荐&#x1f447;&#x1f3fb;&#x1f447;&#x1f3fb;&#x1f447;&#x1f3fb; ✍️ 作者简介: 一个热爱把逻辑思维转变为代码的技术博主 &#x1f482; 作者主页: 【主页——&#x1f680;获取更多优质源码】 &#x1f393; web前端期末大作业…

【配电网规划】配电网网架重构、DG位置选择容量配置(Matlab代码实现)

&#x1f468;‍&#x1f393;个人主页&#xff1a;研学社的博客 &#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜…

基于主动视觉机制的深度学习--一个综合池化框架

卷积神经网络(CNN)是深度学习的代表算法之一&#xff0c;长期以来被广泛应用于图像识别领域。它是受到了生物处理过程的启发&#xff0c;通过模仿人类视觉系统(HVS)的工作机制&#xff0c;完成各种视觉任务等。但与HVS相比&#xff0c;CNN不能够像人类一样&#xff0c;迅速的分…

项目管理(项目管理中的重要角色项目经理)

项目经理: 项目经理是由执行组织委派,领导团队实 现项目目标的个人。 项目经理如何进行沟通: 1、通过多种方法(例如口头、书面和非言语)培养完善的技能; 2、创建、维护和遵循沟通计划和进度计划; 3、不断地以可预见的方式进行沟通; 4、寻求了解项目相关方的沟通需求…

非人工智能方向粗糙理解深度学习

非人工智能方向粗糙理解深度学习线性模型基本形式线性回归数据集学习目标均方误差监督学习弱监督学习不完全监督主动学习半监督学习迁移学习不确切监督不准确监督线性模型基本形式 你要训练的线性模型&#xff08;模型不一定是线性的&#xff0c;为方便理解&#xff0c;此处以…

ceph部署踩坑——OSD服务无法启动

前话&#xff1a;部署ceph时&#xff0c;所有OSD节点的服务启动报错&#xff0c;无法正常启动服务。 问题现象&#xff1a;OSD节点启动ceph-osd0.service服务报错&#xff0c;start request repeated too quickly for ceph-osd0.service 解决过程&#xff1a; 1、修改启动的…

线上演唱会成歌手身价新标准,十月天传媒正式合作腾格尔

曾记得某位音乐人说过&#xff0c;每一位歌手都有自己的段位&#xff0c;其实也就是所谓的身价和演出费用。歌手的身价段位&#xff0c;要通过演唱会的出场费来体现&#xff0c;可惜最近两年由于特殊原因&#xff0c;线下演唱会已经很难举办。 既然线下演唱会很难举办&#xff…

Nginx:过滤模块的实现

文章目录1、过滤模块的概念2、过滤模块原理2.1、过滤链表2.2、执行顺序3、过滤模块的实现3.1、编写模块结构3.1.1、模块配置结构3.1.2、模块配置命令3.1.3、模块上下文3.1.4、定义模块3.2、设置响应头3.3、设置响应体3.4、编译测试3.5、完整代码4、参考文章参考<零声教育>…

牛客网语法篇练习分支控制(二)

1.牛牛的通勤路上有两种选择&#xff0c;要么走路&#xff0c;要么打车&#xff0c;牛牛走路的速度是 1m/s 。打车的速度的 10m/s &#xff0c;但是打车需要等出租车 10 s&#xff0c;请你计算牛牛想尽快到公司应该选择打车还是走路。 a int(input()) if a < a / 10 10:p…

单商户商城系统功能拆解35—分销应用—分销概览

单商户商城系统&#xff0c;也称为B2C自营电商模式单店商城系统。可以快速帮助个人、机构和企业搭建自己的私域交易线上商城。 单商户商城系统完美契合私域流量变现闭环交易使用。通常拥有丰富的营销玩法&#xff0c;例如拼团&#xff0c;秒杀&#xff0c;砍价&#xff0c;包邮…

热烈祝贺|盏百年生物科技有限公司受邀参加2022世界滋补产业生态大会

自2017年“盏百年”品牌创立以来&#xff0c;公司致力于以鲜炖燕窝为导向&#xff0c;以燕窝全产业链建设为核心&#xff0c;打造中国燕窝文化专营品牌。 5年来&#xff0c;盏百年凭借实体体验服务店连锁经营&#xff0c;打造一对一私人滋补管家这一创新模式&#xff0c;树立了…

什么是分布式锁?他解决了什么样的问题?

相信对于朋友们来说&#xff0c;锁这个东西已经非常熟悉了&#xff0c;在说分布式锁之前&#xff0c;我们来聊聊单体应用时候的本地锁&#xff0c;这个锁很多小伙伴都会用 ✔本地锁 我们在开发单体应用的时候&#xff0c;为了保证多个线程并发访问公共资源的时候&#xff0c;…

Apache DolphinScheduler新一代分布式工作流任务调度平台实战

总体架构 MasterServer&#xff1a;MasterServer采用分布式无中心设计理念&#xff0c;MasterServer主要负责 DAG 任务切分、任务提交监控&#xff0c;并同时监听其它MasterServer和WorkerServer的健康状态。 MasterServer服务启动时向Zookeeper注册临时节点&#xff0c;通过监…

Java集合框架【二容器[LinkedList容器类、Set接口]】

文章目录一 LinkedList容器类1.1 LinkedList的使用(List接口)1.2 Linked的使用(非List标准)1.4 LinkedList源码分析二 Set接口2.1 Set接口特点2.2 HashSet容器类2.2.1 Hash算法原理2.2.2 HashSet的例子2.2.3 HashSet存储特征分析2.3 TreeSet容器类2.4 通过元素自身实现比较规则…

[附源码]java毕业设计学校失物招领系统

项目运行 环境配置&#xff1a; Jdk1.8 Tomcat7.0 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术&#xff1a; SSM mybatis Maven Vue 等等组成&#xff0c;B/S模式 M…

【尚硅谷】IDEA2022快速上手开发利器

【尚硅谷】IDEA2022快速上手开发利器 【尚硅谷】IDEA2022快速上手开发利器一、详细设置1.1 如何打开详细配置界面1.2 系统设置1.3 设置整体主题1.4 设置编辑器主题样式1.5 显示行号与方法分隔符1.6 代码智能提示功能1.7 自动导包配置1.8 设置项目文件编码&#xff08;一定要改&…

uniapp小程序实现圆环效果

文章目录调用组件uniapp小程序利用 canvas2d实现根据指定时间动态画圆环效果调用 <view class"dubbing-control" :style"{width:recordWidth,height:recordWidth}"><dubbing-button v-if"show" :width.sync"recordWidth" :s…

e智团队实验室项目-第四周-YOLOv论文的对比实验中遇到的问题

贾小云*&#xff0c;赵雅玲 *, 张钊* , 李锦玉*&#xff0c;迟梦瑶*&#xff0c;赵尉*&#xff0c;潘玉*&#xff0c;刘立赛&#xff0c;祝大双&#xff0c;李月&#xff0c;曹海艳&#xff0c; (淮北师范大学计算机科学与技术学院&#xff0c;淮北师范大学经济与管理学院&…

2022年度国家级科技企业孵化器开始申报

科技部火炬中心关于开展2022年度国家级科技企业孵化器申报工作的通知各省、自治区、直辖市及计划单列市科技厅&#xff08;委、局&#xff09;&#xff0c;新疆生产建设兵团科技局&#xff1a; 为贯彻落实党的二十大精神&#xff0c;加快实施创新驱动发展战略&#xff0c;加快实…

MySQL操作

目录 1.对库操作 1.1 创建数据库 1.1.1 查看有哪些数据库 1.1.2 指定数据库的字符集 1.1.3 查重创建数据库 1.1.4 查看警告信息 1.1.5 小知识:SQL语句中的分号 1.1.6 小知识:设置默认字符集 1.1.7 小知识:语句中的大小写 1.2 使用/选中数据库 1.3 删除数据库(慎重操作…