• 周四. 4 月 23rd, 2026

物嫩软件资讯网

软件资讯来物嫩

1024程序员节|基于Springboot实现运动场馆预约信息管理系统

admin@wunen

6 月 13, 2025

在即将到来的1024程序员节,谨以此文献给CSDN和亲爱的同行们。

项目编号:BS-XX-150

一,项目简介

随着社会发展,人们对体育健身的需求快速增长。体育服务业是体育产业的主体部分。体育场馆作为体育产业和体育事业发展的物质载体,提供的主要产品就是服务,是满足人们对体育服务需要的重要保障。体育场馆服务质量高低直接影响顾客的消费态度、水平和利益,进一步影响场馆的经济和社会效益。由此可见,体育服务质量是体育场馆生存和发展的基石和核心竞争力,体育场馆的服务质量管理是体育场馆的关键和核心内容。体育场馆高效率使用越来越受到场馆管理人员的重视,充分利用计算机信息技术对体育场地实现信息化管理,能有效提升场馆管理水平和工作效率,最大限度的利用场馆资源。

本次设计与开发的体育运动场馆管理系统主要采用Spring Boot技术,方便体育场馆的管理。主要实现功能有:场地管理,客户管理,消费点单,收银结账等功能。

通过初步的需求分析与研究,该系统包含两类用户:场地管理员、客户,拟定四大业务模块分别实现:场馆管理模块,客户管理模块,消费管理模块,系统管理模块。每个业务模块又包含若干业务子模块

  1. 场地管理模块:

场馆管理:场馆管理、场馆类型管理、预约管理、教练管理、场馆开场。

  1. 客户管理模块:对入场客户的信息进行记录,设置会员等。
  2. 消费点单模块:场馆中有体育用品进行售卖,以及陪练的教练,可以通过该模块进行登记。并可以查看各个场次的消费详情,统计并进行结账,以及对历史账单的查询。
  3. 系统管理:用户管理、菜单管理、密码管理等

前端用户登陆系统:可以查看场馆信息并进行预约,查看自己的预约信息,管理个人信息等。

系统目标是构建体育场馆计费与会员管理信息系统,实现计算机信息系统管理。本系统具有便捷、高效、易操作的特点。以场馆会员管理为例,在没有设计信息管理系统前,要从成千上万的会员卡片中查找信息,不仅费时,效率低,而且容易出现差错。在使用了体育场馆计费与会员管理信息系统之后,实现了计算机信息系统管理。任何操作都非常便捷、高效,经营效率大幅增加、经营成本大幅降低。最重要的是,运用系统还能提高管理水平,提高决策效率,用先进的计算机系统实现体育场馆的可持续发展,向科学管理不断迈进。体育运动场馆管理系统包括的体育场馆计费与会员管理信息系统无疑为场馆提供了发展的平台,它高度符合体育场馆的科学发展方向,在体育场馆发展史上具有里程碑意义。同时,我们还可以预见体育场馆管理信息系统将会朝着更快的速度,更大的容量,更高的效率三方面不断稳步发展。

二,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

后台开发技术:springboot+mybatis

前端开发技术:Layui+Jquery+Ajax

三,系统展示

管理员登陆

场馆管理

根据不同类型查看和管理不同的场馆

场馆预约管理

教练管理

客户管理

消费管理:添加消费记录时,选择场馆,只有场馆开场了才能选择

消费详情

管理员管理

菜单管理

密码管理

四,核心代码展示

package com.gymmanage.sys.controller;

import com.gymmanage.sys.entity.Menu;
import com.gymmanage.sys.service.MenuService;
import com.gymmanage.utils.AjaxRes;
import com.gymmanage.utils.Table;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/menu")
public class MenuController {
    @Autowired
    private MenuService menuService;

    @RequestMapping("/menuPage")
    public String menuPage(){
        return "/sys/menu";
    }

    @RequestMapping("/menuList")
    @ResponseBody
    public Table menuList(Integer pid){
        List<Menu> menus = menuService.selectAll(pid);
        int length = menus.size();
        return Table.success(Long.valueOf(length),menus);
    }

