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

基于web的酒店客房管理系统

目录

前言

 一、技术栈

二、系统功能介绍

用户信息管理

会员信息管理

客房信息管理

收藏客房管理

用户入住管理

客房清扫管理

三、核心代码

1、登录模块

 2、文件上传模块

3、代码封装


前言

随着信息技术在管理上越来越深入而广泛的应用,管理信息系统的实施在技术上已逐步成熟。本文介绍了酒店客房管理系统的开发全过程。通过分析酒店客房管理系统管理的不足,创建了一个计算机管理酒店客房管理系统的方案。文章介绍了酒店客房管理系统的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。

本酒店客房管理系统有管理员,用户,会员,清洁人员。管理员功能有个人中心,用户管理,会员管理,清洁人员管理,客房信息管理,用户预约管理,会员预约管理,用户取消管理,会员取消管理,用户入住管理,会员入住管理,用户退房管理,会员退房管理,清扫房间管理,留言板管理,系统管理等。因而具有一定的实用性。

本站是一个B/S模式系统,后台采用Spring Boot框架,前台采用VUE框架,MYSQL数据库设计开发,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得酒店客房管理系统管理工作系统化、规范化。本系统的使用使管理人员从繁重的工作中解脱出来,实现无纸化办公,能够有效的提高酒店客房管理系统管理效率。

 一、技术栈

末尾获取源码
SpringBoot+Vue+JS+ jQuery+Ajax...

二、系统功能介绍

用户信息管理

酒店客房管理系统的系统管理员可以管理用户信息,可以对用户信息信息添加修改删除以及查询操作。

会员信息管理

系统管理员可以查看对会员信息信息进行添加,修改,删除以及查询操作。

 

客房信息管理

管理员可以对客房信息信息进行修改,删除以及查询操作。

收藏客房管理

用户登录后可以对客房信息进行收藏,预定。

 

用户入住管理

管理员可以对用户入住信息进行管理,可以添加,修改,删除以及清扫。

客房清扫管理

清洁人员登录可以对用户入住的客房进行清扫。

 

三、核心代码

1、登录模块

 
package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
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.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

 2、文件上传模块

package com.controller;import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
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 org.springframework.web.multipart.MultipartFile;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;/*** 上传文件映射表*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{@Autowiredprivate ConfigService configService;/*** 上传文件*/@RequestMapping("/upload")public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {if (file.isEmpty()) {throw new EIException("上传文件不能为空");}String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}String fileName = new Date().getTime()+"."+fileExt;File dest = new File(upload.getAbsolutePath()+"/"+fileName);file.transferTo(dest);FileUtils.copyFile(dest, new File("C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload"+"/"+fileName));if(StringUtils.isNotBlank(type) && type.equals("1")) {ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));if(configEntity==null) {configEntity = new ConfigEntity();configEntity.setName("faceFile");configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put("file", fileName);}/*** 下载文件*/@IgnoreAuth@RequestMapping("/download")public ResponseEntity<byte[]> download(@RequestParam String fileName) {try {File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}File file = new File(upload.getAbsolutePath()+"/"+fileName);if(file.exists()){/*if(!fileService.canRead(file, SessionManager.getSessionUser())){getResponse().sendError(403);}*/HttpHeaders headers = new HttpHeaders();headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    headers.setContentDispositionFormData("attachment", fileName);    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);}} catch (IOException e) {e.printStackTrace();}return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);}}

3、代码封装

package com.utils;import java.util.HashMap;
import java.util.Map;/*** 返回数据*/
public class R extends HashMap<String, Object> {private static final long serialVersionUID = 1L;public R() {put("code", 0);}public static R error() {return error(500, "未知异常,请联系管理员");}public static R error(String msg) {return error(500, msg);}public static R error(int code, String msg) {R r = new R();r.put("code", code);r.put("msg", msg);return r;}public static R ok(String msg) {R r = new R();r.put("msg", msg);return r;}public static R ok(Map<String, Object> map) {R r = new R();r.putAll(map);return r;}public static R ok() {return new R();}public R put(String key, Object value) {super.put(key, value);return this;}
}

相关文章:

基于web的酒店客房管理系统

