基于springboot的生鲜门店配送管理系统(idea+springboot+html+thymeleaf)

一、系统简介


本项目采用idea工具开发,html+springboot+mybatis+jquery+thymeleaf技术编写,数据库采用的是mysql,navicat开发工具。

系统一共分为5个角色分别是:管理员,接单员,调度员,司机,门店

二、模块简介

管理员

1、登录

2、统计管理

3、门店管理

4、生鲜管理

5、接单员管理

6、调度员管理

7、司机管理

8、汽车管理

9、订单管理

10、公告管理

接单员

1、登录

2、个人信息管理

3、查看订单

4、处理订单,给调度员

5、查看公告

调度员

1、登录

2、个人信息管理

3、查看订单

4、处理订单,分配司机,分配车

5、查看公告

门店

1、登录

2、个人信息管理

3、查看订单

4、查看生鲜

5、申请生鲜

6、签收订单

7、查看公告

8、管理地址

司机

1、登录

2、个人信息管理

3、查看订单

4、配送生鲜

5、还车

6、查看公告

项目简介:
难度等级:✩✩✩
用户类型:5角色( 管理员,接单员,调度员,司机,门店)
设计模式:MVC
项目架构:B/S架构
开发语言:Java语言
前端技术:bootstrap+HTML、CSS、JS、JQuery、thymeleaf等
后端技术:springboot+mybatis框架
运行环境:Windows7或10、JDK1.8
运行工具:本系统采用idea开发,仅支持idea运行,不支持MyEclipse和eclipse运行,因为三者的骨架不一样,强行导入打开运行可能会导致出现未知的错误。
数  据  库:MySQL5.5/5.7/8.0版本
是否基于Maven环境:是
是否采用框架:是
数据库表数量:12张表
JSP页面数量:30多张
是否有分页:有分页

获取方式:xystgl · master · 码盗_java_bishe / java系统 · GitCode

相关截图

相关代码

登录

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="icon" th:href="@{/public/favicon.ico}" type="image/x-icon"/>
    <link rel="bookmark" th:href="@{/public/favicon.ico}" type="image/x-icon"/>
    <link rel="stylesheet" type="text/css"  th:href="@{/css/bootstrap.css}">
    <link rel="stylesheet" type="text/css"  th:href="@{/css/back.css}">
    <link rel="stylesheet" type="text/css"  th:href="@{/css/bootstrap-theme.css}">
    <script type="text/javascript" th:src="@{/js/jquery-3.6.0.js}"></script>
    <script type="text/javascript" th:src="@{/js/login.js}"></script>
    <script>
        $(function() {
            //防止页面后退
            history.pushState(null, null, document.URL);
            window.addEventListener('popstate', function () {
                history.pushState(null, null, document.URL);
            });
        })
    </script>
</head>
<body onload="loadTopWindow()">
<div id="magicalDragScene" class="mc-root mc-ui-absolute-pane">
    <h1 style="margin-left: 30%;margin-top: 8%;font-family: 隶书;font-size: 60px;color: white" >豪海生鲜门店配送管理系统</h1>
    <br>
    <div id="tmd" style="margin-left: 35%;width: 25%;height: 300px;">
        <form style="margin: 0 auto;width: 80%;height: 300px;" th:action="@{/loginUser}" method="post" onsubmit="return regCheck()">
            <h1 class="h3 mb-3 font-weight-normal" style="color:white;font-family: 隶书;text-align: center;" >登录</h1>
            <input id="username" name="username" class="layui-input" type="text"  th:placeholder="请填写用户名"/>
            <input id="password" name="password" class="layui-input" style="margin-top: 5px" type="password" th:placeholder="请填写用户密码" origin-type="password"/>
            <br>
            <select name="type" class="form-control" style="width: 75%">
                <option value="1" selected>管理员</option>
                <option value="2">接单员</option>
                <option value="3">调度员</option>
                <option value="4">司机</option>
                <option value="5">门店</option>
            </select>
            <!--<input  name="type" value="1" style="margin-top: 5px" type="radio" checked/>管理员
            <input  name="type" value="2" style="margin-top: 5px" type="radio" />救助者-->

            <!--   <input name="remember" type="checkbox" style="margin-top: 15px;">&nbsp;<span style="color: #43a047;" ></span>-->
           <span id="statusTip" style="color: #d62727;font-size: 15px;margin-left: 40%" th:text="${status}"></span><br>
          <!--  <div class="form-check form-check-inline"></div>-->

            <!--<p class="mt-5 mb-3 text-muted text-sm-right" style="margin-top: 10px"><span >还没有账号,</span>
                <a class="text-info" th:href="@{/toReg}" draggable="false" style="color: #43a047" >求助者注册</a>
                <a class="text-info" th:href="@{/toReg2}" style="color: #00a1d6;margin-left: 2px" >救援者注册</a>
            </p>-->
            <button class="layui-btn1" style="width: 300px;height: 40px;font-size: 16px;margin-top: 50px;color: white" type="submit">登录</button>
        </form>
    </div>
    <br>
 <!--   <a style="color: white;margin-left: 75%" th:href="@{/login.html(language='zh_CN')}">中文</a>&nbsp;&nbsp;&nbsp;&nbsp;
    <a style="color: white" th:href="@{/login.html(language='en_US')}">English</a>-->