    @RequestMapping("/menuTree")
    @ResponseBody
    public Table menuTree(){
        return Table.success((long)0, menuService.getMenuTree());
    }

    @RequestMapping("/addMenu")
    @ResponseBody
    public AjaxRes addMenu(String title, String url, Integer parentId){
        AjaxRes ajaxRes = new AjaxRes();
        try {
            menuService.addMenu(title, url, parentId);
            ajaxRes.setMsg("保存成功");
            ajaxRes.setSuccess(true);
        }catch (Exception e){
            ajaxRes.setMsg("保存失败");
            ajaxRes.setSuccess(false);
        }
        return ajaxRes;
    }

    @RequestMapping("/deleteMenu")
    @ResponseBody
    public AjaxRes deleteMenu(Integer id){
        AjaxRes ajaxRes = new AjaxRes();
        try {
            menuService.deleteMenu(id);
            ajaxRes.setMsg("删除成功");
            ajaxRes.setSuccess(true);
        }catch (Exception e){
            ajaxRes.setMsg("删除失败");
            ajaxRes.setSuccess(false);
        }
        return ajaxRes;
    }

    @RequestMapping("/updateMenu")
    @ResponseBody
    public AjaxRes updateMenu(Integer id, String title, String url, Integer parentId){
        AjaxRes ajaxRes = new AjaxRes();
        List<Integer> childrenId = menuService.getChildrenId(id);
        for (Integer children : childrenId) {
            if (children.equals(parentId)){
                ajaxRes.setMsg("不能将自己的子菜单作为父级菜单");
                ajaxRes.setSuccess(false);
                return ajaxRes;
            }
        }
        try {
            menuService.updateMenu(id, title, url, parentId);
            ajaxRes.setMsg("更新成功");
            ajaxRes.setSuccess(true);
        }catch (Exception e){
            System.out.println(e);
            ajaxRes.setMsg("更新失败");
            ajaxRes.setSuccess(false);
        }
        return ajaxRes;
    }

}

package com.gymmanage.sys.controller;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.gymmanage.sys.entity.User;
import com.gymmanage.sys.service.UserService;
import com.gymmanage.utils.AjaxRes;
import com.gymmanage.utils.LayuiPage;
import com.gymmanage.utils.Table;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import sun.misc.BASE64Encoder;

import javax.servlet.http.HttpSession;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;

