SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】

一、前言

汽车租赁系统,很常见的一个系统,但是网上还是以前的老框架实现的,于是我打算从设计到开发都用现在比较流行的新框架。想学习或者做毕设的可以私信联系哦!!

二、技术栈

- 后端技术

  • Spring
  • SpringBoot
  • Mybatis

- 前端技术

  • vue
  • Element UI
  • axios
  • node
  • echarts

- 数据库

  • MySQL
  • Redis

三、管理员界面展示

管理员登录界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第1张图片

管理员修改密码界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第2张图片

添加车系界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第3张图片

添加车辆界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第4张图片

用户管理界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第5张图片

订单管理界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第6张图片

评价管理界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第7张图片

报表分析界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第8张图片
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第9张图片

礼物管理界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第10张图片
添加修改礼物界面
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第11张图片
用户兑换礼物账单界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第12张图片
兑换礼物报表界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第13张图片

四、用户界面

用户注册界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第14张图片

用户登录界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第15张图片

登录后首页展示界面:

车辆出租展示界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第16张图片

车辆详情界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第17张图片

订单页面页面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第18张图片
订单导出Excel界面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第19张图片
Excel查看:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第20张图片
礼物兑换展示页面:
SpringBoot+Vue+Mybatis+Redis实现汽车租赁系统【毕设专用、源码、数据库设计】_第21张图片

五、数据库设计

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for car
-- ----------------------------
DROP TABLE IF EXISTS `car`;
CREATE TABLE `car`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `price` double(10, 2) NULL DEFAULT NULL,
  `zudate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `uid` int(12) NULL DEFAULT NULL,
  `typeid` int(12) NULL DEFAULT NULL,
  `status` int(255) NULL DEFAULT NULL,
  `info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `carnum` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `pic` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment`  (
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `userid` int(12) NULL DEFAULT NULL,
  `carid` int(12) NULL DEFAULT NULL,
  `context` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `pingdate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `answer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `isok` int(255) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for gift
-- ----------------------------
DROP TABLE IF EXISTS `gift`;
CREATE TABLE `gift`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `count1` int(11) NULL DEFAULT NULL,
  `price` double(10, 2) NULL DEFAULT NULL,
  `pic` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for giftorder
-- ----------------------------
DROP TABLE IF EXISTS `giftorder`;
CREATE TABLE `giftorder`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userId` int(11) NULL DEFAULT NULL,
  `giftId` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP TABLE IF EXISTS `t_order`;
CREATE TABLE `t_order`  (
  `time` date NULL DEFAULT NULL,
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `carid` int(12) NULL DEFAULT NULL,
  `userid` int(12) NULL DEFAULT NULL,
  `zudate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `huandate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `zumoney` double(255, 0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for types
-- ----------------------------
DROP TABLE IF EXISTS `types`;
CREATE TABLE `types`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `gender` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `realname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `money` double(255, 1) NULL DEFAULT NULL,
  `jiazhao` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `isone` int(2) NULL DEFAULT NULL,
  `vip` int(2) NULL DEFAULT NULL,
  `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `jifen` int(255) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

SET FOREIGN_KEY_CHECKS = 1;

六、上传图片代码

@PostMapping("/upload")
public ETResponse upload(MultipartFile file){
    ETResponse response = new ETResponse();
    //为空  大小为0 都不符合
    if(ObjectUtils.isEmpty(file) || file.getSize()<=0){
        response.setMsg(ETEnums.ERROR.getMsg());

        return response;

    }
    //拿取文件名称
    String originalFilename = file.getOriginalFilename();
    //拿到名字.后结尾的
    String suffix = FilenameUtils.getExtension(originalFilename);
    if(!StringUtils.equals("JPG",suffix.toUpperCase()) && !StringUtils.equals("PNG",suffix.toUpperCase())){
        response.setMsg(ETEnums.ERROR.getMsg());

        return response;
    }

    //创建新的文件名字
    String uuid = UUID.randomUUID().toString().replace("-","");

    //组合成新的文件名字
    String filename = String.format("%s%s%s",uuid,".",suffix);
    //文件上传路径
    File uploadDir = new File(picProperties.getLocation());
    //没有文件夹就创建
    if(!uploadDir.exists()){
        uploadDir.mkdirs();
    }
    //目标文件
    File destFile = new File(uploadDir,filename);

    //执行上传
    try {
        file.transferTo(destFile);
    } catch (IOException e) {
        log.error(e.getMessage(),e);
        response.setMsg(ETEnums.ERROR.getMsg());

        return response;
    }
    String prefix = picProperties.getMapping();
    String picPath = prefix.endsWith("/") ? prefix + filename : prefix + "/" + filename;
    log.info("图片访问路径 {}",picPath);
    response.setData(picPath);
    response.setCode(ETEnums.SUCCESS.getCode());
    response.setMsg(ETEnums.SUCCESS.getMsg());
    return response;

}

七、总结

总来的说项目的功能点大同小异,创新点在于报表分析和导出订单Excel。对于以前的汽车租赁系统来说还是有很大的改进,特别是框架方面。

你可能感兴趣的:(Java,vue.js,spring,boot,数据库,mybatis,redis)