</div>

</body>
</html>

    /**
     * 登录
     * @param username
     * @param password
     * @param type
     * @param httpSession
     * @param model
     * @return
     * @throws UnsupportedEncodingException
     */
    @RequestMapping(value = "/loginUser",method = RequestMethod.POST)
    public String loginUser( String username,String password, String type,HttpSession httpSession, Model model) throws UnsupportedEncodingException {
        Admin admin = new Admin();
        if(type !=null&& type.equals("1")){
            admin = loginService.selectAdmin(username,password);
            if (admin != null){
                httpSession.setAttribute("username",admin.getUsername());
                httpSession.setAttribute("admin",admin);
                httpSession.setAttribute("type",type);
                model.addAttribute("type",type);

                return "home/homepage";
            }else{
                model.addAttribute("status","账号或者密码输入错误!");
                return "login";
            }
        }
       else if(type.equals("2")){//接单员
            User user = loginService.selectUser(username,password,"1");
            if(user != null){
                httpSession.setAttribute("username",user.getNames());
                httpSession.setAttribute("user",user);
                httpSession.setAttribute("type",type);
                model.addAttribute("type",type);
                return "home/homepage";
            }else{
                model.addAttribute("status","账号或者密码输入错误!");
                return "login";
            }
        }else if(type.equals("3")){//调度员
            User user = loginService.selectUser(username,password,"2");
            if(user != null){
                httpSession.setAttribute("username",user.getNames());
                httpSession.setAttribute("user",user);
                httpSession.setAttribute("type",type);
                model.addAttribute("type",type);

                return "home/homepage";
            }else{
                model.addAttribute("status","账号或者密码输入错误!");
                return "login";
            }
        }else if(type.equals("5")){//门店
            Store store = loginService.selectStore(username,password);
            if(store != null){
                httpSession.setAttribute("username",store.getNames());
                httpSession.setAttribute("store",store);
                httpSession.setAttribute("type",type);
                model.addAttribute("type",type);

                return "home/homepage";
            }else{
                model.addAttribute("status","账号或者密码输入错误!");
                return "login";
            }
        }else if(type.equals("4")){//司机
            Driver driver = loginService.selectDriver(username,password);
            if(driver != null){
                httpSession.setAttribute("username",driver.getNames());
                httpSession.setAttribute("driver",driver);
                httpSession.setAttribute("type",type);
                model.addAttribute("type",type);

                return "home/homepage";
            }else{
                model.addAttribute("status","账号或者密码输入错误!");
                return "login";
            }
        }else{
            model.addAttribute("status","账号或者密码输入错误!");
            return "login";
        }
    }

其他模块代码都是类似的,此项目适合初学者学习借鉴
喜欢的朋友的点赞加关注,感兴趣的同学可以研究!!!!!

项目截图中的数据,很多是用来测试的,需要自行添加合适的数据图片!!
非开源!!!!!! 感谢  = v =

猜你喜欢

转载自blog.csdn.net/qq_43485489/article/details/126487018
今日推荐