一、基于Springboot+SpringDataJpa+Mysql智能停车管理系统

1.1 项目概述

开发语言:Java8

数据库:Mysql5

前端技术:echarts图表

渲染数据:thymeleaf模板引擎 ${ }

后端框架:Springboot SpringDataJpa【ORM javabean – 数据库表实体 】

数据库连接池:德鲁伊【JDBC 1 2 3 4 5 】

服务器:Tomcat,SSM SHH【自己部署】

开发工具:Eclipse Navicat Maven

代码设计:MVC HTTP-----> Controlller----->service------>dao【Model】

get post delete put

1.2 项目详解

验证码:hutool工具类

1.登录【正则表达式】

用户名:

密码:

验证码:

1.HTTP地址:post[form] ----Controller

2.首先验证码对不对?

3.通过之后查库

4.查询数据库有没有该用户?

2.注册

1.检验数据格式

2.判断两次密码是否一致

3.form 提交到后台Controller

4.插入数据库

3.认证授权:Shiro第三方框架

1.认证 学生,校园-----放你进入

2.授权:男生,男生宿舍 男生厕所

menu 某一项菜单 数据库表【perms : sys:interface:list】

ShiroConfig:

UserReleam: 认证和授权【perms】

// 查询所有的角色权限
String nativeSql = "SELECT r.role_sign FROM sys_user u ";
nativeSql +=" LEFT JOIN sys_user_role ur ON u.user_id = ur.user_id";
nativeSql +=" LEFT JOIN sys_role r ON r.role_id = ur.role_id";
nativeSql +=" WHERE u.user_id = ?";
// 查询所有的菜单权限
String nativeSql = "SELECT DISTINCT m.perms FROM sys_user_role ur";
nativeSql +=" LEFT JOIN sys_role_menu rm ON ur.role_id = rm.role_id";
nativeSql +=" LEFT JOIN sys_menu m ON rm.menu_id = m.menu_id";
nativeSql +=" WHERE ur.user_id = ?";

4.合作单位数量count,停车场数量,车辆数量,收益总额SUM,图表实现

SQL: COUNT(*) 2

//1. 发送请求  总体统计
function statText() {
okUtils.ajaxCloud({
url:"/sys/interface/query",
param:{'type':'indexStatistics'},
async:true,
success : function(result) {
$("#orgNumber").html(result.msg[0].orgNumber);
$("#parkNumber").html(result.msg[0].parkNumber);
$("#carNumber").html(result.msg[0].carNumber);
$("#cost").html(result.msg[0].cost);
}
});
}
2.Controller

5.车辆、车场的增删改查

insert into table xx,xx,xx values(); 【没有ID】

delete from table where id = 1;【必须有ID】

select * from table where id =1;【必须有ID】

update table set xx = “” where id = 1;【必须有ID】

6.查询所有车辆数据,带有查询条件和分页

参数:查询条件、分页数据 当前页,每页大小

url:"/car/manage/list",
param : that.entity,
success : function(result) {
that.tableData = result.msg.pageData;
that.tableSize = result.msg.totalCount;
}

select * from table xx like % % limit 0,10;

7.查询车辆数据

CarManage entity = carManageRepository.findById(id).orElse(new CarManage());

8.修改车辆数据

9.新增、修改车辆数据

vm.okUtils.ajaxCloud({
url:"/car/manage/save",
param : vm.entity,
json:true,
success : function(result) {
vm.okLayer.msg.greenTick(result.msg)
dialog.load();
}
});

if (entity.getId() == null) {
entity.setGmtCreate(DateUtils.getTimestamp());
entity.setGmtModified(entity.getGmtCreate());
} else {
entity.setGmtModified(DateUtils.getTimestamp());
}
carManageRepository.saveAndFlush(entity);
return Result.ok("保存成功");

10.删除车辆

carManageRepository.deleteById(id);

1.3 项目总结

1.先看前台发送请求的地方在哪里 http url:

2.后台:controller映射路径

3.解析程序 service 【封装的参数,返回值】

4.dao 方法

5.SQL:

基于Springboot+SpringDataJpa+Mysql智能停车管理系统_数据


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_mysql_02


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_java_03

基于Springboot+SpringDataJpa+Mysql智能停车管理系统_spring boot_04


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_sql_05

基于Springboot+SpringDataJpa+Mysql智能停车管理系统_spring boot_06

基于Springboot+SpringDataJpa+Mysql智能停车管理系统_数据_07

基于Springboot+SpringDataJpa+Mysql智能停车管理系统_java_08

基于Springboot+SpringDataJpa+Mysql智能停车管理系统_mysql_09


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_java_10

基于Springboot+SpringDataJpa+Mysql智能停车管理系统_java_11

基于Springboot+SpringDataJpa+Mysql智能停车管理系统_mysql_12

基于Springboot+SpringDataJpa+Mysql智能停车管理系统_数据_13


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_spring boot_14


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_spring boot_15


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_数据_16


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_spring boot_17


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_数据_18


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_数据_19


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_java_20


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_spring boot_21


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_sql_22


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_sql_23


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_mysql_24


基于Springboot+SpringDataJpa+Mysql智能停车管理系统_spring boot_25