目录 前言 一、技术栈 二、系统功能介绍 用户信息管理 会员信息管理 客房信息管理 收藏客房管理 用户入住管理 客房清扫管理 三、核心代码 1、登录模块 2、文件上传模块 3、代码封装 前言 随着信息技术在管理上越来越深入而广泛的应用&#xff0c;管理信息系统的实施…...

linux查看系统信息

Linux查看当前操作系统版本信息 cat /proc/version Linux version 2.6.32-696.el6.x86_64 (mockbuildc1bm.rdu2.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) ) #1 SMP Tue Mar 21 19:29:05 UTC 2017 Linux查看版本当前操作系统内核信息 uname -a Linux…...

蓝牙官网demo的记录

目录 一、官网蓝牙demo 二、可以参考的博客带蓝牙demo 一、官网蓝牙demo 平常看android官网&#xff0c;发现有两个不同的文档地址&#xff1a; 连接 | Android 开源项目 | Android Open Source Project 蓝牙概览 | Connectivity | Android Developers 蓝牙demo在 …...

Linux相关概念及常见指令

注意&#xff1a;本篇博客除了讲解Linux的相关指令&#xff0c;还穿插着Linux相关概念及原理的讲解。 账号相关指令 whoami:查看当前用户 adduser 用户名: 添加新用户 passwd 用户名&#xff1a;为这个用户设置密码 ls指令 1.Linux中文件的理解 文件是Linux中存储数据的基本单…...

CentOS 系统如何在防火墙开启端口

在 CentOS 上&#xff0c;你可以使用 firewall-cmd 命令来开启防火墙的特定服务或端口。以下是在 CentOS 上开启 3306 端口的步骤&#xff1a; 检查防火墙状态&#xff1a;可以使用以下命令检查防火墙的状态&#xff1a; sudo firewall-cmd --state如果防火墙处于活动状态&…...

2023年电工(初级)证考试题库及电工(初级)试题解析

题库来源&#xff1a;安全生产模拟考试一点通公众号小程序 2023年电工&#xff08;初级&#xff09;证考试题库及电工&#xff08;初级&#xff09;试题解析是安全生产模拟考试一点通结合&#xff08;安监局&#xff09;特种作业人员操作证考试大纲和&#xff08;质检局&#…...

vue拦截器是什么,如何使用

Vue拦截器是一种用来拦截并处理HTTP请求和响应的机制&#xff0c;它可以在请求或响应发送前或后进行一些预处理或处理。在Vue中&#xff0c;可以使用axios库来实现拦截器&#xff0c;axios库是一个基于Promise的HTTP客户端&#xff0c;可以用于浏览器和Node.js平台。 使用axio…...

CSS 之 table 表格布局

一、简介 ​ 除了使用HTML的<table>元素外&#xff0c;我们还可以通过display: table/inline-table; 设置元素内部的布局类型为表格布局。并结合table-cell、table-row等相关CSS属性值可以实现HTML中<table>系列元素的效果&#xff0c;具有表头、表尾、行、单元格…...

【Kotlin精简】第2章 集合

1 简介 在 Kotlin 中集合主要分为可变集合与只读集合&#xff0c;其中可变集合使用 “Mutable” 前缀 集合类名表示&#xff0c;比如 MutableList、MutableSet、MutableMap 等。而对于只读集合就是和 Java 中集合类名是一致。 Java 中的 List 非 Kotlin 中的 List , 因为 Kot…...

VSCODE+PHP8.2配置踩坑记录

VSCODEPHP8.2配置踩坑记录 – WhiteNights Site 我配置过的最恶心的环境之一&#xff1a;windows上的php。另一个是我centos服务器上的php。 进不了断点 端口配置和xdebug的安装 这个应该是最常见的问题了。从网上下载完php并解压到本地&#xff0c;打开vscode&#xff0c;安装…...

React 状态管理 - Context API 前世今生(下)

New Context API Provider【context的生产者组件】 createContext 创建一个Context对象&#xff0c;订阅了整个Context对象的组件&#xff0c;会从组件树中离自身最近的那个匹配的Provider中读取到当前的context值。Context.Provider 父Context对象返回的Provider组件&#x…...

地下城堡3魂之诗阵容搭配攻略

