酒店管理系统

文章目录

  • 酒店管理系统
    • 一、项目演示
    • 二、项目介绍
    • 三、15000字论文参考
    • 四、部分功能截图
    • 五、部分代码展示
    • 六、底部获取项目源码和万字论文参考(9.9¥带走)

酒店管理系统

一、项目演示

酒店管理系统

二、项目介绍

基于springboot+vue前后端分离的酒店管理系统

角色分为用户和管理员

用户:注册、登录、查询空余房间、房间预约、我的(查看预约订单)、评论
管理员:登录、用户管理、订单管理(处理酒店预约订单、查看订单列表)、房间管理(房间列表、详情查询、添加房间、修改房间)、评论列表

项目技术
语言:java
前端技术:vue、element-ui
后端技术:springboot、mybatisplus
数据库:MySQL

三、15000字论文参考

在这里插入图片描述
在这里插入图片描述

四、部分功能截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

五、部分代码展示

package com.rabbiter.hotel.controller.admin;import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.rabbiter.hotel.common.CommonResult;
import com.rabbiter.hotel.common.StatusCode;
import com.rabbiter.hotel.domain.Order;
import com.rabbiter.hotel.domain.User;
import com.rabbiter.hotel.service.OrderService;
import com.rabbiter.hotel.service.RoomService;
import com.rabbiter.hotel.service.UserService;
import org.springframework.web.bind.annotation.*;import javax.annotation.Resource;
import java.util.List;/*** @author:rabbiter* @date:2023/01/01 13:08* Description:*/
@RestController("adminOrderController")
@RequestMapping("/admin")
public class OrderController {@Resourceprivate OrderService orderService;@Resourceprivate RoomService roomService;@Resourceprivate UserService userService;@GetMapping("/listOrders")public CommonResult<List<Order>> listOrders(@RequestParam("orderFlags") List<Integer> flags) {CommonResult<List<Order>> commonResult = new CommonResult<>();QueryWrapper queryWrapper = new QueryWrapper();queryWrapper.in("flag", flags);List<Order> userList = orderService.list(queryWrapper);commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData(userList);return commonResult;}@PostMapping("/unsubscribe")public CommonResult<String> unsubscribe(@RequestParam("orderId") Integer orderId) {CommonResult<String> commonResult = new CommonResult<>();Order order = orderService.getById(orderId);order.setFlag(2);boolean result = orderService.updateById(order);if (result) {commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData("退订成功");} else {commonResult.setCode(StatusCode.COMMON_FAIL.getCode());commonResult.setMessage(StatusCode.COMMON_FAIL.getMessage());commonResult.setData("退订失败");}return commonResult;}@PostMapping("/handle")public CommonResult<String> handle(@RequestParam("orderId") Integer orderId) {CommonResult<String> commonResult = new CommonResult<>();Order order = orderService.getById(orderId);order.setFlag(1);boolean result = orderService.updateById(order);if (result) {roomService.bookRoom(order.getRoomId());User user = userService.getById(order.getUserId());int jifen = (int) (user.getJifen() + order.getRealPrice());user.setJifen(jifen);userService.updateById(user);commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData("办理入住成功");} else {commonResult.setCode(StatusCode.COMMON_FAIL.getCode());commonResult.setMessage(StatusCode.COMMON_FAIL.getMessage());commonResult.setData("办理入住失败");}return commonResult;}
}
package com.rabbiter.hotel.controller.admin;import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.rabbiter.hotel.common.CommonResult;
import com.rabbiter.hotel.common.StatusCode;
import com.rabbiter.hotel.domain.Order;
import com.rabbiter.hotel.domain.Room;
import com.rabbiter.hotel.dto.AdminReturnRoomDTO;
import com.rabbiter.hotel.dto.DateSectionDTO;
import com.rabbiter.hotel.service.OrderService;
import com.rabbiter.hotel.service.RoomService;
import org.springframework.web.bind.annotation.*;import javax.annotation.Resource;
import java.util.List;/*** @author:rabbiter* @date:2023/01/01 13:08* Description:*/
@RestController("adminRoomController")
@RequestMapping("/admin")
public class RoomController {@Resourceprivate RoomService roomService;@Resourceprivate OrderService orderService;@GetMapping("/listRooms")public CommonResult<List<Room>> listRooms() {CommonResult<List<Room>> commonResult = new CommonResult<>();List<Room> roomList = roomService.list();commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData(roomList);return commonResult;}@PostMapping(value = "/roomDetail")public CommonResult<AdminReturnRoomDTO> roomDetail(@RequestParam("roomId") Integer roomId) {CommonResult<AdminReturnRoomDTO> commonResult = new CommonResult<>();AdminReturnRoomDTO returnRoomDTO = roomService.adminRoomDetail(roomId);commonResult.setData(returnRoomDTO);commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());return commonResult;}@PostMapping("/addRoom")public CommonResult<String> addRoom(@RequestBody Room room) {CommonResult<String> commonResult = new CommonResult<>();Room roomByNumber = roomService.getOne(new QueryWrapper<Room>().eq("number", room.getNumber()));if(roomByNumber != null) {commonResult.setCode(StatusCode.COMMON_FAIL.getCode());commonResult.setMessage(StatusCode.COMMON_FAIL.getMessage());commonResult.setData("房间号已存在");return commonResult;}boolean result = roomService.save(room);if (result) {commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData("添加房间成功");} else {commonResult.setCode(StatusCode.COMMON_FAIL.getCode());commonResult.setMessage(StatusCode.COMMON_FAIL.getMessage());commonResult.setData("添加房间失败");}return commonResult;}@PostMapping("/updateRoom")public CommonResult<String> updateRoom(@RequestBody Room room) {CommonResult<String> commonResult = new CommonResult<>();Room roomByNumber = roomService.getOne(new QueryWrapper<Room>().eq("number", room.getNumber()).ne("id", room.getId()));if(roomByNumber != null) {commonResult.setCode(StatusCode.COMMON_FAIL.getCode());commonResult.setMessage(StatusCode.COMMON_FAIL.getMessage());commonResult.setData("房间号已存在");return commonResult;}boolean result = roomService.updateById(room);if (result) {commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData("修改房间信息成功");} else {commonResult.setCode(StatusCode.COMMON_FAIL.getCode());commonResult.setMessage(StatusCode.COMMON_FAIL.getMessage());commonResult.setData("修改房间信息失败");}return commonResult;}@PostMapping("/deleteRoom")public CommonResult<String> deleteRoom(@RequestParam("roomId") Integer roomId) {CommonResult<String> commonResult = new CommonResult<>();// 移除关联订单orderService.remove(new QueryWrapper<Order>().eq("room_id", roomId));boolean result = roomService.removeById(roomId);if (result) {QueryWrapper queryWrapper = new QueryWrapper();queryWrapper.eq("room_id", roomId);orderService.remove(queryWrapper);commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData("删除房间成功");} else {commonResult.setCode(StatusCode.COMMON_FAIL.getCode());commonResult.setMessage(StatusCode.COMMON_FAIL.getMessage());commonResult.setData("删除房间失败");}return commonResult;}}
package com.rabbiter.hotel.controller.admin;import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.rabbiter.hotel.common.CommonResult;
import com.rabbiter.hotel.common.StatusCode;
import com.rabbiter.hotel.domain.Comment;
import com.rabbiter.hotel.domain.Order;
import com.rabbiter.hotel.domain.User;
import com.rabbiter.hotel.service.CommentService;
import com.rabbiter.hotel.service.OrderService;
import com.rabbiter.hotel.service.UserService;
import org.springframework.web.bind.annotation.*;import javax.annotation.Resource;
import java.util.List;/*** @author:rabbiter* @date:2023/01/01 13:08* Description:*/
@RestController("adminUserController")
@RequestMapping("/admin")
public class UserController {@Resourceprivate UserService userService;@Resourceprivate OrderService orderService;@Resourceprivate CommentService commentService;@GetMapping("/listUsers")public CommonResult<List<User>> listUsers() {CommonResult<List<User>> commonResult = new CommonResult<>();List<User> userList = userService.list();commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData(userList);return commonResult;}@PostMapping("/deleteUser")public CommonResult<String> deleteUser(@RequestParam("userId") Integer userId) {CommonResult<String> commonResult = new CommonResult<>();// 移除关联订单orderService.remove(new QueryWrapper<Order>().eq("user_id", userId));// 移除关联评论commentService.remove(new QueryWrapper<Comment>().eq("user_id", userId));boolean result = userService.removeById(userId);if (result) {commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData("删除成功");} else {commonResult.setCode(StatusCode.COMMON_FAIL.getCode());commonResult.setMessage(StatusCode.COMMON_FAIL.getMessage());commonResult.setData("删除失败");}return commonResult;}@PostMapping("/updateUser")public CommonResult<String> updateUser(@RequestBody User user) {CommonResult<String> commonResult = new CommonResult<>();boolean result = userService.updateById(user);if (result) {commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData("修改成功");} else {commonResult.setCode(StatusCode.COMMON_FAIL.getCode());commonResult.setMessage(StatusCode.COMMON_FAIL.getMessage());commonResult.setData("修改失败");}return commonResult;}@PostMapping("/getUserById")public CommonResult<User> getUserById(@RequestParam("userId") Integer userId) {CommonResult<User> commonResult = new CommonResult<>();User user = userService.getById(userId);commonResult.setCode(StatusCode.COMMON_SUCCESS.getCode());commonResult.setMessage(StatusCode.COMMON_SUCCESS.getMessage());commonResult.setData(user);return commonResult;}}

六、底部获取项目源码和万字论文参考(9.9¥带走)

有问题,或者需要协助调试运行项目的也可以

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/428.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

通过实例学C#之FileStream类

简介 可以通过此类进行文件读取。 首先在项目所在文件夹的Bin文件中新建一个test.txt文件&#xff0c;里面输入内容“hello world!”。 构造函数 FileStream (string path, FileMode mode&#xff0c;FileAccess access) 通过路径文件path&#xff0c;打开文件模式mode以及读写…

springboot注解学习记录(持续更新)

RestController 放在controller最前面&#xff0c;代表这个java文件是一个controller CrossOrigin 放在controller最前面&#xff0c;用于解决跨域情况下的请求。 RequestMapping(“/prefix”) 放在controller前&#xff0c;对当前controller所有的请求都要加上这个前缀 …

买婴儿洗衣机怎么选择?四大绝佳好用婴儿洗衣机分享

幼龄时期的宝宝的衣物&#xff0c;是比较需要注意的时候。可能一不注意宝宝穿在身上就会有不适宜症状发生。所以宝妈们真的要随时观察&#xff0c;然后在宝宝洗衣服的这上面多下点功夫&#xff0c;不要让宝宝受到这种无谓的伤害。小婴儿的抵抗力比我们差很多。有些细菌、病毒可…

今天给大家推荐36套404页面模板

404页面是网站必备的一个页面&#xff0c;它承载着用户体验与SEO优化的重任。当用户访问不存在的页面时&#xff0c;服务器会返回404错误代码&#xff0c;并显示404页面。一个好的404页面可以帮助用户快速找到所需信息&#xff0c;并提升网站的用户体验。 以下是一些演示下载资…

前端预处理器-stylus入门使用方法

Stylus是一款支持多样性的CSS预处理器&#xff0c;它的语法和普通的CSS有些不同&#xff0c;但更为简洁和灵活。以下是Stylus的入门使用方法&#xff1a; 安装Stylus&#xff1a;首先&#xff0c;你需要安装Node.js&#xff0c;这是运行Stylus的基础。然后&#xff0c;使用npm&…

速卖通爆款商品打造全攻略:从选品到补单,步步为赢

跨境电商行业的竞争也越来越大&#xff0c;速卖通卖家自然也要为店内的爆款而努力&#xff0c;同时也要清楚地意识到爆款也是有时限的&#xff0c;那么一款爆款商品该如何打造呢&#xff1f; 1.选品。 开店时&#xff0c;面对世界各地的消费者群体&#xff0c;远比国内复杂得…

JavaWeb--前端工程化

目录 1. 前端工程化 1.1. 概述 1.2. 前端工程化实现技术栈 2. ECMA6Script 2.1. es6的介绍 2.2. es6 变量 / 模版字符串 2.2.1. let 与 var 的差别 2.2.2. const 与 var 的差异 2.2.3. 模板字符串 2.3. 解构表达式 / 赋值 2.3.1. 数组解构赋值 2.3.2. 对象解构赋值 …

开发语言漫谈-kotlin

程序的运行环境包括移动设备、服务端、浏览器&#xff0c;服务器又分为window、linux等&#xff0c;不同的环境使用不同的开发语言。为了解决这个问题&#xff0c;开发IDE大拿JetBrains开发了kotlin。 Kotlin是一个岛屿的名字&#xff0c;全称是Kotlin Island。这个小岛位于俄罗…

xhs图片获取并且转换成PDF,实现了我考研期间一直想实现的想法

对于一些xhs图文&#xff0c;很多人其实想把它的图片保存到本地&#xff0c;尤其是下图所示的考研英语从文章中背单词&#xff0c;不说别人&#xff0c;我就是这样的。 我在考研期间就想实现把图片批量爬取下来&#xff0c;转成PDF&#xff0c;方便一篇一片阅读进行观看&#…

Ubuntu22.04.4 - 安装后使用笔记目录-VMware

安装的话就傻瓜式盲点&#xff0c;根据自己需求进行处理&#xff0c;我是在ssh的地方勾选了一下选项&#xff0c;其他都是默认项&#xff0c;官网上有文档&#xff0c;就不赘述了 一、登录用户管理 二、系统命令 三、vim 四、网络配置 五、apt 六、SSH 七、MySQL8

【React】表单

受控组件 本质上其实就是将表单中的控件和视图模型(状态)进行绑定&#xff0c;之后都是针对状态进行操作。 一个基本的受控组件 文本框&#xff0c;用户输入的内容会在状态中进行管理&#xff1a; import React, { useState } from react;const ControlledComponent () &g…

Linux学习(二)

Bootloader 引导加载程序&#xff08;Bootloader&#xff09;是计算机系统中的一个重要组件&#xff0c;负责在计算机启动时加载操作系统。它通常存储在计算机的固件中&#xff0c;比如BIOS或UEFI&#xff0c;或者存储在硬盘或固态硬盘的引导分区中。引导加载程序的主要作用是引…

【rust编译错误解读】

PANIC 1cannot index into a value of type std::option::Option<&Vec<Value>> &#xff08;不能访问下标index在一个Option包裹的Vec中&#xff09; 尝试对一个 Option 类型的值进行索引操作&#xff0c;而这个 Option 可能包含一个对 Vec 的引用&#xff0c…

《Linux运维总结:Kylin V10+ARM架构CPU基于docker-compose一键离线部署redis6.2.8之容器版哨兵集群》

总结&#xff1a;整理不易&#xff0c;如果对你有帮助&#xff0c;可否点赞关注一下&#xff1f; 更多详细内容请参考&#xff1a;《Linux运维篇&#xff1a;Linux系统运维指南》 一、部署背景 由于业务系统的特殊性&#xff0c;我们需要面向不通的客户安装我们的业务系统&…

NLP——序列文本信息处理

序列文本信息处理是指对那些具有明确词序或结构顺序&#xff08;如句子、段落、篇章等&#xff09;的文本数据进行专门的分析和转换&#xff0c;以保留并利用其内在的时序或逻辑关系。在NLP中&#xff0c;处理序列文本信息通常涉及以下几个关键步骤&#xff1a; 分词&#xff0…

idea 设置启动项指定使用的nacos namespace

文章目录 场景如图 场景 各个研发的nacos配置要做隔离&#xff0c;这时候通常有两种方式&#xff0c; 第一种修改bootstarp.yaml文件 指定研发自己的配置&#xff0c;第二种更优雅&#xff0c;只需要修改idea启动项, 对代码没有侵入 如图 –spring.cloud.nacos.discovery.names…

揭秘英伟达Blackwell平台网络拓扑架构,解锁超算新境界

英伟达Blackwell平台网络配置详解 AI算力研究&#xff1a;英伟达B200再创算力奇迹&#xff0c;液冷、光模块持续革新 突破性的GB200 NVL72全互联架构&#xff0c;带来高性能GPU解决方案。铜缆方案有望成为未来趋势&#xff0c;提供低成本、高带宽连接。 1. Blackwell 平台网络…

时序预测 | Transformer时间序列预测 Matlab代码

文章目录 效果一览文章概述源码设计参考资料 效果一览 文章概述 1.时序预测 | Transformer时间序列预测 Matlab代码 2.单变量时间序列预测&#xff1b; 3.多指标评价&#xff0c;评价指标包括&#xff1a;R2、MAE、MBE等&#xff0c;代码质量极高&#xff1b; 4.excel数据&…

程序使用哪个寄存器是由谁决定的?

在程序中使用哪些寄存器的决定通常是由多种因素决定的&#xff0c;包括&#xff1a; 1. 编译器或汇编器 编译器&#xff1a;对于高级编程语言&#xff0c;编译器在寄存器分配中起着重要作用。编译器分析程序的代码&#xff0c;识别常用的变量和表达式&#xff0c;并将它们映射…

政企即时通讯APP:快速构建专属、安全的智慧办公解决方案

在数字化时代&#xff0c;政企单位对信息系统的依赖日益加深&#xff0c;但随之而来的信息安全隐患也不容忽视。组织内部信息系统的安全问题&#xff0c;尤其是在人员调整或离职时&#xff0c;管理员账号管理的混乱&#xff0c;以及敏感资料泄露和业务系统破坏的风险&#xff0…