基于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配置文件中的数据库配置改为自己的配置,然后运行;

个人中心Controller/**

* 个人中心Controller

*/

@Controller

public class UserInforController {

@Autowired

private UserInforServiceImpl userInforService = null;

/**

* 修改密码操作

* @param oldPassword

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

try {

userInforService.updateEmployeePassword(eid, oldPassword, newPassword);

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

map.put("msg","密码修改成功");

return map;

} catch (CustomException e) {

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

map.put("msg","原密码错误");

return map;

}else{

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


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

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

if(!identifyingcode.equalsIgnoreCase(code)){

return Message.error("验证码错误");

Employee employee = loginService.findEmployeeByIdAndPassword(username, password);

if(employee==null) {

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

httpSession.setAttribute("employeeId",employee.geteId());

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

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

public String loginSucceses(Model model) throws Exception

* @param identifyingcode

* @return

*/

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

@ResponseBody

public Message adminLogin(HttpSession httpSession, String username,

String password, String identifyingcode)

if(StringUtils.isEmpty(username)) {

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

if(StringUtils.isEmpty(password)) {


/**

* 查看个人信息

* @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

* @return

*/

@RequestMapping("inforEmployee.do")

public @ResponseBody EmployeeCustomVo getInforEmployee(HttpSession httpSession){

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

EmployeeCustomVo employeeCustomVo = userInforService.getInforEmployee(id);

return employeeCustomVo;

/**


@ResponseBody

@RequestMapping("updateInforEmployee.do")

public Message updateInforEmployee(HttpSession httpSession, Employee employee){

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

employee.seteId(id);

if(userInforService.updateEmploueeById(id,employee)<=0) {

return Message.error("修改信息失败");

return Message.success();

/**

* 个人工资信息

* @param pageNum


public @ResponseBody EmployeeCustomVo getInforEmployee(HttpSession httpSession){

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

EmployeeCustomVo employeeCustomVo = userInforService.getInforEmployee(id);

return employeeCustomVo;

/**

* 修改个人信息

* @param httpSession

* @param employee

* @return

*/

@ResponseBody

@RequestMapping("updateInforEmployee.do")


@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


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

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

return "admin/adminLogin.html";

/**

* 员工登录操作

* @param model

* @param httpSession

* @param username

* @param password

* @param identifyingcode

* @return

*/

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

@ResponseBody
@Controller

public class UserInforController {

@Autowired

private UserInforServiceImpl userInforService = null;

/**

* 修改密码操作

* @param oldPassword

* @param newPassword

* @param rePassword

* @param httpSession

* @return

* @param employee

* @return

*/

@ResponseBody

@RequestMapping("updateInforEmployee.do")

public Message updateInforEmployee(HttpSession httpSession, Employee employee){

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

employee.seteId(id);

if(userInforService.updateEmploueeById(id,employee)<=0) {

return Message.error("修改信息失败");


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

/**

* 根据id删除

* @param id

* @return

*/

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

@ResponseBody

public Map<String, Object> delete(@PathVariable("id") Integer id) {

int result = userService.delete(id);

if (result <= 0) {


* 用户添加页面

* @return

*/

@GetMapping("/add")

public String create() {

return "user/add";

/**

* 用户添加操作

* @param user

* @return

*/

@PostMapping("/add")

@ResponseBody


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";

/**


return Message.success();

/**

* 个人工资信息

* @param pageNum

* @param limit

* @param year

* @param httpSession

* @return

* @throws Exception

*/


* @param employee

* @return

*/

@ResponseBody

@RequestMapping("updateInforEmployee.do")

public Message updateInforEmployee(HttpSession httpSession, Employee employee){

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

employee.seteId(id);

if(userInforService.updateEmploueeById(id,employee)<=0) {

return Message.error("修改信息失败");

return Message.success();

/**

* 个人工资信息


/**

* 修改个人信息

* @param httpSession

* @param employee

* @return

*/

@ResponseBody

@RequestMapping("updateInforEmployee.do")

public Message updateInforEmployee(HttpSession httpSession, Employee employee){

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

employee.seteId(id);

if(userInforService.updateEmploueeById(id,employee)<=0) {

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

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值