当前位置: 首页 > news >正文

基于springboot汽车租赁系统

收藏关注不迷路!!

🌟文末获取源码+数据库🌟

感兴趣的可以先收藏起来,还有大家在毕设选题(免费咨询指导选题),项目以及论文编写等相关问题都可以给我留言咨询,希望帮助更多的人

文章目录
  • 摘要
  • 一、开发技术介绍
  • 二、功能介绍
  • 三、代码展示
  • 四、效果图
  • 五 、源码获取

摘要

随着社会的发展,计算机的优势和普及使得汽车租赁系统的开发成为必需。汽车租赁系统主要是借助计算机,通过对汽车租赁信息等信息进行管理。减少管理员的工作,同时也方便广大用户对个人所需汽车租赁信息的及时查询以及管理。

汽车租赁系统的开发过程中,采用B / S架构,主要使用Java技术进行开发,结合最新流行的springboot框架。使用Mysql数据库和Eclipse开发环境。该汽车租赁系统包括用户和管理员。其主要功能包括管理员:首页、个人中心、用户管理、车辆品牌管理、车辆信息管理、车辆颜色管理、租赁订单列表管理、还车记录管理、管理员管理、我的收藏管理、系统管理,用户:首页、个人中心、车辆信息管理、租赁订单列表管理、还车记录管理,前台首页;首页、车辆信息、系统公告、个人中心、后台管理等功能。

本论文对汽车租赁系统的发展背景进行详细的介绍,并且对系统开发技术进行介绍,然后对系统进行需求分析,对汽车租赁系统业务流程、系统结构以及数据都进行详细说明。用户可根据关键字进行信息的查找自己想要的信息等。

关键词:汽车租赁系统,Mysql数据库,Java技术 springboot框架

一、开发技术介绍

  • Java
  • SpringBoot
  • MySQL
  • MyBatis
  • B/S 架构

二、功能介绍

过系统需求分析,该汽车租赁系统功能结构图如图4-1所示:

在这里插入图片描述

三、代码展示

package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
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.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;

import com.entity.NewsEntity;
import com.entity.view.NewsView;

import com.service.NewsService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 系统公告
 * 后端接口
 * @author 
 * @email 
 */
@RestController
@RequestMapping("/news")
public class NewsController {
    @Autowired
    private NewsService newsService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,NewsEntity news,
		HttpServletRequest request){
        EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
		PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,NewsEntity news, HttpServletRequest request){
        EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
		PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( NewsEntity news){
       	EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
      	ew.allEq(MPUtil.allEQMapPre( news, "news")); 
        return R.ok().put("data", newsService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(NewsEntity news){
        EntityWrapper< NewsEntity> ew = new EntityWrapper< NewsEntity>();
 		ew.allEq(MPUtil.allEQMapPre( news, "news")); 
		NewsView newsView =  newsService.selectView(ew);
		return R.ok("查询系统公告成功").put("data", newsView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        NewsEntity news = newsService.selectById(id);
        return R.ok().put("data", news);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        NewsEntity news = newsService.selectById(id);
        return R.ok().put("data", news);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody NewsEntity news, HttpServletRequest request){
    	news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(news);
        newsService.insert(news);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody NewsEntity news, HttpServletRequest request){
    	news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(news);
        newsService.insert(news);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody NewsEntity news, HttpServletRequest request){
        //ValidatorUtils.validateEntity(news);
        newsService.updateById(news);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        newsService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<NewsEntity> wrapper = new EntityWrapper<NewsEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = newsService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}

四、效果图

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

五 、源码获取

下方名片联系我即可!!


大家点赞、收藏、关注、评论啦 、查看👇🏻获取联系方式👇🏻

http://www.dtcms.com/a/106400.html

相关文章:

  • 【百日精通JAVA | SQL篇 | 第二篇】数据库操作
  • K8S集群搭建 龙蜥8.9 Dashboard部署(2025年四月最新)
  • 云计算:数字化转型的核心引擎
  • 硬件工程师零基础入门教程(三)
  • 淘天集团Java开放岗暑期实习笔试(2025年4月2日)
  • 数据结构B树的实现
  • 3D Mapping秀制作:沉浸式光影盛宴 3D mapping show
  • Linux | I.MX6ULL内核及文件系统源码结构(7)
  • Java 基础-30-单例设计模式:懒汉式与饿汉式
  • 一份关于近期推理模型研究进展的报告
  • PostgreSQL DDL 语句基本语法概览
  • 程序化广告行业(51/89):Cookie映射与移动设备ID映射解析
  • ARC缓存淘汰算法
  • 青少年编程与数学 02-015 大学数学知识点 03课题、概率论和数理统计
  • 探索Doris:日志分析的新宠,是否能取代老牌ES?
  • 使用PyInstaller打包Python项目
  • 蓝桥杯冲刺:一维前缀和
  • C语言的continue与break
  • web前端开发-JS
  • Python爬虫第3节-会话、Cookies及代理的基本原理
  • PCL RANSAC探测空间直线(指定方向)
  • Pyspark学习一:概述
  • ARM板 usb gadget hid 模拟键鼠
  • 基于 Jackson 的 JSON 工具类实现解析与设计模式应用
  • 网盘解析工具v1.3.1发布,希望能解决黑号问题吧
  • LTSPICE仿真电路:(二十四)MOS管推挽驱动电路简单仿真
  • 【idea】实用插件
  • Redis 03
  • HTML表单元素input
  • C++17更新内容汇总