在地下城堡3魂之诗游戏中&#xff0c;拥有一个合理搭配的阵容非常关键&#xff0c;可以让角色能力发挥最大化。以下是建议的阵容搭配及攻略&#xff1a; 关注【娱乐天梯】&#xff0c;获取内部福利号 1.核心成员(2名) 在阵容中选择两个输出型角色作为核心成员&#xff0c;他们的…...

网工内推 | 技术支持工程师,厂商公司,HCIA即可,有带薪年假

01 华为终端有限公司 招聘岗位&#xff1a;初级技术支持 职责描述&#xff1a; 1、通过远程方式处理华为用户在产品使用过程中各种售后问题&#xff1b; 2、收集并整理消费者声音&#xff0c;提供服务持续优化建议&#xff1b; 3、对服务中发现的热点、难点问题及其他有可能造…...

有 AI,无障碍,AIoT 设备为视障人群提供便利

据世界卫生组织统计&#xff0c;全球共 22 亿人视力受损&#xff0c;包含 2.85 亿视障人群和 3,900 万全盲人群。而且&#xff0c;这一数字将随老龄化加剧不断增加。 虽然视障人群面临着诸多不便&#xff0c;但是针对视障人群的辅助设备却存在成本高、维护困难、操作复杂等问题…...

数据结构学习笔记——数据结构概论

目录 一、数据与数据元素二、数据类型和抽象数据类型三、数据结构的定义&#xff08;一&#xff09;逻辑结构&#xff08;二&#xff09;存储结构&#xff08;物理结构&#xff09;1、顺序存储结构2、链式存储结构3、索引存储结构4、散列存储结构 &#xff08;三&#xff09;数…...

关于 打开虚拟机出现“...由VMware产品创建,但该产品与此版VMwareWorkstateion不兼容,因此无法使用” 的解决方法

文为原创文章&#xff0c;转载请注明原文出处 本文章博客地址&#xff1a;https://hpzwl.blog.csdn.net/article/details/133678951 红胖子(红模仿)的博文大全&#xff1a;开发技术集合&#xff08;包含Qt实用技术、树莓派、三维、OpenCV、OpenGL、ffmpeg、OSG、单片机、软硬结…...

windows的最佳选项卡式窗口管理器软件TidyTabs

下载&#xff1a; https://jmj.cc/s/z1t3kt?pucodeS1wc https://download.csdn.net/download/mo3408/88420433 TidyTabs是一款Windows应用程序&#xff0c;它可以将多个打开的窗口整理成一个选项卡式的界面&#xff0c;使得用户可以更加方便地切换和管理不同的窗口。 Tidy…...

【Python 千题 —— 基础篇】浮点数转为整数

题目描述 题目描述 给出一个浮点数&#xff0c;请将这个浮点数转换成整数。 输入描述 输入一个浮点数。 输出描述 程序将浮点数转换为整数并输出。 示例 示例 ① 2.333输出&#xff1a; 2代码讲解 下面是本题的代码&#xff1a; # 描述: 给出一个浮点数&#xff0c…...

【Linux--进程间通信】

进程间通信介绍 进程间通信目的 数据传输&#xff1a;一个进程需要将它的数据发送给另一个进程资源共享&#xff1a;多个进程之间共享同样的资源通知事件&#xff1a;一个进程需要向另一个或一组进程发送消息。通知它&#xff08;它们&#xff09;发生了某种事件&#xff08;如…...

Linux C文件操作

文章目录 文件操作函数文件系统调用系统调用与标准函数c的调用的区别文件的读取位置标准c函数系统调用空洞文件 文件的内存映射操作文件目录 linux下的文件操作包括两种&#xff0c;一种是使用C函数&#xff0c;一种是使用系统调用。 gcc 常用来实现c程序的编译gcc filename.c …...

深入解析ARS_408毫米波雷达与SocketCAN的CAN总线通信实践

1. 从零开始&#xff1a;为什么我们需要SocketCAN来“对话”毫米波雷达&#xff1f; 大家好&#xff0c;我是老张&#xff0c;在智能驾驶和机器人领域摸爬滚打了十几年&#xff0c;和各种传感器打交道是家常便饭。今天想和大家深入聊聊一个非常具体、但又至关重要的技术点&…...

