基于SpringBoot的汽车租赁管理系统

article/2025/7/13 9:04:43

文末获取源码

一、项目技术栈

开发语言:Java
Java开发工具:JDK1.8
后端框架:SpringBoot
前端:采用HTML和Vue相结合开发
数据库:MySQL5.7和Navicat管理工具结合
服务器:Tomcat8.5
开发软件:IDEA / Eclipse
是否Maven项目:是

二、系统分析

1、系统流程分析

系统登录流程图,如图所示:
在这里插入图片描述
添加信息流程图,如图所示:
在这里插入图片描述
删除信息流程图,如图所示:
在这里插入图片描述

功能截图

前台首页功能模块

在前台首页我们可以看到车辆的信息、系统公告、个人中心等功能模块
在这里插入图片描述
在车辆信息我们可以看到车辆的基本信息等情况
在这里插入图片描述
在系统公告我们可以看到管理员发布的公告信息等
在这里插入图片描述
在个人中心我们可以看到我们自己账号的基本信息情况
在这里插入图片描述

管理员功能模块

进入到管理员登录页面我们可以看到首页、个人中心、用户管理、车辆信息管理、车辆颜色管理、订单管理等相关模块功能
在这里插入图片描述
在用户管理我们可以看到用户的一些基本信息并且可以对他们的信息进行删除、修改等操作
在这里插入图片描述
在车辆品牌管理我们可以添加相对应的品牌名称进来
在这里插入图片描述
在车辆信息管理中我们可以看到车辆的基本信息等情况
在这里插入图片描述
在车辆颜色中我们可以添加汽车中的颜色
在这里插入图片描述
在租赁订单管理中我们可以看到用户租赁的一些基本信息等
在这里插入图片描述
在还车管理中我们可以看到用户还车的一些基本信息等
在这里插入图片描述
管理员管理中我们可以添加管理员
在这里插入图片描述

相关代码

数据库配置

# Tomcat
server:tomcat:uri-encoding: UTF-8port: 8080servlet:context-path: /springbootr1tjfspring:datasource:driverClassName: com.mysql.jdbc.Driverurl: jdbc:mysql://127.0.0.1:3306/springbootr1tjf?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8username: rootpassword: 123456#        driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
#        url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=springbootr1tjf
#        username: sa
#        password: 123456servlet:multipart:max-file-size: 10MBmax-request-size: 10MBresources:static-locations: classpath:static/,file:static/#mybatis
mybatis-plus:mapper-locations: classpath*:mapper/*.xml#实体扫描,多个package用逗号或者分号分隔typeAliasesPackage: com.entityglobal-config:#主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";id-type: 1#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"field-strategy: 2#驼峰下划线转换db-column-underline: true#刷新mapper 调试神器refresh-mapper: true#逻辑删除配置logic-delete-value: -1logic-not-delete-value: 0#自定义SQL注入器sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjectorconfiguration:map-underscore-to-camel-case: truecache-enabled: falsecall-setters-on-nulls: true#springboot 项目mybatis plus 设置 jdbcTypeForNull (oracle数据库需配置JdbcType.NULL, 默认是Other)jdbc-type-for-null: 'null' 

控制层(controller)

package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {return R.error("用户名已存在。");}userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

业务层(Service)


package com.service;import java.util.List;
import java.util.Map;import org.apache.ibatis.annotations.Param;import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.entity.UserEntity;
import com.utils.PageUtils;/*** 系统用户*/
public interface UserService extends IService<UserEntity> {PageUtils queryPage(Map<String, Object> params);List<UserEntity> selectListView(Wrapper<UserEntity> wrapper);PageUtils queryPage(Map<String, Object> params,Wrapper<UserEntity> wrapper);}

数据访问层(Dao)

package com.dao;import java.util.List;import org.apache.ibatis.annotations.Param;import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.entity.UserEntity;/*** 用户*/
public interface UserDao extends BaseMapper<UserEntity> {List<UserEntity> selectListView(@Param("ew") Wrapper<UserEntity> wrapper);List<UserEntity> selectListView(Pagination page,@Param("ew") Wrapper<UserEntity> wrapper);}
文章来源:https://blog.csdn.net/weixin_52721608/article/details/127216928
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://chatgpt.dhexx.cn/article/5TBLwE1L.shtml

