基于javaweb+mysql的ssm火车票预订管理系统(java+ssm+vue+elementui+mysql)

基于javaweb+mysql的ssm火车票预订管理系统(java+ssm+vue+elementui+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8、Node.js≥10

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行

前端:WebStorm/VSCode/HBuilderX等均可

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb+mysql的SSM火车票预订管理系统(java+ssm+vue+elementui+mysql)

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目 6.数据库:MySql 5.7/8.0等版本均可;

技术栈

后端:SSM(Spring+SpringMVC+Mybatis-plus) 前端:ElementUI+Vue

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目; 3. 将项目中config.properties配置文件中的数据库配置改为自己的配置,然后运行;

* @param oldPassword

* @param newPassword

* @param rePassword

* @param httpSession

* @return

*/

@RequestMapping("changePassword.do")

@ResponseBody

public Map<String, String> changePassword(String oldPassword, String newPassword,

String rePassword, HttpSession httpSession){

HashMap<String, String> map = new HashMap<String, String>();

if (newPassword.equals(rePassword)){

SystemManager admin = (SystemManager) httpSession.getAttribute("admin");


/**

* 个人工资信息

* @param pageNum

* @param limit

* @param year

* @param httpSession

* @return

* @throws Exception

*/

@RequestMapping("employeeSalaryList.do")

@ResponseBody


* @param newPassword

* @param rePassword

* @param httpSession

* @return

*/

@RequestMapping("changeEmployeePassword.do")

@ResponseBody

public Map<String, String> changeEmployeePassword(String oldPassword, String newPassword,

String rePassword, HttpSession httpSession){

HashMap<String, String> map = new HashMap<String, String>();

if (newPassword.equals(rePassword)){

Integer eid = (Integer) httpSession.getAttribute("employeeId");

try {


@RequestMapping("employeeSalaryList.do")

@ResponseBody

public EmployeeSalaryVO findSelective(

@RequestParam(value="page", defaultValue="1")int pageNum,

@RequestParam(value="limit", defaultValue="10") int limit,

@RequestParam(value="year", defaultValue="1") String year,

HttpSession httpSession) throws Exception {

Integer eId = (Integer) httpSession.getAttribute("employeeId");

//pageNum:起始页面  pageSize:每页的大小

PageHelper.startPage(pageNum,limit);


/**

* 查看个人信息

* @param httpSession

* @return

*/

@RequestMapping("inforEmployee.do")

public @ResponseBody EmployeeCustomVo getInforEmployee(HttpSession httpSession){

Integer id = (Integer) httpSession.getAttribute("employeeId");

EmployeeCustomVo employeeCustomVo = userInforService.getInforEmployee(id);

return employeeCustomVo;

/**

* 修改个人信息

* @param httpSession


public Message employeeLogin(HttpSession httpSession, String username,

String password, String identifyingcode)

if(StringUtils.isEmpty(username)) {

return Message.error("请填写工号");

if(StringUtils.isEmpty(password)) {

return Message.error("请填写密码");

if(StringUtils.isEmpty(identifyingcode)) {

return Message.error("请填写验证码");

String code = (String) httpSession.getAttribute("identifyingCode");

if(!identifyingcode.equalsIgnoreCase(code)){


if(StringUtils.isEmpty(password)) {

return Message.error("请填写密码");

if(StringUtils.isEmpty(identifyingcode)) {

return Message.error("请填写验证码");

String code = (String) httpSession.getAttribute("identifyingCode");

if(identifyingcode.equalsIgnoreCase(code)){

SystemManager manager = loginService.findSystemManagerByIdAndPassword(username, password);

if(manager==null) {

return Message.error("账号或密码错误");

// 保存到session

httpSession.setAttribute("admin",manager);


CaptchaUtil.outputCaptcha(request, response);

// 获取员工登陆界面

@RequestMapping("/")

public String getLoginPage(){

return "employee/login.html";

// 获取管理员登陆界面

@RequestMapping("/admin.do")

public String getAdminLoginPage(HttpServletRequest request){

String realPath = request.getServletContext().getRealPath("/");

request.getSession().setAttribute("realPath", realPath);

return "admin/adminLogin.html";

/**

* 员工登录操作

* @param model

public String logout(HttpSession httpSession){

httpSession.removeAttribute("employeeId");

return "redirect:/";

@RequestMapping(value = "/logoutAdmin.do")

public String logoutAdmin(HttpSession httpSession){

httpSession.removeAttribute("admin");

return "redirect:/admin.do";

用户管理操作: 

/**

* 用户管理操作

*/

@Controller

private UserService userService;

/**

* 用户添加页面

* @return

*/

@GetMapping("/add")

public String create() {

return "user/add";

/**

* 用户添加操作

* @param user

* @return


return Message.success("员工登录成功");

@RequestMapping(value = "/loginSuccess.do")

public String loginSucceses(Model model) throws Exception

return "employee/index.html";

/**

* 管理员登录操作

* @param model

* @param httpSession

* @param username

* @param password

* @param identifyingcode

* @return

if(StringUtils.isEmpty(user.getUserPwd())){

return MapControl.getInstance().error("请填写密码").getMap();

int result = userService.create(user);

if (result <= 0) {

return MapControl.getInstance().error().getMap();

return MapControl.getInstance().success().getMap();

/**

* 根据id删除

* @param id

* @return

*/

@PostMapping("/delete/{id}")

@ResponseBody


* @param rePassword

* @param httpSession

* @return

*/

@RequestMapping("changePassword.do")

@ResponseBody

public Map<String, String> changePassword(String oldPassword, String newPassword,

String rePassword, HttpSession httpSession){

HashMap<String, String> map = new HashMap<String, String>();

if (newPassword.equals(rePassword)){

SystemManager admin = (SystemManager) httpSession.getAttribute("admin");

String encodeByMD5 = MD5Utils.encodeByMD5(oldPassword);


}else{

map.put("type","error");

map.put("msg","两次密码不一致");

return map;

/**

* 查看个人信息

* @param httpSession

* @return

*/

@RequestMapping("inforEmployee.do")

public @ResponseBody EmployeeCustomVo getInforEmployee(HttpSession httpSession){

Integer id = (Integer) httpSession.getAttribute("employeeId");

EmployeeCustomVo employeeCustomVo = userInforService.getInforEmployee(id);

* @param limit

* @param year

* @param httpSession

* @return

* @throws Exception

*/

@RequestMapping("employeeSalaryList.do")

@ResponseBody

public EmployeeSalaryVO findSelective(

@RequestParam(value="page", defaultValue="1")int pageNum,


}else{

map.put("type","error");

map.put("msg","两次密码不一致");

return map;

/**

* 员工修改个人密码

* @param oldPassword

* @param newPassword

* @param rePassword

* @param httpSession

* 员工修改个人密码

* @param oldPassword

* @param newPassword

* @param rePassword

* @param httpSession

* @return

*/

@RequestMapping("changeEmployeePassword.do")

@ResponseBody

public Map<String, String> changeEmployeePassword(String oldPassword, String newPassword,

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值