@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/userPage")
    public String user(){
        return "/sys/user";
    }

    @RequestMapping("/userAddPage")
    public String userAdd(){
        return "/sys/userAdd";
    }

    @RequestMapping("/updPwd")
    public String updPwd(){
        return "/sys/updPwd";
    }

    @RequestMapping("/userUpdatePage")
    public String userUpdate(Integer id, HttpSession session){
        session.setAttribute("updateUserId",id);
        return "/sys/userUpdate";
    }

    // 用户登录检查
    @RequestMapping("/userCheck")
    @ResponseBody
    public AjaxRes userCheck(String username, String pwd, HttpSession session,String role) throws NoSuchAlgorithmException, UnsupportedEncodingException {
        AjaxRes ajaxRes = new AjaxRes();
        // 密码加密
        MessageDigest md5= MessageDigest.getInstance("MD5");
        BASE64Encoder base64en = new BASE64Encoder();
        boolean res = false;
        if (role.equals("admin")){
            res = userService.checkPwd(username, base64en.encode(md5.digest(pwd.getBytes("utf-8"))));
        }else if (role.equals("user")) {
            String s = userService.checkClientPwd(username, pwd, session);
            if(s.equals("no")){
                res=false;
            }else {
                username = s;
                res = true;
            }
        }
        ajaxRes.setSuccess(res);
        if (res){
            ajaxRes.setMsg("登录成功");
            session.setAttribute("username",username);
        }else {
            ajaxRes.setMsg("登录失败");
        }
        return ajaxRes;
    }

    // 获取用户信息
    @RequestMapping("/getUser")
    @ResponseBody
    public String gete(HttpSession session){
        return session.getAttribute("username").toString();
    }

    // 用户注销
    @RequestMapping("/logout")
    @ResponseBody
    public AjaxRes logout(HttpSession session){
        AjaxRes ajaxRes = new AjaxRes();
        if (session != null) {
            session.invalidate();//调用session的invalidate()方法,将保存的session删除
        }
        ajaxRes.setSuccess(true);
        ajaxRes.setMsg("退出登录成功!");
        return ajaxRes;
    }

    @RequestMapping("/userList")
    @ResponseBody
    public Table userList(LayuiPage layuiPage){
        Page<?> page = PageHelper.startPage(layuiPage.getPage(), layuiPage.getLimit());
        List<User> users = userService.selectAll();
        return Table.success(Long.valueOf(page.getTotal()),users);
    }

    @RequestMapping("/userAdd")
    @ResponseBody
    public AjaxRes userAdd(User user) throws UnsupportedEncodingException, NoSuchAlgorithmException {
        return userService.addUser(user);
    }

    @RequestMapping("/userUpdate")
    @ResponseBody
    public AjaxRes userUpdate(User user){
        return userService.updateUser(user);
    }

    @RequestMapping("/userDelete")
    @ResponseBody
    public AjaxRes userDelete(Integer id){
        AjaxRes ajaxRes = new AjaxRes();
        try {
            userService.deleteUser(id);
            ajaxRes.setMsg("删除成功");
            ajaxRes.setSuccess(true);
        }catch (Exception e){
            ajaxRes.setMsg("删除失败");
            ajaxRes.setSuccess(false);
        }
        return ajaxRes;
    }

    @RequestMapping("/getOne")
    @ResponseBody
    public User getOne(HttpSession session){
        return userService.getOne((Integer)session.getAttribute("updateUserId"));
    }

    @RequestMapping("/passwordUpdate")
    @ResponseBody
    public AjaxRes passwordUpdate(String pwd1,String pwd2,HttpSession session) throws NoSuchAlgorithmException, UnsupportedEncodingException {
        AjaxRes ajaxRes = new AjaxRes();
        String username = (String) session.getAttribute("username");
        MessageDigest md5= MessageDigest.getInstance("MD5");
        BASE64Encoder base64en = new BASE64Encoder();
        boolean res = userService.checkPwd(username, base64en.encode(md5.digest(pwd1.getBytes("utf-8"))));
        if (!res){
            ajaxRes.setMsg("原密码错误");
            ajaxRes.setSuccess(false);
        }else{
            ajaxRes = userService.passwordUpdate(username, pwd2);
        }
        return ajaxRes;
    }

    @RequestMapping("/passwordUpdate2")
    @ResponseBody
    public AjaxRes passwordUpdate2(String pwd1,String pwd2,HttpSession session){
        AjaxRes ajaxRes = new AjaxRes();
        String username = (String) session.getAttribute("username");
        boolean res = userService.checkPwd2(username, pwd1);
        if (!res){
            ajaxRes.setMsg("原密码错误");
            ajaxRes.setSuccess(false);
        }else{
            ajaxRes = userService.passwordUpdate2(username, pwd2);
        }
        return ajaxRes;
    }

    @RequestMapping("/freeUser")
    @ResponseBody
    public List<User> freeUser(){
        return userService.freeUser();
    }

    @RequestMapping("/signIn")
    @ResponseBody
    public AjaxRes signIn(String name,String phone,String pwd1){
        AjaxRes ajaxRes = new AjaxRes();
        int byPhone = userService.getByPhone(phone);
        if (byPhone == 0){
            userService.signIn(name,phone,pwd1);
            ajaxRes.setSuccess(true);
        }else {
            ajaxRes.setSuccess(false);
        }
        return ajaxRes;
    }

}

package com.gymmanage.gym.controller;


import com.gymmanage.gym.entity.Book;
import com.gymmanage.gym.entity.Place;
import com.gymmanage.gym.entity.PlaceKind;
import com.gymmanage.gym.service.PlaceService;
import com.gymmanage.sys.entity.User;
import com.gymmanage.utils.AjaxRes;
import com.gymmanage.utils.LayuiPage;
import com.gymmanage.utils.Table;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