相关文章

asp.net汽车出租信息管理系统VS开发sqlserver数据库web结构c#编程计算机网页项目

一、源码特点 ASP.NET 汽车出租信息管理系统是一套完善的web设计管理系统&#xff0c;系统具有完整的源代码和数据库&#xff0c;系统主要采用B/S模式开发。开发环境为vs2010&#xff0c;数据库为sqlserver2008&#xff0c;使用c# 语言开发 asp.net汽车出租信息管理系统…

数据库--汽车销售管理系统【课程设计】

目录 1.设计任务 1.1系统开发的背景 1.2系统开发的意义 1.3系统所应用的模块 2.需求分析 2.1功能分析 2.2数据流图 2.3数据字典 3.概念结构设计 4.逻辑结构设计 5.物理结构设计 5.1基本表 5.2视图 6.数据库实施 6.1 建立数据库表 6.2建立视图 7.数据库操作 目录 1.1系统开发的…

汽车租赁管理系统/汽车租赁网站/汽车管理系统

摘 要 21世纪的今天&#xff0c;随着社会的不断发展与进步&#xff0c;人们对于信息科学化的认识&#xff0c;已由低层次向高层次发展&#xff0c;由原来的感性认识向理性认识提高&#xff0c;管理工作的重要性已逐渐被人们所认识&#xff0c;科学化的管理&#xff0c;使信息存…

C#windows车库信息管理系统

中文摘要 为了提高车辆信息的管理效率&#xff0c;本课题使用C#语言和SQL Server数据库系统开发了一个WinForm类型的车库管理系统对车辆信息进行高效管理&#xff0c;以提升管理质量。本系统包含管理员登录注册、管理员信息修改模块、添加车辆信息模块、删除车辆信息模块、查找…

asp.net 汽车信息管理系统VS编程sqlserver数据库c#开发

一、源码特点 asp.net 汽车信息管理系统 是一套完善的WEB设计管理系统&#xff0c;系统具有完整的源代码和数据库&#xff0c;系统主要采用B/S模式开发。 下载地址&#xff1a;下载 https://download.csdn.net/download/qq_41221322/21516579 视频播放&#xff1a; …

基于Java+SQL的汽车销售管理系统

文章目录 1.前言系统概要附1: 建表语句附2: 项目整体结构附3: view包结构附4: utils包结构 2.基本功能介绍&#xff1a;2.1 登陆与注册2.2 主界面2.3 修改密码2.4 相应的操作数据界面2.5 增、删、查、改示例2.5.1 添加数据2.5.2 删除数据2.5.3 修改数据2.5.4 查询数据 3.食用该…

python判断闰年(leap year)

python判断闰年(leap year) 闰年的计算方法是“四年一闰,百年不闰,四百年再闰”,这就造成了在一些特殊年份,会出现八年一闰的现象。例如1896年为闰年,四年之后的1900年并不是闰年,直到再过四年之后的1904年才是闰年。也就是一般情况下年份能被4整除即为闰年,而整百年的…

python判断闰年程序_python实现闰年

广告关闭 腾讯云11.11云上盛惠 ,精选热门产品助力上云,云服务器首年88元起,买的越多返的越多,最高返5000元! 30个常用python实现:1、冒泡排序 ? 2、计算x的n次方的方法? 3、计算a*a + b*b + c*c + ...? 4、计算阶乘 n! ?5、列出当前目录下的所有文件和目录名? 6、…

python实现判断闰年

先来看条件&#xff1a; 如果我们要判断的年份是整百年&#xff0c;我们不能去除以4&#xff0c;而应该除以400。如1900年&#xff0c;因为这个年份是整百年&#xff0c;所以要除以400&#xff0c;1900/4004……300&#xff0c;不是400的倍数&#xff0c;所以1900年不是闰年&a…

python判断闰年

