基于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)
环境需要
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
使用说明
项目运行:
-
使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
-
使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;
-
将项目中application.yml配置文件中的数据库配置改为自己的配置;
-
运行项目,在浏览器中输入地址:
前台地址:http://localhost:8080/springbootrpj39/front/index.html
后台地址
http://localhost:8080/springbootrpj39/admin/dist/index.html
管理员 abo 密码 abo
用户:用户1 密码: 123456
注意项目文件路径中不能含有中文、空格、特殊字符等,否则图片会上传不成功。
/*
* 加载角色列表返回DataGridView
*/
@RequestMapping("loadAllRole")
public DataGridView loadAllmeenu(RoleVo roleVo) {
return this.roleService.queryAllRole(roleVo);
/*
* 添加角色
*/
@RequestMapping("addRole")
public ResultObj addRole(RoleVo roleVo) {
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 {
return ResultObj.DELETE_ERROR;
/*
* 加载角色管理分配菜单的JSON
*/
@RequestMapping("initRoleMenuTreeJson")
public DataGridView initRoleMenuTreeJson(Integer roleid) {
System.out.println(roleid);
return this.roleService.initRoleMenuTreeJson(roleid);
/*
* 保存角色与菜单的关系
*/
@RequestMapping("saveRoleMenu")
this.userService.deleteBatchUser(userVo.getIds());
return ResultObj.DELETE_SUCCESS;
} catch (Exception e) {
e.printStackTrace();
return ResultObj.DELETE_ERROR;
/*
* 重置用户密码
*/
@RequestMapping("resetUserPwd")
public ResultObj resetUserPwd(UserVo userVo) {
try {
this.userService.resetUserPwd(userVo.getUserid());
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) {
} catch (Exception e) {
e.printStackTrace();
return ResultObj.UPDATE_ERROR;
/*
* 查询个人信息
*/
@RequestMapping("queryUserInfo")
public User queryUserInfo() {
User user = (User) WebUtils.getHttpSession().getAttribute("user");
user = this.userService.queryUserInfo(user.getUserid());
return user;
/*
} 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;
*/
@RequestMapping("addRole")
public ResultObj addRole(RoleVo roleVo) {
try {
this.roleService.addRole(roleVo);
return ResultObj.ADD_SUCCESS;
} catch (Exception e) {
e.printStackTrace();
return ResultObj.ADD_ERROR;
/*
* 修改角色
*/
return ResultObj.PWD_ERROR;
/*
* 更改密码之查询密码
*/
@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);
// 修改密码
/*
* 登录方法
*/
@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);
if (null != user) {
// 放入session
} catch (Exception e) {
e.printStackTrace();
return ResultObj.RESET_ERROR;
/*
* 加载用户管理分配的分配角色的数据
*/
@RequestMapping("initUserRole")
public DataGridView initUserRole(UserVo userVo) {
return this.userService.queryUserRole(userVo.getUserid());
/*
* 保存用户和角色的关系
*/
@RequestMapping("saveUserRole")
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();
@RequestMapping("updateRole")
public ResultObj updateRole(RoleVo roleVo) {
try {
this.roleService.updateRole(roleVo);
return ResultObj.UPDATE_SUCCESS;
} catch (Exception e) {
e.printStackTrace();
return ResultObj.UPDATE_ERROR;
/*
* 删除角色
*/
@RequestMapping("deleteRole")
public ResultObj deleteRole(RoleVo roleVo) {
model.addAttribute("error", SysConstast.USER_LOGIN_ERROR_MSG);
return "system/main/login";
// } else {
// model.addAttribute("error", SysConstast.USER_LOGIN_CODE_ERROR_MSG);
// return "system/main/login";
// }
} else {
return "system/main/login";
};
/**
* 得到登录验证码
* @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;
user = this.userService.queryUserInfo(user.getUserid());
// 生成密文
String pwd = DigestUtils.md5DigestAsHex(userVo.getPwd().getBytes());
userVo.setPwd(pwd);
if (userVo.getPwd().equals(user.getPwd())) {
return ResultObj.PWD_SUCCESS;
} else {
return ResultObj.PWD_ERROR;
/*
* 更改密码之查询密码
*/
@RequestMapping("updatePwd")
public ResultObj updatePwd(UserVo userVo) {
/*
* 加载角色管理分配菜单的JSON
*/
@RequestMapping("initRoleMenuTreeJson")
public DataGridView initRoleMenuTreeJson(Integer roleid) {
System.out.println(roleid);
return this.roleService.initRoleMenuTreeJson(roleid);
/*
* 保存角色与菜单的关系
*/
@RequestMapping("saveRoleMenu")
public ResultObj saveRoleMenu(RoleVo roleVo) {










SpringBoot汽车销售平台实现
1万+

被折叠的 条评论
为什么被折叠?