import static sun.plugin2.os.windows.FLASHWINFO.size;

@Controller
@RequestMapping("place")
public class PlaceController {

    @Autowired
    private PlaceService placeService;

    @RequestMapping("/placePage")
    public String placePage(){
        return "/gym/place";
    }

    @RequestMapping("/placeAddPage")
    public String placeAddPage(){
        return "/gym/placeAdd";
    }

    @RequestMapping("/placeUpdatePage")
    public String placeUpdatePage(Integer id, HttpSession session){
        session.setAttribute("updatePlaceId",id);
        return "/gym/placeUpdate";
    }

    @RequestMapping("/getAllPlace")
    @ResponseBody
    public Table getAllPlace(Integer kindId, LayuiPage layuiPage){
        List<Place> allPlace = placeService.getAllPlace(kindId);
        int length = allPlace.size();
        return Table.success(Long.valueOf(length),allPlace);
    }

    @RequestMapping("/getAllPlaceBook")
    @ResponseBody
    public Table getAllPlaceBook(Integer kindId, LayuiPage layuiPage){
        List<Place> allPlace = placeService.getAllPlace(kindId);
        for (Place place : allPlace) {
            place.setNextBook(placeService.getNextBook(place.getId()));
        }
        int length = allPlace.size();
        return Table.success(Long.valueOf(length),allPlace);
    }

    @RequestMapping("/getAllPlaceKind")
    @ResponseBody
    public Table getAllPlaceKind(){
        int length = placeService.getAllPlaceKind().size();
        return Table.success(Long.valueOf(length),placeService.getAllPlaceKind());
    }

    @RequestMapping("/kindAdd")
    @ResponseBody
    public AjaxRes kindAdd(String kind, Integer kindManager){
        return placeService.kindAdd(kind, kindManager);
    }

    @RequestMapping("/kindList")
    @ResponseBody
    public List<PlaceKind> kindList(){
        return placeService.kindList();
    }

    @RequestMapping("/getOne")
    @ResponseBody
    public Place getOne(HttpSession session){
        return placeService.getOne((Integer)session.getAttribute("updatePlaceId"));
    }

    @RequestMapping("/placeAdd")
    @ResponseBody
    public AjaxRes placeAdd(Place place){
        return placeService.placeAdd(place);
    }

    @RequestMapping("/placeUpdate")
    @ResponseBody
    public AjaxRes placeUpdate(Place place,HttpSession session){
        place.setId((Integer)session.getAttribute("updatePlaceId"));
        return placeService.placeUpdate(place);
    }

    @RequestMapping("/changeState")
    @ResponseBody
    public AjaxRes changeState(Integer id,Integer state,Integer pay){
        return placeService.changeState(id, state,pay);
    }

    @RequestMapping("/getPlaceByState")
    @ResponseBody
    public List<Place> getPlaceByState(Integer state){
        return placeService.getPlaceByState(state);
    }
}

五,项目总结

(1)JAVAEE

JavaEE[2]是一套全新的技术架构,与传统的应用开发完全不同。JavaEE包含了许很多组件,可以对应用系统的开发及部署进行简化和规范化,从而提高应用系统的可复用性和安全性等。

因为JavaEE创造并使用了标准化的模块组件,简化了应用程序的开发周期,从而降低了使用JavaEE开发应用系统的难度。JavaEE的核心是一系列的技术规范,其包含的各种组件、架构和技术层次都有共同的标准和规格,从而让所有使用JavaEE架构的平台间都能很好的进行兼容、移植、复用,解决企业外部和内部之间很难进行通信,同一企业使用的信息产品间不能兼容的问题。JavaEE的一个特色是:其服务器以容器的方式装载、管理所有的组件,并为这些组件提供后台服务。JavaEE使用分层模型,把应用逻辑根据功能划分组件和层次,常见的分层结构是:领域对象层、数据访问对象层、业务逻辑层、控制器层、表现层。

(2) Spring Boot

