基于javaweb和mysql的springboot驾校预约学习系统(java+springboot+mybaits+vue+elementui+mysql)

私信源码获取及调试交流

私信源码获取及调试交流

运行环境

Java≥8、MySQL≥5.7、Node.js≥14

开发工具

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

前端:WebStorm/VSCode/HBuilderX等均可

适用

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

功能说明

基于javaweb的SpringBoot驾校预约学习系统(java+springboot+mybaits+vue+elementui+mysql)

项目介绍

基于Springboot+vue实现的驾校预约学习系统

系统包含用户、教练、管理员三个角色

用户:登录、注册、主页、查看考试信息(进行考试)、查看教练信息、教练预约、查看学习资料、收藏学习资料、留言板、公告信息查看、个人中心、考试记录、错题本等功能

教练:登录、个人中心、公告信息管理、教练预约管理、留言板管理、学习资料管理、试卷管理、试题管理等功能

管理员:登录、个人中心、教练管理、用户管理、公告信息管理、教练预约管理、留言板管理、学习资料管理、试卷管理、试题管理、考试管理、基础数据管理、系统管理等功能

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。

2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;

3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;

4.数据库:MySql 5.7/8.0版本均可;

5.是否Maven项目:是;

技术栈

后端:SpringBoot+Mybaits

前端:Vue+elementui

使用说明

项目运行:

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

  2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;

  3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;

  4. 运行项目,在浏览器中输入地址:

前台地址:

http://localhost:8080/jiaxiaoyuyuexuexixitong/front/index.html

用户账户:a1 密码:123456

后台登录页面

http://localhost:8080/jiaxiaoyuyuexuexixitong/admin/dist/index.html

管理员账户:admin 密码:admin

用户账户:a1 密码:123456

教练账户:a1 密码:123456

文档介绍展示:

首页展示:

教练信息展示:

考试信息展示:

测试试卷展示:

教练信息展示:

教练管理展示列表:

用户管理列表展示:

教练预约管理列表展示:

学习资料管理展示:


public ResultObj saveUserRole(UserVo userVo) {

try {

this.userService.saveUserRole(userVo);

return ResultObj.DISPATCH_SUCCESS;

} catch (Exception e) {

e.printStackTrace();

return ResultObj.DISPATCH_ERROR;

/*

* 修改个人信息

*/

@RequestMapping("updateUserInfo")


this.roleService.addRole(roleVo);

return ResultObj.ADD_SUCCESS;

} catch (Exception e) {

e.printStackTrace();

return ResultObj.ADD_ERROR;

/*

* 修改角色

*/

@RequestMapping("updateRole")

public ResultObj updateRole(RoleVo roleVo) {

try {


e.printStackTrace();

return ResultObj.DISPATCH_ERROR;

/*

* 修改个人信息

*/

@RequestMapping("updateUserInfo")

public ResultObj updateUserInfo(UserVo userVo) {

try {

String headimg = userVo.getHeadimg();

if (headimg.endsWith(SysConstast.FILE_UPLOAD_TEMP)) {

String filePath = AppFileUtils.updateFileName(headimg, SysConstast.FILE_UPLOAD_TEMP);

userVo.setHeadimg(filePath);

// 把原来的删除

@RequestMapping("updatePwd")

public ResultObj updatePwd(UserVo userVo) {

try {

User user = (User) WebUtils.getHttpSession().getAttribute("user");

// 生成密文

String pwd = DigestUtils.md5DigestAsHex(userVo.getPwd().getBytes());

userVo.setUserid(user.getUserid());

userVo.setPwd(pwd);

// 修改密码

this.userService.updateUser(userVo);

return ResultObj.UPDATE_SUCCESS;

} catch (Exception e) {

public ResultObj signup(UserVo userVo) {

try {

String code = WebUtils.getHttpSession().getAttribute("code").toString();

if (userVo.getCode().toLowerCase().equals(code)) {

this.userService.signUpUser(userVo);

return ResultObj.SIGNUP_SUCCESS;

} else {

return ResultObj.USER_SIGNUP_CODE_ERROR_MSG;

} catch (Exception e) {

e.printStackTrace();


return ResultObj.RESET_ERROR;

/*

* 加载用户管理分配的分配角色的数据

*/

@RequestMapping("initUserRole")

public DataGridView initUserRole(UserVo userVo) {

return this.userService.queryUserRole(userVo.getUserid());

/*

* 保存用户和角色的关系

*/


try {

User user = (User) WebUtils.getHttpSession().getAttribute("user");

// 生成密文

String pwd = DigestUtils.md5DigestAsHex(userVo.getPwd().getBytes());

userVo.setUserid(user.getUserid());

userVo.setPwd(pwd);

// 修改密码

this.userService.updateUser(userVo);

return ResultObj.UPDATE_SUCCESS;

} catch (Exception e) {

return ResultObj.UPDATE_ERROR;


return ResultObj.DELETE_SUCCESS;

} catch (Exception e) {

e.printStackTrace();

return ResultObj.DELETE_ERROR;

/*

* 批量删除用户

*/

@RequestMapping("deleteBatchUser")

public ResultObj deleteBatchUser(UserVo userVo) {

try {

this.userService.deleteBatchUser(userVo.getIds());

return ResultObj.DELETE_SUCCESS;

} catch (Exception e) {

/*

* 加载用户列表返回DataGridView

*/

@RequestMapping("loadAllUser")

public DataGridView loadAllmeenu(UserVo userVo) {

return this.userService.queryAllUser(userVo);

/*

* 注册用户--查询用户名是否存在

*/

@RequestMapping("queryLoginName")

public ResultObj queryLoginName(UserVo userVo) {

Integer count = this.userService.queryLoginName(userVo.getLoginname());

if (count != 0) {

return ResultObj.USER_EXIST;

/*

* 登录方法

*/

@RequestMapping("login")

public String login(UserVo userVo, Model model) {

// 最外层的if是判断session是否为空 为空就跳转到登录界面

// uservo不可能为空的,只是里面的属性可能为空 所以要判断session是否为空 就要判断里面的属性 而不是判断userVo本身 (坑!)

if (null != userVo.getLoginname()) {

//			String code = WebUtils.getHttpSession().getAttribute("code").toString();

//			if (userVo.getCode().toLowerCase().equals(code)) {

User user = this.userService.login(userVo);


//			}

} else {

return "system/main/login";

};

/**

* 得到登录验证码

* @throws IOException

*/

@RequestMapping("getCode")

public void getCode(HttpServletResponse response, HttpSession session) throws IOException {

this.userService.updateUser(userVo);

return ResultObj.UPDATE_SUCCESS;

} catch (Exception e) {

e.printStackTrace();

return ResultObj.UPDATE_ERROR;

/*

* 删除用户

*/

@RequestMapping("deleteUser")

public ResultObj deleteUser(UserVo userVo) {

System.out.println(userVo);

System.out.println(userVo.getUserid());

try {


//				model.addAttribute("error", SysConstast.USER_LOGIN_CODE_ERROR_MSG);

//				return "system/main/login";

//			}

} else {

return "system/main/login";

};

/**

* 得到登录验证码

* @throws IOException

*/

@RequestMapping("getCode")

public void getCode(HttpServletResponse response, HttpSession session) throws IOException {


* 重置用户密码

*/

@RequestMapping("resetUserPwd")

public ResultObj resetUserPwd(UserVo userVo) {

try {

this.userService.resetUserPwd(userVo.getUserid());

return ResultObj.RESET_SUCCESS;

} catch (Exception e) {

e.printStackTrace();

return ResultObj.RESET_ERROR;

/*

} catch (Exception e) {

e.printStackTrace();

return ResultObj.DELETE_ERROR;

/*

* 批量删除角色

*/

@RequestMapping("deleteBatchRole")

public ResultObj deleteBatchRole(RoleVo roleVo) {

try {

this.roleService.deleteBatchRole(roleVo.getIds());

return ResultObj.DELETE_SUCCESS;

} catch (Exception e) {

e.printStackTrace();

} catch (Exception e) {

e.printStackTrace();

return ResultObj.DELETE_ERROR;

/*

* 重置用户密码

*/

@RequestMapping("resetUserPwd")

public ResultObj resetUserPwd(UserVo userVo) {

try {

this.userService.resetUserPwd(userVo.getUserid());

return ResultObj.RESET_SUCCESS;

} catch (Exception e) {

e.printStackTrace();

/*

* 查询密码

*/

@RequestMapping("queryPwd")

public ResultObj queryPwd(UserVo userVo) {

User user = (User) WebUtils.getHttpSession().getAttribute("user");

user = this.userService.queryUserInfo(user.getUserid());

// 生成密文

String pwd = DigestUtils.md5DigestAsHex(userVo.getPwd().getBytes());

userVo.setPwd(pwd);


public class RoleController {

@Autowired

private RoleService roleService;

/*

* 加载角色列表返回DataGridView

*/

@RequestMapping("loadAllRole")

public DataGridView loadAllmeenu(RoleVo roleVo) {

return this.roleService.queryAllRole(roleVo);

/*

* 添加角色

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

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