4.1 python 判断闰年 代码 yearint(input("请输入年份&#xff1a;")) if(year%40 and year%100 !0):print("是闰年&#xff01;") elif(year%4000):print("是闰年&#xff01;") else:print("不是闰年&#xff01;")运行结果截图&…

chatgpt赋能python:Python闰年的判断方法

Python闰年的判断方法 在Python编程中&#xff0c;经常需要判断某个年份是否是闰年。闰年是指能被4整除但不能被100整除的年份&#xff0c;或者能被400整除的年份。 闰年的判断方法在编程中非常常见&#xff0c;也非常简单。下面将介绍Python中三种实现闰年判断的方法。 方法…

Lingo 11安装教程

Lingo 11&#xff08;32/64&#xff09;位下载地址&#xff1a; 链接&#xff1a;http://pan.baidu.com/s/1pLFk5xL 密码&#xff1a;bt95 软件介绍&#xff1a; LINGO是Linear Interactive and General Optimizer的缩写&#xff0c;即“交互式的线性和通用优化求解器”&…

LINGO 11.0安装教程

文章目录 1. 安装步骤2. 下载地址 1. 安装步骤 解压压缩包&#xff0c;然后双击Lingo11.exe以运行它 单击No以禁用自动更新 开始使用 2. 下载地址 参考&#xff1a;Lingo多版本下载地址和安装教程

最优化问题求解及Lingo教程

介绍 Lingo是一款求解最优化问题的软件&#xff0c;可以用于求解非线性规划&#xff0c;也可以用于一些线性和非线性方程组的求解等&#xff0c;功能十分强大&#xff0c;是求解优化模型的最佳选择。 最优化问题 首先介绍一下什么是最优化问题。 最优化问题&#xff0c;即在…

lingo入门教程之三 --- 文件数据处理

有时候我们想输入的数据是在一个Excel表格或者其他什么形式中&#xff0c;或者说这里数据是实时变化的并不利于直接在程序中输入&#xff0c;耳而应该在程序之外将数据存储&#xff0c;实现数据与程序的分离存储&#xff0c;这个时候就涉及到程序与数据之间的传递 下面简要介绍…

lingo入门教程之一 初识lingo

lingo对于一些线性或者非线性的规划&#xff0c;优化问题非常有效 首先介绍一下&#xff0c;在lingo中运行程序时出现的页面&#xff08;在工具栏点击类似靶子一样的图标便可运行&#xff09; Solver status:求解器(求解程序)状态框 Model Class:当前模型的类型:LP&#xff0c;…

lingo3d_基于官方教程的分析

lingo3d可以允许web内使用3d元素&#xff0c;其定位是web端游戏引擎。跟随官方教程我完成了一个简单的demo&#xff0c;即控制小人在三维空间穿行&#xff0c;并且可以显示相应物品信息 官方使用vitereact&#xff0c;故我们跟随其搭建 1.搭建主场景 这里与一般react项目出入不…

Lingo软件安装包分享(附安装教程)

目录 一、软件简介 二、软件下载 一、软件简介 Lingo是一款专门为解决线性和非线性优化问题而设计的专业软件&#xff0c;广泛应用于运筹学、工程管理、交通管理、生产调度、物流管理等领域。它提供了一个易于使用的界面和灵活的求解器&#xff0c;能够高效地求解大规模的线性…

数学建模学习(25):一夜整理的Lingo入门教程,助力建模国赛!

文章目录 前言使用教程基本语法影子价格敏感性分析以上总结变量约束与函数全局最优解(最值)局部最优解(极值)总结前言 在上一篇文章我用到了lingo,但我盲猜一下大家可能不会用lingo做数学计算,因此我在这里做一个教程。 使用教程 下载地址:微信软件管家。 假设已经写…

java调用lingo实例_LINGO使用教程(一)

LINGO是用来求解线性和非线性优化问题的简易工具。LINGO内置了一种建立最优化模型的语言,可以简便地表达大规模问题,利用LINGO高效的求解器可快速求解并分析结果。 1.LINGO快速入门 当你在windows下开始运行LINGO系统时,会得到类似下面的一个窗口: 外层是主框架窗口,包含了…