Spring[3]是一个开源框架,Spring是于2003 年兴起的一个轻量级的Java 开发框架,由Rod Johnson 在其著作《Expert One-On-One J2EE Development and Design》。Spring是为了解决企业级应用开发的复杂性而创建的,使用Spring可以让简单的JavaBean实现之前只有EJB才能完成的事情[4]。但是Spring不仅仅局限于服务器端开发,任何Java应用都能在简单性、可测试性和松耦合性等方面从Spring中获益,Spring为企业级Java开发提供了一种相对简单的方法,通过依赖注入和面向切面编程,用简单的Java对象(Plain Old Java Object,POJO)实现了EJB的功能。

Spring Boot[5]基于约定优于配置的思想,可以让开发人员不必在配置与逻辑业务之间进行思维的切换,全身心的投入到逻辑业务的代码编写中,从而大大提高了开发的效率,一定程度上缩短了项目周期。

(3) Layui

layui(谐音:类 UI) 是一套开源的 Web UI[6] 解决方案,采用自身经典的模块化规范,并遵循原生 HTML/CSS/JS 的开发方式,极易上手,拿来即用。其风格简约轻盈,而组件优雅丰盈,从源代码到使用方法的每一处细节都经过精心雕琢,非常适合网页界面的快速开发。layui 区别于那些基于 MVVM 底层的前端框架,却并非逆道而行,而是信奉返璞归真之道。准确地说,它更多是面向后端开发者,你无需涉足前端各种工具,只需面对浏览器本身,让一切所需要的元素与交互,从这里信手拈来。

(4) MySQL

MySQL[7]是一种关系型数据库的管理系统,关系型数据库将数据保存在一个个不同的表中,通过键的形式保障记录的关系性,既加快了操作速度,又提高了灵活性。其与目前其他主流关系型数据库管理系统相比,具有体积小、速度快、拥有成本低,开源的特点,很适合个人或中小型企业使用。MySQL使用的SQL语言是访问关系型数据库的最常用的标准化语言。

  1. HTML

HTML[8]的全称为

超文本标记语言

,是一种

标记语言

。它包括一系列

标签

.通过这些标签可以将网络上的

文档

格式统一,使分散的

Internet

资源连接为一个逻辑整体。HTML文本是由HTML命令组成的描述性

文本

,HTML命令可以说明

文字



图形



动画



声音



表格



链接

等。


超文本

是一种组织信息的

方式

,它通过

超级链接

方法将文本中的文字、图表与其他

信息媒体

相关联。这些相互关联的信息媒体可能在同一文本中,也可能是其他文件,或是

地理位置

相距遥远的某台

计算机

上的文件。这种组织信息方式将分布在不同位置的信息资源用随机方式进行连接,为人们查找,

检索

信息提供方便。

(6) JavaScript

JavaScript[9](Java脚本)是一种基于对象(Object)和事件驱动( Event Driven)并具有安全性能的脚本语言,使用JavaScript可以轻松的实现与HTML的互操作,并且完成丰富的页面交互效果,它是通过嵌入或调入在标准的HTML语言中实现的,它的出现弥补了HTML的缺陷,是java与HTML折衷的选择。

(7) CSS

层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现

HTML



标准通用标记语言

的一个应用)或

XML

(标准通用标记语言的一个子集)等文件样式的计算机语言。CSS不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化。CSS 能够对网页中元素位置的排版进行像素级精确控制,支持几乎所有的字体字号样式,拥有对网页对象和模型样式编辑的能力。

结论

系统主要实现了体育运动场馆的管理,使得用户和系统的交互更简洁、方便和科学化,让体育运动场馆的管理更加有序。该系统提供了场地管理,销售商品管理,教练管理等,可以让管理者更清晰的知道目前体育场馆的情况,以便对资源做出更合理的分配。在客户完时可自动生成账单明细,在减少管理者统计压力的同时,也对消费者透明,提升服务的体验度。本系统运用于各类体育场馆中可大大简化业务流程、提高工作效率,通过辅助管理人员决策,从而使得经济效益在现有水平上稳步提升,达到场馆最优化、经济效益最大

化的目标。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注