大家好!我是程序猿老A,感谢您阅读本文,欢迎一键三连哦。
💞当前专栏:Java毕业设计
精彩专栏推荐👇🏻👇🏻👇🏻
开发环境
开发语言:Java
框架:ssm
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7
数据库工具:Navicat12
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器
源码下载地址:
https://download.csdn.net/download/2301_76953549/89088431
论文目录
【如需全文请按文末获取联系】
一、项目简介
主要实现了用户功能模块和管理员功能模块两大部分,用户可查看旅行相关信息,注册登录后还可实现酒店客房预订和景点购票等,同时管理员可进入系统后台对系统进行全面管理操作。通过对系统的功能进行测试,测试结果证明该系统界面友好、功能完善,有着较高的使用价值,具有庞大的潜在用户群体和较广阔的应用前景。
二、系统设计
2.1软件功能模块设计
本线上旅行信息管理系统结构图如图4-1所示。
2.2数据库设计
(1)购票信息实体属性E-R图如图4-2所示:
(2)景点信息实体属性E-R图如图4-3所示:
(3)酒店信息实体属性E-R图如图4-4所示:
(5)客房预订信息实体属性E-R图如图4-6所示:
三、系统项目部分截图
3.1管理员功能模块的实现
管理员登录界面
管理员要想进入系统后台对系统进行管理操作,必须登录系统后台,管理员登录界面展示如图5-1所示。
景点分类管理界面
管理员能够查看、添加、修改和删除景点分类信息,景点分类管理界面展示如图5-3所示。
景点信息管理界面
管理员可以增删改查景点信息,景点信息管理界面展示如图5-4所示。
酒店信息管理界面
管理员可增删改查酒店信息,酒店信息管理界面展示如图5-5所示。
3.2用户功能模块的实现
系统主界面
用户在系统前台可查看系统信息,包括首页、景点信息、酒店信息以及客房信息等,系统主界面展示如图5-8所示。
用户登录界面
用户要登录界面可输入用户名、密码,点击登录按钮进行登录系统,用户登录界面展示如图5-9所示。
酒店详情界面
用户可选择酒店查看详情信息,登录后可进行预订操作,酒店详情界面展示如图5-11所示。
酒店预订界面
用户登录后可选择酒店进行预订操作,酒店预订界面展示如图5-12所示。
景点购票界面
用户登录后可选择景点进行购票操作,景点购票界面展示如图5-14所示。
四、部分核心代码
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.KefangxinxiEntity;
import com.entity.view.KefangxinxiView;
import com.service.KefangxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 客房信息
* 后端接口
* @author
* @email
* @date 2021-04-01 14:03:08
*/
@RestController
@RequestMapping("/kefangxinxi")
public class KefangxinxiController {
@Autowired
private KefangxinxiService kefangxinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,KefangxinxiEntity kefangxinxi,
HttpServletRequest request){
EntityWrapper<KefangxinxiEntity> ew = new EntityWrapper<KefangxinxiEntity>();
PageUtils page = kefangxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kefangxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,KefangxinxiEntity kefangxinxi, HttpServletRequest request){
EntityWrapper<KefangxinxiEntity> ew = new EntityWrapper<KefangxinxiEntity>();
PageUtils page = kefangxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kefangxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( KefangxinxiEntity kefangxinxi){
EntityWrapper<KefangxinxiEntity> ew = new EntityWrapper<KefangxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( kefangxinxi, "kefangxinxi"));
return R.ok().put("data", kefangxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(KefangxinxiEntity kefangxinxi){
EntityWrapper< KefangxinxiEntity> ew = new EntityWrapper< KefangxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( kefangxinxi, "kefangxinxi"));
KefangxinxiView kefangxinxiView = kefangxinxiService.selectView(ew);
return R.ok("查询客房信息成功").put("data", kefangxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
KefangxinxiEntity kefangxinxi = kefangxinxiService.selectById(id);
return R.ok().put("data", kefangxinxi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
KefangxinxiEntity kefangxinxi = kefangxinxiService.selectById(id);
return R.ok().put("data", kefangxinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody KefangxinxiEntity kefangxinxi, HttpServletRequest request){
kefangxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(kefangxinxi);
kefangxinxiService.insert(kefangxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody KefangxinxiEntity kefangxinxi, HttpServletRequest request){
kefangxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(kefangxinxi);
kefangxinxiService.insert(kefangxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody KefangxinxiEntity kefangxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(kefangxinxi);
kefangxinxiService.updateById(kefangxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
kefangxinxiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<KefangxinxiEntity> wrapper = new EntityWrapper<KefangxinxiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = kefangxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
获取源码或论文
如需对应的论文或源码,以及其他定制需求,也可以下方微❤联系。