基于ssm+vue汽车售票网站源码和论文088
开发工具:idea
数据库mysql5.7+
数据库链接工具:navcat,小海豚等
技术:ssm
摘 要
互联网发展至今,无论是其理论还是技术都已经成熟,而且它广泛参与在社会中的方方面面。它让信息都可以通过网络传播,搭配信息管理工具可以很好地为人们提供服务。针对汽车售票信息管理混乱,出错率高,信息安全性差,劳动强度大,费时费力等问题,采用汽车售票网站可以有效管理,使信息管理能够更加科学和规范。
汽车售票网站在Eclipse环境中,使用Java语言进行编码,使用Mysql创建数据表保存本系统产生的数据。系统可以提供信息显示和相应服务,其管理员负责审核会员充值,审核客户购票信息以及会员购票信息,管理客运班次与留言板,管理会员等级。客户查看客运班次,购买并支付车票,在前台联系客服,向管理员留言,在后台查看购票记录,进行会员充值。会员通过会员购票渠道进行购票,并在后台支付车票,查看购票审核情况,查看会员等级,管理收藏信息。
总之,汽车售票网站集中管理信息,有着保密性强,效率高,存储空间大,成本低等诸多优点。它可以降低信息管理成本,实现信息管理计算机化。
关键词:汽车售票网站;Java语言;Mysql
1.1 课题背景
互联网发展至今,无论是其理论还是技术都已经成熟,而且它广泛参与在社会中的方方面面。它让信息都可以通过网络传播,搭配信息管理工具可以很好地为人们提供服务。所以各行业,尤其是规模较大的企业和学校等都开始借助互联网和软件工具管理信息,传播信息,共享信息等等,以此可以增强自身实力,提高在同行业当中的竞争能力,并从各种激烈的竞争中获取发展的机会。针对汽车售票信息管理混乱,出错率高,信息安全性差,劳动强度大,费时费力等问题,经过分析和考虑,在目前的情况下,可以引进一款汽车售票网站这样的现代化管理工具,这个工具就是解决上述问题的最好的解决方案。它不仅可以实时完成信息处理,还缩短汽车售票信息管理流程,使其系统化和规范化。同时还可以减少工作量,节约汽车售票信息管理需要的人力和资金。所以汽车售票网站是信息管理环节中不可缺少的工具,它对管理者来说非常重要。
1.2 课题意义
现如今,信息种类变得越来越多,信息的容量也变得越来越大,这就是信息时代的标志。近些年,计算机科学发展得也越来越快,而且软件开发技术也越来越成熟,因此,在生活中的各个领域,只要存在信息管理,几乎都有计算机的影子,可以说很多行业都采用计算机的方式管理信息。信息计算机化处理相比手工操作,有着保密性强,效率高,存储空间大,成本低等诸多优点。针对汽车售票信息管理,采用汽车售票网站可以有效管理,使信息管理能够更加科学和规范。
总之,在实际中使用汽车售票网站,其意义如下:
第一点:汽车售票网站的实际运用,可以帮助管理人员在短时间内完成信息处理工作;
第二点:通过系统页面的合理排版布局,可以更加直观的展示系统的内容,并且使用者可以随时阅读页面信息,随时操作系统提供的功能;
第三点:可以实现信息管理计算机化;
第四点:可以降低信息管理成本;
文章来源:https://www.toymoban.com/news/detail-684231.html
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.HuiyuanEntity;
import com.entity.view.HuiyuanView;
import com.service.HuiyuanService;
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-02 18:43:53
*/
@RestController
@RequestMapping("/huiyuan")
public class HuiyuanController {
@Autowired
private HuiyuanService huiyuanService;
@Autowired
private TokenService tokenService;
/**
* 登录
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
HuiyuanEntity user = huiyuanService.selectOne(new EntityWrapper<HuiyuanEntity>().eq("yonghuming", username));
if(user==null || !user.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(), username,"huiyuan", "会员" );
return R.ok().put("token", token);
}
/**
* 注册
*/
@IgnoreAuth
@RequestMapping("/register")
public R register(@RequestBody HuiyuanEntity huiyuan){
//ValidatorUtils.validateEntity(huiyuan);
HuiyuanEntity user = huiyuanService.selectOne(new EntityWrapper<HuiyuanEntity>().eq("yonghuming", huiyuan.getYonghuming()));
if(user!=null) {
return R.error("注册用户已存在");
}
Long uId = new Date().getTime();
huiyuan.setId(uId);
huiyuanService.insert(huiyuan);
return R.ok();
}
/**
* 退出
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* 获取用户的session用户信息
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
HuiyuanEntity user = huiyuanService.selectById(id);
return R.ok().put("data", user);
}
/**
* 密码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
HuiyuanEntity user = huiyuanService.selectOne(new EntityWrapper<HuiyuanEntity>().eq("yonghuming", username));
if(user==null) {
return R.error("账号不存在");
}
user.setMima("123456");
huiyuanService.updateById(user);
return R.ok("密码已重置为:123456");
}
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,HuiyuanEntity huiyuan,
HttpServletRequest request){
EntityWrapper<HuiyuanEntity> ew = new EntityWrapper<HuiyuanEntity>();
PageUtils page = huiyuanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, huiyuan), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,HuiyuanEntity huiyuan, HttpServletRequest request){
EntityWrapper<HuiyuanEntity> ew = new EntityWrapper<HuiyuanEntity>();
PageUtils page = huiyuanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, huiyuan), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( HuiyuanEntity huiyuan){
EntityWrapper<HuiyuanEntity> ew = new EntityWrapper<HuiyuanEntity>();
ew.allEq(MPUtil.allEQMapPre( huiyuan, "huiyuan"));
return R.ok().put("data", huiyuanService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(HuiyuanEntity huiyuan){
EntityWrapper< HuiyuanEntity> ew = new EntityWrapper< HuiyuanEntity>();
ew.allEq(MPUtil.allEQMapPre( huiyuan, "huiyuan"));
HuiyuanView huiyuanView = huiyuanService.selectView(ew);
return R.ok("查询会员成功").put("data", huiyuanView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
HuiyuanEntity huiyuan = huiyuanService.selectById(id);
return R.ok().put("data", huiyuan);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
HuiyuanEntity huiyuan = huiyuanService.selectById(id);
return R.ok().put("data", huiyuan);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody HuiyuanEntity huiyuan, HttpServletRequest request){
huiyuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(huiyuan);
HuiyuanEntity user = huiyuanService.selectOne(new EntityWrapper<HuiyuanEntity>().eq("yonghuming", huiyuan.getYonghuming()));
if(user!=null) {
return R.error("用户已存在");
}
huiyuan.setId(new Date().getTime());
huiyuanService.insert(huiyuan);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody HuiyuanEntity huiyuan, HttpServletRequest request){
huiyuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(huiyuan);
HuiyuanEntity user = huiyuanService.selectOne(new EntityWrapper<HuiyuanEntity>().eq("yonghuming", huiyuan.getYonghuming()));
if(user!=null) {
return R.error("用户已存在");
}
huiyuan.setId(new Date().getTime());
huiyuanService.insert(huiyuan);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody HuiyuanEntity huiyuan, HttpServletRequest request){
//ValidatorUtils.validateEntity(huiyuan);
huiyuanService.updateById(huiyuan);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
huiyuanService.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<HuiyuanEntity> wrapper = new EntityWrapper<HuiyuanEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = huiyuanService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
文章来源地址https://www.toymoban.com/news/detail-684231.html
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.HuiyuangoupiaojiluEntity;
import com.entity.view.HuiyuangoupiaojiluView;
import com.service.HuiyuangoupiaojiluService;
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-02 18:43:53
*/
@RestController
@RequestMapping("/huiyuangoupiaojilu")
public class HuiyuangoupiaojiluController {
@Autowired
private HuiyuangoupiaojiluService huiyuangoupiaojiluService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,HuiyuangoupiaojiluEntity huiyuangoupiaojilu,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("huiyuan")) {
huiyuangoupiaojilu.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<HuiyuangoupiaojiluEntity> ew = new EntityWrapper<HuiyuangoupiaojiluEntity>();
PageUtils page = huiyuangoupiaojiluService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, huiyuangoupiaojilu), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,HuiyuangoupiaojiluEntity huiyuangoupiaojilu, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("huiyuan")) {
huiyuangoupiaojilu.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<HuiyuangoupiaojiluEntity> ew = new EntityWrapper<HuiyuangoupiaojiluEntity>();
PageUtils page = huiyuangoupiaojiluService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, huiyuangoupiaojilu), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( HuiyuangoupiaojiluEntity huiyuangoupiaojilu){
EntityWrapper<HuiyuangoupiaojiluEntity> ew = new EntityWrapper<HuiyuangoupiaojiluEntity>();
ew.allEq(MPUtil.allEQMapPre( huiyuangoupiaojilu, "huiyuangoupiaojilu"));
return R.ok().put("data", huiyuangoupiaojiluService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(HuiyuangoupiaojiluEntity huiyuangoupiaojilu){
EntityWrapper< HuiyuangoupiaojiluEntity> ew = new EntityWrapper< HuiyuangoupiaojiluEntity>();
ew.allEq(MPUtil.allEQMapPre( huiyuangoupiaojilu, "huiyuangoupiaojilu"));
HuiyuangoupiaojiluView huiyuangoupiaojiluView = huiyuangoupiaojiluService.selectView(ew);
return R.ok("查询会员购票记录成功").put("data", huiyuangoupiaojiluView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
HuiyuangoupiaojiluEntity huiyuangoupiaojilu = huiyuangoupiaojiluService.selectById(id);
return R.ok().put("data", huiyuangoupiaojilu);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
HuiyuangoupiaojiluEntity huiyuangoupiaojilu = huiyuangoupiaojiluService.selectById(id);
return R.ok().put("data", huiyuangoupiaojilu);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody HuiyuangoupiaojiluEntity huiyuangoupiaojilu, HttpServletRequest request){
huiyuangoupiaojilu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(huiyuangoupiaojilu);
huiyuangoupiaojiluService.insert(huiyuangoupiaojilu);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody HuiyuangoupiaojiluEntity huiyuangoupiaojilu, HttpServletRequest request){
huiyuangoupiaojilu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(huiyuangoupiaojilu);
huiyuangoupiaojilu.setUserid((Long)request.getSession().getAttribute("userId"));
huiyuangoupiaojiluService.insert(huiyuangoupiaojilu);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody HuiyuangoupiaojiluEntity huiyuangoupiaojilu, HttpServletRequest request){
//ValidatorUtils.validateEntity(huiyuangoupiaojilu);
huiyuangoupiaojiluService.updateById(huiyuangoupiaojilu);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
huiyuangoupiaojiluService.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<HuiyuangoupiaojiluEntity> wrapper = new EntityWrapper<HuiyuangoupiaojiluEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("huiyuan")) {
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
}
int count = huiyuangoupiaojiluService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
到了这里,关于基于ssm+vue汽车售票网站源码和论文的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!