作者主页:源码空间站2022
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
本项目包含管理员、普通用户两种角色;
 管理员主要功能包括:
 后台首页、停车位信息管理、车辆求租信息审核、车辆出租信息审核、管理员广播等;
 普通用户主要功能包括:
 个人信息管理、租入订单(租入的车、租入的车位)、租出订单、发布车辆出租信息、我要租车、我要租车位、留言、来自管理员的公告等内容;
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 
 5.数据库:MySql 5.7版本;
6.是否Maven项目:否;
技术栈
1. 后端:Spring+SpringMVC+Mybatis
2. 前端:HTML+CSS+JavaScript+jsp+jquery+bootstrap+layui
使用说明
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
 3. 将项目中util/DBUtil.java配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入localhost:8080/ssm_qiche_rentsys/ 登录
运行截图
管理员角色





 普通用户角色
 普通用户角色 
 







相关代码
汽车控制器
package com.cwj.taiqiangle.controller;
import com.cwj.taiqiangle.model.JsonMsg;
import com.cwj.taiqiangle.service.CarOutService;
import com.cwj.taiqiangle.service.CarService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.sql.SQLException;
@Controller
@RequestMapping(value = "/car")
public class CarController {
    CarService orderService = new CarService();
    CarOutService outOrderService = new CarOutService();
    /**
     * Code = "200"  成功存入
     * Code = "202"  输入存在问题
     * Code = "203"  系统错误
     * @param sender_id
     * @param carName
     * @param stringPrice
     * @return
     */
    @RequestMapping(value = "/userAddCar", method = RequestMethod.GET)
    @ResponseBody
    public JsonMsg userAddCar(int sender_id, String carName, String stringPrice) {
        int price = 0;
        try {
            price = Integer.parseInt(stringPrice);
        } catch (Exception e) {
            System.out.println("Chenjie Debug");
            e.printStackTrace();
        }
        JsonMsg jsonMsg = new JsonMsg();
        if (price < 0 || carName == null) {
            jsonMsg.setCode("202");
            jsonMsg.setData(0);
        }
        try {
            int i = orderService.addCar(carName, price, "还没有实现照片上传");
            System.out.println("addCar之后的返回值是:"+i);
            if (i >= 1) {
                int r = outOrderService.add(sender_id, carName, price, "还没有实现照片上传");
                if (r == 1) {
                    jsonMsg.setCode("200");
                    jsonMsg.setData(1);
                } else {
                    jsonMsg.setCode("2031");
                    jsonMsg.setData(-1);
                }
            } else {
                jsonMsg.setCode("2032");
                jsonMsg.setData(-1);
            }
        } catch (SQLException e) {
            jsonMsg.setCode("2033");
            jsonMsg.setData(-1);
            e.printStackTrace();
        }
        return jsonMsg;
    }
}
如果也想学习本系统,下面领取。回复:228ssm
















![[附源码]计算机毕业设计Python的黄河文化科普网站(程序+源码+LW文档)](https://img-blog.csdnimg.cn/3349fedd2d514c5da1cbfcb31676f0ed.png)