FreeRTOS任务优先级怎么设?从智能健康助手项目看LVGL、传感器、看门狗任务的调度实战

FreeRTOS任务优先级设计实战&#xff1a;智能健康助手的调度艺术 在嵌入式系统开发中&#xff0c;任务优先级设置往往决定了整个系统的响应性和稳定性。我曾在一个智能健康监测设备项目中&#xff0c;面对LVGL界面、多传感器数据采集和系统监控等多任务协同工作的挑战&#xf…...

TDEngine-OSS-3.3.7.5开源版高可用部署实战(单节点快速入门与三副本集群搭建详解)

1. TDEngine开源版入门&#xff1a;为什么选择它&#xff1f; 如果你正在寻找一个高性能、开源的时序数据库&#xff0c;TDEngine绝对值得考虑。这个由涛思数据推出的产品&#xff0c;专门为物联网、工业互联网等场景设计&#xff0c;能够轻松处理海量时间序列数据。我最近在实…...

别再只杀进程了!挖矿病毒XMRig的完整清除与溯源指南(附config.json钱包地址分析)

深度对抗XMRig挖矿病毒&#xff1a;从清除到溯源的实战手册 发现任务管理器里反复出现的xmrig.exe进程&#xff1f;别急着再次点击"结束任务"——这就像用创可贴处理骨折&#xff0c;治标不治本。作为处理过数百起挖矿事件的安全工程师&#xff0c;我总结了一套从内…...

STEP3-VL-10B开源大模型部署:从HuggingFace下载到CSDN算力上线全过程

STEP3-VL-10B开源大模型部署&#xff1a;从HuggingFace下载到CSDN算力上线全过程 想体验一个能看懂图片、理解图表、甚至帮你分析复杂文档的AI助手吗&#xff1f;今天要介绍的STEP3-VL-10B&#xff0c;就是一个让你用普通显卡就能跑起来的“多面手”AI模型。 你可能听说过那些…...

FPGA调试:除了SignalTap,你更应该试试Quartus自带的这个免费“信号发生器+逻辑分析仪”

FPGA调试实战&#xff1a;Quartus自带的轻量级调试利器In-System Sources and Probes Editor 在FPGA开发中&#xff0c;调试环节往往占据项目周期的半壁江山。当SignalTap II这类逻辑分析仪因资源占用过高而显得"杀鸡用牛刀"时&#xff0c;许多工程师会陷入两难——既…...

EZSwiftExtensions 性能优化技巧:让你的扩展运行更快更稳定

EZSwiftExtensions 性能优化技巧&#xff1a;让你的扩展运行更快更稳定 【免费下载链接】EZSwiftExtensions :smirk: How Swift standard types and classes were supposed to work. 项目地址: https://gitcode.com/gh_mirrors/ez/EZSwiftExtensions EZSwiftExtensions …...

NLP-StructBERT在跨语言语义匹配中的惊艳效果案例

NLP-StructBERT在跨语言语义匹配中的惊艳效果案例 最近在做一个国际化产品的语义搜索功能时&#xff0c;遇到了一个挺头疼的问题&#xff1a;用户用中文提问&#xff0c;但我们的知识库里有大量优质的英文资料。传统的做法是先把问题翻译成英文&#xff0c;再去搜索&#xff0…...

Koikatu HF Patch完整安装指南:5步轻松解锁游戏全部潜力

Koikatu HF Patch完整安装指南&#xff1a;5步轻松解锁游戏全部潜力 【免费下载链接】KK-HF_Patch Automatically translate, uncensor and update Koikatu! and Koikatsu Party! 项目地址: https://gitcode.com/gh_mirrors/kk/KK-HF_Patch 还在为Koikatu游戏体验不完整…...

Betaflight 2025.12:Azure RTOS架构重构带来的无人机飞控性能革命

Betaflight 2025.12&#xff1a;Azure RTOS架构重构带来的无人机飞控性能革命 【免费下载链接】betaflight Open Source Flight Controller Firmware 项目地址: https://gitcode.com/gh_mirrors/be/betaflight Betaflight作为全球最流行的开源无人机飞控固件&#xff0c…...