JAVA毕业设计176—基于Java+Springboot+vue3的交通旅游订票管理系统(源代码+数据库)

毕设所有选题:
https://blog.csdn.net/2303_76227485/article/details/131104075

基于Java+Springboot+vue3的交通旅游订票管理系统(源代码+数据库)176

一、系统介绍

本项目前后端分离(可以改为ssm版本),分为用户、管理员两种角色

1、用户:

  • 注册、登录、景点搜索、火车票预订、飞机票预定、汽车票预定、订票管理、个人信息、密码修改、我的收藏

2、管理员:

  • 管理员管理、用户管理、火车票管理、飞机票管理、汽车票管理、订票管理、景点管理、轮播图管理

二、所用技术

后端技术栈:

  • Springboot
  • mybatisPlus
  • Mysql
  • Maven

前端技术栈:

  • Vue3
  • Vue-router
  • axios
  • elementPlus

三、环境介绍

基础环境 :IDEA/eclipse, JDK1.8, Mysql5.7及以上, Maven3.6, node14, navicat

所有项目以及源代码本人均调试运行无问题 可支持远程调试运行

四、页面截图

1、用户:






















2、管理员:











五、浏览地址

前台地址:http://localhost:8082

用户账号密码:用户账号1/123456

后台地址:http://localhost:8081

管理员账户密码:admin/admin

六、部署教程

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并执行项目的sql文件

  2. 使用IDEA/Eclipse导入server_code项目,若为maven项目请选择maven,等待依赖下载完成

  3. 修改application.yml里面的数据库配置,src/main/java/com/SpringbootSchemaApplication.java启动后端项目

  4. vscode或idea打开client_code后台项目

  5. 在编译器中打开terminal,执行npm install 依赖下载完成后执行 npm run serve,执行成功后会显示访问地址

  6. vscode或idea打开manage_code后台项目

  7. 在编译器中打开terminal,执行npm install 依赖下载完成后执行 npm run serve,执行成功后会显示访问地址

七、核心代码

bash 复制代码
@RestController
@RequestMapping("/huochexinxi")
public class HuochexinxiController {
    @Autowired
    private HuochexinxiService huochexinxiService;

    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,HuochexinxiEntity huochexinxi,
		HttpServletRequest request){
        EntityWrapper<HuochexinxiEntity> ew = new EntityWrapper<HuochexinxiEntity>();

		PageUtils page = huochexinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, huochexinxi), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,HuochexinxiEntity huochexinxi, 
		HttpServletRequest request){
        EntityWrapper<HuochexinxiEntity> ew = new EntityWrapper<HuochexinxiEntity>();

		PageUtils page = huochexinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, huochexinxi), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( HuochexinxiEntity huochexinxi){
       	EntityWrapper<HuochexinxiEntity> ew = new EntityWrapper<HuochexinxiEntity>();
      	ew.allEq(MPUtil.allEQMapPre( huochexinxi, "huochexinxi")); 
        return R.ok().put("data", huochexinxiService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(HuochexinxiEntity huochexinxi){
        EntityWrapper< HuochexinxiEntity> ew = new EntityWrapper< HuochexinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( huochexinxi, "huochexinxi")); 
		HuochexinxiView huochexinxiView =  huochexinxiService.selectView(ew);
		return R.ok("查询火车信息成功").put("data", huochexinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        HuochexinxiEntity huochexinxi = huochexinxiService.selectById(id);
		huochexinxi = huochexinxiService.selectView(new EntityWrapper<HuochexinxiEntity>().eq("id", id));
        return R.ok().put("data", huochexinxi);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        HuochexinxiEntity huochexinxi = huochexinxiService.selectById(id);
		huochexinxi = huochexinxiService.selectView(new EntityWrapper<HuochexinxiEntity>().eq("id", id));
        return R.ok().put("data", huochexinxi);
    }
    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody HuochexinxiEntity huochexinxi, HttpServletRequest request){
    	huochexinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(huochexinxi);
        huochexinxiService.insert(huochexinxi);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody HuochexinxiEntity huochexinxi, HttpServletRequest request){
    	huochexinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(huochexinxi);
        huochexinxiService.insert(huochexinxi);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    @Transactional
    public R update(@RequestBody HuochexinxiEntity huochexinxi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(huochexinxi);
        huochexinxiService.updateById(huochexinxi);//全部更新
        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        huochexinxiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
   
}
相关推荐
练习时长一年2 分钟前
AopAutoConfiguration源码阅读
java·spring boot·intellij-idea
源码宝1 小时前
【智慧工地源码】智慧工地云平台系统,涵盖安全、质量、环境、人员和设备五大管理模块,实现实时监控、智能预警和数据分析。
java·大数据·spring cloud·数据分析·源码·智慧工地·云平台
David爱编程2 小时前
面试必问!线程生命周期与状态转换详解
java·后端
LKAI.3 小时前
传统方式部署(RuoYi-Cloud)微服务
java·linux·前端·后端·微服务·node.js·ruoyi
HeyZoeHey3 小时前
Mybatis执行sql流程(一)
java·sql·mybatis
2301_793086873 小时前
SpringCloud 07 微服务网关
java·spring cloud·微服务
柳贯一(逆流河版)4 小时前
Spring 三级缓存:破解循环依赖的底层密码
java·spring·缓存·bean的循环依赖
Q_Q19632884755 小时前
python的电影院座位管理可视化数据分析系统
开发语言·spring boot·python·django·flask·node.js·php
该用户已不存在5 小时前
OpenJDK、Temurin、GraalVM...到底该装哪个?
java·后端
BYSJMG6 小时前
计算机大数据毕业设计推荐:基于Hadoop+Spark的食物口味差异分析可视化系统【源码+文档+调试】
大数据·hadoop·分布式·python·spark·django·课程设计