——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






基于javaweb的SpringBoot汽车商城管理系统(java+springboot+vue+maven+mysql)
项目介绍
本项目基于spring boot以及Vue开发,为前后端分离的项目。针对汽车销售提供客户信息、车辆信息、订单信息、销售人员管理、财务报表等功能,提供经理和销售两种角色进行管理。
经理角色主要功能为: 首页、销售管理(新订单、销售订单、订单详情)、客户管理(添加客户、客户信息)、库存管理(添加库存、车辆库存)、财务报表(员工报表、销量报表、个人月报表)、员工管理(添加员工、员工信息)
销售角色主要功能为: 首页、销售管理(新订单、销售订单、订单详情)、客户管理(添加客户、客户信息)、库存管理(车辆库存)、个人月报表、我的信息
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 4.数据库:MySql 5.7版本; 5.是否Maven项目:是;
技术栈
SpringBoot+VUE+Mysql
后端项目:
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行后端项目,后端项目运行成功后,需要再运行前端项目
前端项目:
- 安装好node环境 2. 在front目录下运行 npm install 安装所需要的包 3. 在front目录下运行 npm run dev 4. 运行成功后,在浏览器中访问localhost:9527,登录账号即可
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| @RequestMapping(value = "updateDetail", method = RequestMethod.POST) public ServerResponse updateDetail(OrderDetails orderDetails) { return orderService.updateDetail(orderDetails); }
@RequestMapping(value = "deleteDetail", method = RequestMethod.POST) public ServerResponse deleteDetail(String id) { return orderService.deleteDetail(id); }
@RequestMapping(value = "getDetailsList", method = RequestMethod.GET) public ServerResponse getDetailsList(DetailsQuery detailsQuery) { return orderService.getDetailsList(detailsQuery); } } package com.gxyan.controller;
@Slf4j @RestController @RequestMapping("store") public class StoreController {
@Autowired private IStoreService storeService;
@RequestMapping(value = "addBrand", method = RequestMethod.GET) public ServerResponse addBrand(String brand) { return storeService.addBrand(brand);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
@Slf4j @RestController @RequestMapping("user") public class UserController {
@Autowired private IUserService userService; @Autowired private IEmployeeService employeeService;
@RequestMapping(value = "login", method = RequestMethod.POST) public ServerResponse login( String employeeId, String password, HttpSession session) { ServerResponse response = userService.login(Integer.valueOf(employeeId), password); if (response.isSuccess()) { session.setAttribute(Const.CURRENT_USER, response.getData());
Map<String, String> map = new HashMap <>(1); map.put("token", session.getId()); response = ServerResponse.createBySuccess(map); } log.info("userId:{}, password:{}, data:{}", employeeId, password, response.getData()); return response; }
@RequestMapping(value = "logout", method = RequestMethod.GET) public ServerResponse logout(HttpSession session) { session.removeAttribute(Const.CURRENT_USER); return ServerResponse.createBySuccess();
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
@Slf4j @RestController @RequestMapping("customer") public class CustomerController {
@Autowired private ICustomerService customerService;
@RequestMapping(value = "addCustomer", method = RequestMethod.GET) public ServerResponse addCustomer(Customer customer) { return customerService.addCustomer(customer); }
@RequestMapping(value = "getList", method = RequestMethod.GET) public ServerResponse getList(CustomerQuery customerQuery) { return customerService.getList(customerQuery); }
@RequestMapping(value = "update", method = RequestMethod.POST) public ServerResponse update(Customer customer) { return customerService.updateCustomer(customer); } } package com.gxyan.controller;
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| @RequestMapping(value = "updateMessage", method = RequestMethod.POST) public ServerResponse updateMessage(Employee employee) { return employeeService.updateEmployee(employee); }
@RequestMapping(value = "validPassword", method = RequestMethod.POST) public ServerResponse validPassword(HttpSession session, String validPass) { Employee employee = (Employee) session.getAttribute(Const.CURRENT_USER); return employeeService.validPassword(employee.getId(), validPass); }
@RequestMapping(value = "updatePassword", method = RequestMethod.POST) public ServerResponse updatePassword(HttpSession session, String oldPass, String newPass) { Employee employee = (Employee) session.getAttribute(Const.CURRENT_USER); return employeeService.updatePassword(employee.getId(), oldPass, newPass); } } package com.gxyan.controller;
@RestController @RequestMapping("chart") public class ChartController {
@Autowired private IChartService chartService;
@RequestMapping(value = "getEmpChart", method = RequestMethod.GET) public ServerResponse getEmpChart(String date) { return chartService.getEmpChart(date); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
@Slf4j @RestController @RequestMapping("user") public class UserController {
@Autowired private IUserService userService; @Autowired private IEmployeeService employeeService;
@RequestMapping(value = "login", method = RequestMethod.POST) public ServerResponse login( String employeeId, String password, HttpSession session) { ServerResponse response = userService.login(Integer.valueOf(employeeId), password); if (response.isSuccess()) { session.setAttribute(Const.CURRENT_USER, response.getData());
Map<String, String> map = new HashMap <>(1); map.put("token", session.getId()); response = ServerResponse.createBySuccess(map); } log.info("userId:{}, password:{}, data:{}", employeeId, password, response.getData()); return response; }
@RequestMapping(value = "logout", method = RequestMethod.GET) public ServerResponse logout(HttpSession session) { session.removeAttribute(Const.CURRENT_USER); return ServerResponse.createBySuccess(); }
@RequestMapping(value = "info", method = RequestMethod.POST)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| } package com.gxyan.controller;
@RestController @RequestMapping("init") public class InitController {
@Autowired private IInitService initService;
@RequestMapping(value = "seriesOpt", method = RequestMethod.GET) public ServerResponse seriesOpt() { return initService.seriesOpt(); }
@RequestMapping(value = "brandOpt", method = RequestMethod.GET) public ServerResponse brandOpt() { return initService.brandOpt(); }
@RequestMapping(value = "storeOpt", method = RequestMethod.GET) public ServerResponse storeOpt(Integer seriesId) { return initService.storeOpt(seriesId); }
@RequestMapping(value = "getCustomer", method = RequestMethod.GET) public ServerResponse getCustomer(String idCard) {
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=401122532008200qz
https://javayms.pages.dev?id=401122532008200qz