博主介绍:✌从事软件开发10年之余,专注于Java技术领域、Python人工智能及数据挖掘、小程序项目开发和Android项目开发等。CSDN、掘金、华为云、InfoQ、阿里云等平台优质作者✌
🍅文末获取源码联系🍅
👇🏻 精彩专栏推荐订阅👇🏻 不然下次找不到哟
————————————————计算机毕业设计题目《1000套》✌
目录
一.前言介绍及开发技术
二.功能设计
三.功能截图
四.数据库表结构设计
五.关键代码
六.论文目录参考
七.源码获取
一.前言介绍及开发技术
起初通过HTML静态网页直接进行民宿推荐管理,具有即时性,无时空限制,蕴含丰富信息等特点,完美契合民宿推荐时效性、信息量大等需求。但随着Internet的进一步发展,实时信息不断变更,增加,交互性需求增大,静态网页显得难以胜任。民宿推荐系统的设计从最初简单的静态网页设计,到现在的基于B/S模式的民宿推荐系统,已经逐渐形成了一个系统化、规范化的设计理念。因此需要一种动态的平台实现民宿推荐管理。并且该系统应成为一个不单只是提供信息浏览服务,还要给予用户实用的交互功能。系统采用B/S架构,java语言作为主要开发语言,MySQL技术创建和管理数据库。系统主要分为管理员、用户和民宿员工三大功能模块。通过系统,管理员使用日常浏览器即可随时完成民宿推荐信息发布,契合民宿推荐管理对时效性需求的同时提高工作效率。
二.功能设计
系统的建设可以为民宿推荐管理提供帮助,通过对一些基础信息管理实现针对性的安排,可以按照用户的角色权限使不同用户角色看到不一样的信息界面。现根据需求阶段的分析,我们可以大致确定系统需要包含的功能如下图所示:
三.功能截图
当人们打开系统的网址后,首先看到的就是首页界面。在这里,人们能够看到系统的导航条,通过导航条导航进入各功能展示页面进行操作。
系统注册:在系统注册页面的输入栏中输入用户注册信息进行注册操作。
系统注册:在系统注册页面的输入栏中输入用户注册信息进行注册操作。
近期活动:在近期活动页面的输入栏中输入民宿名称进行搜索,可以查看到近期活动详细信息。
热门客房:在热门客房页面的输入栏中输入客房名称和选择客房类型进行搜索,可以查看到热门客房详细信息,并进行预定、评论或收藏操作。
留言板:在留言板页面通过输入留言内容,上传图片并立即提交进行在线留言,还可以对留言内容进行回复操作。
个人中心:在个人中心页面输入个人信息可以进行更新信息操作,并根据需要对我的收藏进行详细操作。
后台用户登录,在登录页面选择需要登录的角色,在正确输入用户名和密码后,进入操作系统进行操作。
管理员进入主页面,主要功能包括对个人中心、用户管理、民宿员工管理、近期活动管理、客房类型管理、热门客房管理、房间预定管理、预约服务管理、退房结账管理、投诉反馈管理、留言板、系统管理等进行操作。
民宿员工进入系统可以对个人中心、近期活动管理、热门客房管理、房间预定管理、预约服务管理、退房结账管理等功能进行操作。
用户进入系统可以对个人中心、房间预定管理、预约服务管理、退房结账管理、投诉反馈管理等功能进行操作。
四.数据库表结构设计
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `jspm2k78b` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `jspm2k78b`;
--
-- Table structure for table `aboutus`
--
DROP TABLE IF EXISTS `aboutus`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aboutus` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`title` varchar(200) NOT NULL COMMENT '标题',
`subtitle` varchar(200) DEFAULT NULL COMMENT '副标题',
`content` longtext NOT NULL COMMENT '内容',
`picture1` longtext COMMENT '图片1',
`picture2` longtext COMMENT '图片2',
`picture3` longtext COMMENT '图片3',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='关于我们';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `aboutus`
--
LOCK TABLES `aboutus` WRITE;
/*!40000 ALTER TABLE `aboutus` DISABLE KEYS */;
INSERT INTO `aboutus` VALUES (1,'2023-03-05 03:12:21','关于我们','ABOUT US','不管你想要怎样的生活,你都要去努力争取,不多尝试一些事情怎么知道自己适合什么、不适合什么呢?\n你说你喜欢读书,让我给你列书单,你还问我哪里有那么多时间看书;你说自己梦想的职业是广告文案,问我如何成为一个文案,应该具备哪些素质;你说你计划晨跑,但总是因为学习、工作辛苦或者身体不舒服第二天起不了床;你说你一直梦想一个人去长途旅行,但是没钱,父母觉得危险。其实,我已经厌倦了你这样说说而已的把戏,我觉得就算我告诉你如何去做,你也不会照做,因为你根本什么都不做。','upload/aboutus_picture1.jpg','upload/aboutus_picture2.jpg','upload/aboutus_picture3.jpg');
/*!40000 ALTER TABLE `aboutus` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `chat`
--
DROP TABLE IF EXISTS `chat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `chat` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`userid` bigint(20) NOT NULL COMMENT '用户id',
`adminid` bigint(20) DEFAULT NULL COMMENT '管理员id',
`ask` longtext COMMENT '提问',
`reply` longtext COMMENT '回复',
`isreply` int(11) DEFAULT NULL COMMENT '是否回复',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8 COMMENT='在线客服';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `chat`
--
LOCK TABLES `chat` WRITE;
/*!40000 ALTER TABLE `chat` DISABLE KEYS */;
INSERT INTO `chat` VALUES (101,'2023-03-05 03:12:21',1,1,'提问1','回复1',1),(102,'2023-03-05 03:12:21',2,2,'提问2','回复2',2),(103,'2023-03-05 03:12:21',3,3,'提问3','回复3',3),(104,'2023-03-05 03:12:21',4,4,'提问4','回复4',4),(105,'2023-03-05 03:12:21',5,5,'提问5','回复5',5),(106,'2023-03-05 03:12:21',6,6,'提问6','回复6',6),(107,'2023-03-05 03:12:21',7,7,'提问7','回复7',7),(108,'2023-03-05 03:12:21',8,8,'提问8','回复8',8);
/*!40000 ALTER TABLE `chat` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `config`
--
DROP TABLE IF EXISTS `config`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `config` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(100) NOT NULL COMMENT '配置参数名称',
`value` varchar(100) DEFAULT NULL COMMENT '配置参数值',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='配置文件';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `config`
--
LOCK TABLES `config` WRITE;
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
INSERT INTO `config` VALUES (1,'picture1','upload/picture1.jpg'),(2,'picture2','upload/picture2.jpg'),(3,'picture3','upload/picture3.jpg');
/*!40000 ALTER TABLE `config` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `discussremenkefang`
--
DROP TABLE IF EXISTS `discussremenkefang`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `discussremenkefang` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`refid` bigint(20) NOT NULL COMMENT '关联表id',
`userid` bigint(20) NOT NULL COMMENT '用户id',
`avatarurl` longtext COMMENT '头像',
`nickname` varchar(200) DEFAULT NULL COMMENT '用户名',
`content` longtext NOT NULL COMMENT '评论内容',
`reply` longtext COMMENT '回复内容',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='热门客房评论表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `discussremenkefang`
--
LOCK TABLES `discussremenkefang` WRITE;
/*!40000 ALTER TABLE `discussremenkefang` DISABLE KEYS */;
/*!40000 ALTER TABLE `discussremenkefang` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `fangjianyuding`
--
DROP TABLE IF EXISTS `fangjianyuding`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fangjianyuding` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`kefangbianhao` varchar(200) DEFAULT NULL COMMENT '客房编号',
`kefangmingcheng` varchar(200) DEFAULT NULL COMMENT '客房名称',
`kefangtupian` longtext COMMENT '客房图片',
`kefangleixing` varchar(200) DEFAULT NULL COMMENT '客房类型',
`yiwanjiage` varchar(200) DEFAULT NULL COMMENT '一晚价格',
`ruzhushijian` date DEFAULT NULL COMMENT '入住时间',
`yonghuzhanghao` varchar(200) DEFAULT NULL COMMENT '用户账号',
`yonghuxingming` varchar(200) DEFAULT NULL COMMENT '用户姓名',
`shouji` varchar(200) DEFAULT NULL COMMENT '手机',
`yuangonggonghao` varchar(200) DEFAULT NULL COMMENT '员工工号',
`yuangongxingming` varchar(200) DEFAULT NULL COMMENT '员工姓名',
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8 COMMENT='房间预定';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `fangjianyuding`
--
LOCK TABLES `fangjianyuding` WRITE;
/*!40000 ALTER TABLE `fangjianyuding` DISABLE KEYS */;
INSERT INTO `fangjianyuding` VALUES (61,'2023-03-05 03:12:21','客房编号1','客房名称1','upload/fangjianyuding_kefangtupian1.jpg,upload/fangjianyuding_kefangtupian2.jpg,upload/fangjianyuding_kefangtupian3.jpg','客房类型1','一晚价格1','2023-03-05','用户账号1','用户姓名1','手机1','员工工号1','员工姓名1','联系电话1'),(62,'2023-03-05 03:12:21','客房编号2','客房名称2','upload/fangjianyuding_kefangtupian2.jpg,upload/fangjianyuding_kefangtupian3.jpg,upload/fangjianyuding_kefangtupian4.jpg','客房类型2','一晚价格2','2023-03-05','用户账号2','用户姓名2','手机2','员工工号2','员工姓名2','联系电话2'),(63,'2023-03-05 03:12:21','客房编号3','客房名称3','upload/fangjianyuding_kefangtupian3.jpg,upload/fangjianyuding_kefangtupian4.jpg,upload/fangjianyuding_kefangtupian5.jpg','客房类型3','一晚价格3','2023-03-05','用户账号3','用户姓名3','手机3','员工工号3','员工姓名3','联系电话3'),(64,'2023-03-05 03:12:21','客房编号4','客房名称4','upload/fangjianyuding_kefangtupian4.jpg,upload/fangjianyuding_kefangtupian5.jpg,upload/fangjianyuding_kefangtupian6.jpg','客房类型4','一晚价格4','2023-03-05','用户账号4','用户姓名4','手机4','员工工号4','员工姓名4','联系电话4'),(65,'2023-03-05 03:12:21','客房编号5','客房名称5','upload/fangjianyuding_kefangtupian5.jpg,upload/fangjianyuding_kefangtupian6.jpg,upload/fangjianyuding_kefangtupian7.jpg','客房类型5','一晚价格5','2023-03-05','用户账号5','用户姓名5','手机5','员工工号5','员工姓名5','联系电话5'),(66,'2023-03-05 03:12:21','客房编号6','客房名称6','upload/fangjianyuding_kefangtupian6.jpg,upload/fangjianyuding_kefangtupian7.jpg,upload/fangjianyuding_kefangtupian8.jpg','客房类型6','一晚价格6','2023-03-05','用户账号6','用户姓名6','手机6','员工工号6','员工姓名6','联系电话6'),(67,'2023-03-05 03:12:21','客房编号7','客房名称7','upload/fangjianyuding_kefangtupian7.jpg,upload/fangjianyuding_kefangtupian8.jpg,upload/fangjianyuding_kefangtupian9.jpg','客房类型7','一晚价格7','2023-03-05','用户账号7','用户姓名7','手机7','员工工号7','员工姓名7','联系电话7'),(68,'2023-03-05 03:12:21','客房编号8','客房名称8','upload/fangjianyuding_kefangtupian8.jpg,upload/fangjianyuding_kefangtupian9.jpg,upload/fangjianyuding_kefangtupian10.jpg','客房类型8','一晚价格8','2023-03-05','用户账号8','用户姓名8','手机8','员工工号8','员工姓名8','联系电话8');
/*!40000 ALTER TABLE `fangjianyuding` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `jinqihuodong`
--
DROP TABLE IF EXISTS `jinqihuodong`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `jinqihuodong` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`huodongbianhao` varchar(200) DEFAULT NULL COMMENT '活动编号',
`huodongbiaoti` varchar(200) DEFAULT NULL COMMENT '活动标题',
`tupian` longtext COMMENT '图片',
`neirong` longtext COMMENT '内容',
`huodongshijian` date DEFAULT NULL COMMENT '活动时间',
`minsumingcheng` varchar(200) DEFAULT NULL COMMENT '民宿名称',
`yuangonggonghao` varchar(200) DEFAULT NULL COMMENT '员工工号',
`yuangongxingming` varchar(200) DEFAULT NULL COMMENT '员工姓名',
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
`clicktime` datetime DEFAULT NULL COMMENT '最近点击时间',
`clicknum` int(11) DEFAULT '0' COMMENT '点击次数',
PRIMARY KEY (`id`),
UNIQUE KEY `huodongbianhao` (`huodongbianhao`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COMMENT='近期活动';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `jinqihuodong`
--
LOCK TABLES `jinqihuodong` WRITE;
/*!40000 ALTER TABLE `jinqihuodong` DISABLE KEYS */;
INSERT INTO `jinqihuodong` VALUES (31,'2023-03-05 03:12:21','活动编号1','活动标题1','upload/jinqihuodong_tupian1.jpg,upload/jinqihuodong_tupian2.jpg,upload/jinqihuodong_tupian3.jpg','内容1','2023-03-05','民宿名称1','员工工号1','员工姓名1','13823888881','2023-03-05 11:12:21',1),(32,'2023-03-05 03:12:21','活动编号2','活动标题2','upload/jinqihuodong_tupian2.jpg,upload/jinqihuodong_tupian3.jpg,upload/jinqihuodong_tupian4.jpg','内容2','2023-03-05','民宿名称2','员工工号2','员工姓名2','13823888882','2023-03-05 11:12:21',2),(33,'2023-03-05 03:12:21','活动编号3','活动标题3','upload/jinqihuodong_tupian3.jpg,upload/jinqihuodong_tupian4.jpg,upload/jinqihuodong_tupian5.jpg','内容3','2023-03-05','民宿名称3','员工工号3','员工姓名3','13823888883','2023-03-05 11:12:21',3),(34,'2023-03-05 03:12:21','活动编号4','活动标题4','upload/jinqihuodong_tupian4.jpg,upload/jinqihuodong_tupian5.jpg,upload/jinqihuodong_tupian6.jpg','内容4','2023-03-05','民宿名称4','员工工号4','员工姓名4','13823888884','2023-03-05 11:12:21',4),(35,'2023-03-05 03:12:21','活动编号5','活动标题5','upload/jinqihuodong_tupian5.jpg,upload/jinqihuodong_tupian6.jpg,upload/jinqihuodong_tupian7.jpg','内容5','2023-03-05','民宿名称5','员工工号5','员工姓名5','13823888885','2023-03-05 11:12:21',5),(36,'2023-03-05 03:12:21','活动编号6','活动标题6','upload/jinqihuodong_tupian6.jpg,upload/jinqihuodong_tupian7.jpg,upload/jinqihuodong_tupian8.jpg','内容6','2023-03-05','民宿名称6','员工工号6','员工姓名6','13823888886','2023-03-05 11:12:21',6),(37,'2023-03-05 03:12:21','活动编号7','活动标题7','upload/jinqihuodong_tupian7.jpg,upload/jinqihuodong_tupian8.jpg,upload/jinqihuodong_tupian9.jpg','内容7','2023-03-05','民宿名称7','员工工号7','员工姓名7','13823888887','2023-03-05 11:12:21',7),(38,'2023-03-05 03:12:21','活动编号8','活动标题8','upload/jinqihuodong_tupian8.jpg,upload/jinqihuodong_tupian9.jpg,upload/jinqihuodong_tupian10.jpg','内容8','2023-03-05','民宿名称8','员工工号8','员工姓名8','13823888888','2023-03-05 11:12:21',8);
/*!40000 ALTER TABLE `jinqihuodong` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `kefangleixing`
--
DROP TABLE IF EXISTS `kefangleixing`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `kefangleixing` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`kefangleixing` varchar(200) DEFAULT NULL COMMENT '客房类型',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COMMENT='客房类型';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `kefangleixing`
--
LOCK TABLES `kefangleixing` WRITE;
/*!40000 ALTER TABLE `kefangleixing` DISABLE KEYS */;
INSERT INTO `kefangleixing` VALUES (41,'2023-03-05 03:12:21','客房类型1'),(42,'2023-03-05 03:12:21','客房类型2'),(43,'2023-03-05 03:12:21','客房类型3'),(44,'2023-03-05 03:12:21','客房类型4'),(45,'2023-03-05 03:12:21','客房类型5'),(46,'2023-03-05 03:12:21','客房类型6'),(47,'2023-03-05 03:12:21','客房类型7'),(48,'2023-03-05 03:12:21','客房类型8');
/*!40000 ALTER TABLE `kefangleixing` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `messages`
--
DROP TABLE IF EXISTS `messages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `messages` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`userid` bigint(20) NOT NULL COMMENT '留言人id',
`username` varchar(200) DEFAULT NULL COMMENT '用户名',
`avatarurl` longtext COMMENT '头像',
`content` longtext NOT NULL COMMENT '留言内容',
`cpicture` longtext COMMENT '留言图片',
`reply` longtext COMMENT '回复内容',
`rpicture` longtext COMMENT '回复图片',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=159 DEFAULT CHARSET=utf8 COMMENT='留言板';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `messages`
--
LOCK TABLES `messages` WRITE;
/*!40000 ALTER TABLE `messages` DISABLE KEYS */;
INSERT INTO `messages` VALUES (151,'2023-03-05 03:12:21',1,'用户名1','upload/messages_avatarurl1.jpg','留言内容1','upload/messages_cpicture1.jpg','回复内容1','upload/messages_rpicture1.jpg'),(152,'2023-03-05 03:12:21',2,'用户名2','upload/messages_avatarurl2.jpg','留言内容2','upload/messages_cpicture2.jpg','回复内容2','upload/messages_rpicture2.jpg'),(153,'2023-03-05 03:12:21',3,'用户名3','upload/messages_avatarurl3.jpg','留言内容3','upload/messages_cpicture3.jpg','回复内容3','upload/messages_rpicture3.jpg'),(154,'2023-03-05 03:12:21',4,'用户名4','upload/messages_avatarurl4.jpg','留言内容4','upload/messages_cpicture4.jpg','回复内容4','upload/messages_rpicture4.jpg'),(155,'2023-03-05 03:12:21',5,'用户名5','upload/messages_avatarurl5.jpg','留言内容5','upload/messages_cpicture5.jpg','回复内容5','upload/messages_rpicture5.jpg'),(156,'2023-03-05 03:12:21',6,'用户名6','upload/messages_avatarurl6.jpg','留言内容6','upload/messages_cpicture6.jpg','回复内容6','upload/messages_rpicture6.jpg'),(157,'2023-03-05 03:12:21',7,'用户名7','upload/messages_avatarurl7.jpg','留言内容7','upload/messages_cpicture7.jpg','回复内容7','upload/messages_rpicture7.jpg'),(158,'2023-03-05 03:12:21',8,'用户名8','upload/messages_avatarurl8.jpg','留言内容8','upload/messages_cpicture8.jpg','回复内容8','upload/messages_rpicture8.jpg');
/*!40000 ALTER TABLE `messages` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `minsuyuangong`
--
DROP TABLE IF EXISTS `minsuyuangong`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `minsuyuangong` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`yuangonggonghao` varchar(200) NOT NULL COMMENT '员工工号',
`mima` varchar(200) NOT NULL COMMENT '密码',
`yuangongxingming` varchar(200) NOT NULL COMMENT '员工姓名',
`touxiang` longtext COMMENT '头像',
`xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
`nianling` int(11) DEFAULT NULL COMMENT '年龄',
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
`minsumingcheng` varchar(200) DEFAULT NULL COMMENT '民宿名称',
PRIMARY KEY (`id`),
UNIQUE KEY `yuangonggonghao` (`yuangonggonghao`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='民宿员工';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `news`
--
DROP TABLE IF EXISTS `news`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `news` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`title` varchar(200) NOT NULL COMMENT '标题',
`introduction` longtext COMMENT '简介',
`picture` longtext NOT NULL COMMENT '图片',
`content` longtext NOT NULL COMMENT '内容',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=129 DEFAULT CHARSET=utf8 COMMENT='新闻资讯';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `remenkefang`
--
DROP TABLE IF EXISTS `remenkefang`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `remenkefang` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`kefangbianhao` varchar(200) DEFAULT NULL COMMENT '客房编号',
`kefangmingcheng` varchar(200) DEFAULT NULL COMMENT '客房名称',
`kefangtupian` longtext COMMENT '客房图片',
`kefangleixing` varchar(200) DEFAULT NULL COMMENT '客房类型',
`kefangzhuangtai` varchar(200) DEFAULT NULL COMMENT '客房状态',
`yiwanjiage` int(11) NOT NULL COMMENT '一晚价格',
`fuwuxiangmu` longtext COMMENT '服务项目',
`peitaosheshi` longtext COMMENT '配套设施',
`yuangonggonghao` varchar(200) DEFAULT NULL COMMENT '员工工号',
`yuangongxingming` varchar(200) DEFAULT NULL COMMENT '员工姓名',
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
`thumbsupnum` int(11) DEFAULT '0' COMMENT '赞',
`crazilynum` int(11) DEFAULT '0' COMMENT '踩',
`clicktime` datetime DEFAULT NULL COMMENT '最近点击时间',
`clicknum` int(11) DEFAULT '0' COMMENT '点击次数',
PRIMARY KEY (`id`),
UNIQUE KEY `kefangbianhao` (`kefangbianhao`)
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COMMENT='热门客房';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `remenkefang`
--
LOCK TABLES `remenkefang` WRITE;
/*!40000 ALTER TABLE `remenkefang` DISABLE KEYS */;
INSERT INTO `remenkefang` VALUES (51,'2023-03-05 03:12:21','客房编号1','客房名称1','upload/remenkefang_kefangtupian1.jpg,upload/remenkefang_kefangtupian2.jpg,upload/remenkefang_kefangtupian3.jpg','客房类型1','己预定',1,'服务项目1','配套设施1','员工工号1','员工姓名1','联系电话1',1,1,'2023-03-05 11:12:21',1),(52,'2023-03-05 03:12:21','客房编号2','客房名称2','upload/remenkefang_kefangtupian2.jpg,upload/remenkefang_kefangtupian3.jpg,upload/remenkefang_kefangtupian4.jpg','客房类型2','己预定',2,'服务项目2','配套设施2','员工工号2','员工姓名2','联系电话2',2,2,'2023-03-05 11:12:21',2),(53,'2023-03-05 03:12:21','客房编号3','客房名称3','upload/remenkefang_kefangtupian3.jpg,upload/remenkefang_kefangtupian4.jpg,upload/remenkefang_kefangtupian5.jpg','客房类型3','己预定',3,'服务项目3','配套设施3','员工工号3','员工姓名3','联系电话3',3,3,'2023-03-05 11:12:21',3),(54,'2023-03-05 03:12:21','客房编号4','客房名称4','upload/remenkefang_kefangtupian4.jpg,upload/remenkefang_kefangtupian5.jpg,upload/remenkefang_kefangtupian6.jpg','客房类型4','己预定',4,'服务项目4','配套设施4','员工工号4','员工姓名4','联系电话4',4,4,'2023-03-05 11:12:21',4),(55,'2023-03-05 03:12:21','客房编号5','客房名称5','upload/remenkefang_kefangtupian5.jpg,upload/remenkefang_kefangtupian6.jpg,upload/remenkefang_kefangtupian7.jpg','客房类型5','己预定',5,'服务项目5','配套设施5','员工工号5','员工姓名5','联系电话5',5,5,'2023-03-05 11:12:21',5),(56,'2023-03-05 03:12:21','客房编号6','客房名称6','upload/remenkefang_kefangtupian6.jpg,upload/remenkefang_kefangtupian7.jpg,upload/remenkefang_kefangtupian8.jpg','客房类型6','己预定',6,'服务项目6','配套设施6','员工工号6','员工姓名6','联系电话6',6,6,'2023-03-05 11:12:21',6),(57,'2023-03-05 03:12:21','客房编号7','客房名称7','upload/remenkefang_kefangtupian7.jpg,upload/remenkefang_kefangtupian8.jpg,upload/remenkefang_kefangtupian9.jpg','客房类型7','己预定',7,'服务项目7','配套设施7','员工工号7','员工姓名7','联系电话7',7,7,'2023-03-05 11:12:21',7),(58,'2023-03-05 03:12:21','客房编号8','客房名称8','upload/remenkefang_kefangtupian8.jpg,upload/remenkefang_kefangtupian9.jpg,upload/remenkefang_kefangtupian10.jpg','客房类型8','己预定',8,'服务项目8','配套设施8','员工工号8','员工姓名8','联系电话8',8,8,'2023-03-05 11:12:21',8);
/*!40000 ALTER TABLE `remenkefang` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `storeup`
--
DROP TABLE IF EXISTS `storeup`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `storeup` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`userid` bigint(20) NOT NULL COMMENT '用户id',
`refid` bigint(20) DEFAULT NULL COMMENT '商品id',
`tablename` varchar(200) DEFAULT NULL COMMENT '表名',
`name` varchar(200) NOT NULL COMMENT '名称',
`picture` longtext NOT NULL COMMENT '图片',
`type` varchar(200) DEFAULT '1' COMMENT '类型(1:收藏,21:赞,22:踩,31:竞拍参与,41:关注)',
`inteltype` varchar(200) DEFAULT NULL COMMENT '推荐类型',
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='收藏表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `storeup`
--
LOCK TABLES `storeup` WRITE;
/*!40000 ALTER TABLE `storeup` DISABLE KEYS */;
/*!40000 ALTER TABLE `storeup` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `systemintro`
--
DROP TABLE IF EXISTS `systemintro`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `systemintro` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`title` varchar(200) NOT NULL COMMENT '标题',
`subtitle` varchar(200) DEFAULT NULL COMMENT '副标题',
`content` longtext NOT NULL COMMENT '内容',
`picture1` longtext COMMENT '图片1',
`picture2` longtext COMMENT '图片2',
`picture3` longtext COMMENT '图片3',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='关于我们';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `systemintro`
--
LOCK TABLES `systemintro` WRITE;
/*!40000 ALTER TABLE `systemintro` DISABLE KEYS */;
INSERT INTO `systemintro` VALUES (1,'2023-03-05 03:12:21','系统简介','SYSTEM INTRODUCTION','当遇到挫折或失败,你是看见失败还是看见机会?挫折是我们每个人成长的必经之路,它不是你想有就有,想没有就没有的。有句名言说的好,如果你想一生摆脱苦难,你就得是神或者是死尸。这句话形象地说明了挫折是伴随着人生的,是谁都逃不掉的。人生在世,从古到今,不分天子平民,机遇虽有不同,但总不免有身陷困境或遭遇难题之处,这时候唯有通权达变,才能使人转危为安,甚至反败为胜。大部分的人,一生当中,最痛苦的经验是失去所爱的人,其次是丢掉一份工作。其实,经得起考验的人,就算是被开除也不会惊慌,要学会面对。','upload/systemintro_picture1.jpg','upload/systemintro_picture2.jpg','upload/systemintro_picture3.jpg');
/*!40000 ALTER TABLE `systemintro` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `token`
--
DROP TABLE IF EXISTS `token`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `token` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`userid` bigint(20) NOT NULL COMMENT '用户id',
`username` varchar(100) NOT NULL COMMENT '用户名',
`tablename` varchar(100) DEFAULT NULL COMMENT '表名',
`role` varchar(100) DEFAULT NULL COMMENT '角色',
`token` varchar(200) NOT NULL COMMENT '密码',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
`expiratedtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '过期时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='token表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `token`
--
LOCK TABLES `token` WRITE;
/*!40000 ALTER TABLE `token` DISABLE KEYS */;
/*!40000 ALTER TABLE `token` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tousufankui`
--
DROP TABLE IF EXISTS `tousufankui`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tousufankui` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`yonghuzhanghao` varchar(200) DEFAULT NULL COMMENT '用户账号',
`yonghuxingming` varchar(200) DEFAULT NULL COMMENT '用户姓名',
`shouji` varchar(200) DEFAULT NULL COMMENT '手机',
`shenfenzhenghao` varchar(200) DEFAULT NULL COMMENT '身份证号',
`fankuiyijian` longtext COMMENT '反馈意见',
`pingjiayijian` longtext COMMENT '评价意见',
`sfsh` varchar(200) DEFAULT '待审核' COMMENT '是否审核',
`shhf` longtext COMMENT '审核回复',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=99 DEFAULT CHARSET=utf8 COMMENT='投诉反馈';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tousufankui`
--
LOCK TABLES `tousufankui` WRITE;
/*!40000 ALTER TABLE `tousufankui` DISABLE KEYS */;
INSERT INTO `tousufankui` VALUES (91,'2023-03-05 03:12:21','用户账号1','用户姓名1','手机1','身份证号1','反馈意见1','评价意见1','是',''),(92,'2023-03-05 03:12:21','用户账号2','用户姓名2','手机2','身份证号2','反馈意见2','评价意见2','是',''),(93,'2023-03-05 03:12:21','用户账号3','用户姓名3','手机3','身份证号3','反馈意见3','评价意见3','是',''),(94,'2023-03-05 03:12:21','用户账号4','用户姓名4','手机4','身份证号4','反馈意见4','评价意见4','是',''),(95,'2023-03-05 03:12:21','用户账号5','用户姓名5','手机5','身份证号5','反馈意见5','评价意见5','是',''),(96,'2023-03-05 03:12:21','用户账号6','用户姓名6','手机6','身份证号6','反馈意见6','评价意见6','是',''),(97,'2023-03-05 03:12:21','用户账号7','用户姓名7','手机7','身份证号7','反馈意见7','评价意见7','是',''),(98,'2023-03-05 03:12:21','用户账号8','用户姓名8','手机8','身份证号8','反馈意见8','评价意见8','是','');
/*!40000 ALTER TABLE `tousufankui` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tuifangjiezhang`
--
DROP TABLE IF EXISTS `tuifangjiezhang`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tuifangjiezhang` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`kefangbianhao` varchar(200) DEFAULT NULL COMMENT '客房编号',
`kefangmingcheng` varchar(200) DEFAULT NULL COMMENT '客房名称',
`kefangleixing` varchar(200) DEFAULT NULL COMMENT '客房类型',
`yiwanjiage` float DEFAULT NULL COMMENT '一晚价格',
`ruzhutianshu` int(11) DEFAULT NULL COMMENT '入住天数',
`feiyongzongji` float DEFAULT NULL COMMENT '费用总计',
`ruzhushijian` date DEFAULT NULL COMMENT '入住时间',
`yonghuzhanghao` varchar(200) DEFAULT NULL COMMENT '用户账号',
`yonghuxingming` varchar(200) DEFAULT NULL COMMENT '用户姓名',
`yuangonggonghao` varchar(200) DEFAULT NULL COMMENT '员工工号',
`yuangongxingming` varchar(200) DEFAULT NULL COMMENT '员工姓名',
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
`crossuserid` bigint(20) DEFAULT NULL COMMENT '跨表用户id',
`crossrefid` bigint(20) DEFAULT NULL COMMENT '跨表主键id',
`ispay` varchar(200) DEFAULT '未支付' COMMENT '是否支付',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=utf8 COMMENT='退房结账';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tuifangjiezhang`
--
LOCK TABLES `tuifangjiezhang` WRITE;
/*!40000 ALTER TABLE `tuifangjiezhang` DISABLE KEYS */;
INSERT INTO `tuifangjiezhang` VALUES (81,'2023-03-05 03:12:21','客房编号1','客房名称1','客房类型1',1,1,1,'2023-03-05','用户账号1','用户姓名1','员工工号1','员工姓名1','联系电话1',1,1,'未支付'),(82,'2023-03-05 03:12:21','客房编号2','客房名称2','客房类型2',2,2,2,'2023-03-05','用户账号2','用户姓名2','员工工号2','员工姓名2','联系电话2',2,2,'未支付'),(83,'2023-03-05 03:12:21','客房编号3','客房名称3','客房类型3',3,3,3,'2023-03-05','用户账号3','用户姓名3','员工工号3','员工姓名3','联系电话3',3,3,'未支付'),(84,'2023-03-05 03:12:21','客房编号4','客房名称4','客房类型4',4,4,4,'2023-03-05','用户账号4','用户姓名4','员工工号4','员工姓名4','联系电话4',4,4,'未支付'),(85,'2023-03-05 03:12:21','客房编号5','客房名称5','客房类型5',5,5,5,'2023-03-05','用户账号5','用户姓名5','员工工号5','员工姓名5','联系电话5',5,5,'未支付'),(86,'2023-03-05 03:12:21','客房编号6','客房名称6','客房类型6',6,6,6,'2023-03-05','用户账号6','用户姓名6','员工工号6','员工姓名6','联系电话6',6,6,'未支付'),(87,'2023-03-05 03:12:21','客房编号7','客房名称7','客房类型7',7,7,7,'2023-03-05','用户账号7','用户姓名7','员工工号7','员工姓名7','联系电话7',7,7,'未支付'),(88,'2023-03-05 03:12:21','客房编号8','客房名称8','客房类型8',8,8,8,'2023-03-05','用户账号8','用户姓名8','员工工号8','员工姓名8','联系电话8',8,8,'未支付');
/*!40000 ALTER TABLE `tuifangjiezhang` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`username` varchar(100) NOT NULL COMMENT '用户名',
`password` varchar(100) NOT NULL COMMENT '密码',
`role` varchar(100) DEFAULT '管理员' COMMENT '角色',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'admin','admin','管理员','2023-03-05 03:12:21');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `yonghu`
--
DROP TABLE IF EXISTS `yonghu`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yonghu` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`yonghuzhanghao` varchar(200) NOT NULL COMMENT '用户账号',
`mima` varchar(200) NOT NULL COMMENT '密码',
`yonghuxingming` varchar(200) NOT NULL COMMENT '用户姓名',
`touxiang` longtext COMMENT '头像',
`xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
`nianling` int(11) DEFAULT NULL COMMENT '年龄',
`shouji` varchar(200) DEFAULT NULL COMMENT '手机',
`shenfenzhenghao` varchar(200) DEFAULT NULL COMMENT '身份证号',
PRIMARY KEY (`id`),
UNIQUE KEY `yonghuzhanghao` (`yonghuzhanghao`),
UNIQUE KEY `shenfenzhenghao` (`shenfenzhenghao`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='用户';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `yonghu`
--
LOCK TABLES `yonghu` WRITE;
/*!40000 ALTER TABLE `yonghu` DISABLE KEYS */;
INSERT INTO `yonghu` VALUES (11,'2023-03-05 03:12:21','用户账号1','123456','用户姓名1','upload/yonghu_touxiang1.jpg','男',1,'13823888881','440300199101010001'),(12,'2023-03-05 03:12:21','用户账号2','123456','用户姓名2','upload/yonghu_touxiang2.jpg','男',2,'13823888882','440300199202020002'),(13,'2023-03-05 03:12:21','用户账号3','123456','用户姓名3','upload/yonghu_touxiang3.jpg','男',3,'13823888883','440300199303030003'),(14,'2023-03-05 03:12:21','用户账号4','123456','用户姓名4','upload/yonghu_touxiang4.jpg','男',4,'13823888884','440300199404040004'),(15,'2023-03-05 03:12:21','用户账号5','123456','用户姓名5','upload/yonghu_touxiang5.jpg','男',5,'13823888885','440300199505050005'),(16,'2023-03-05 03:12:21','用户账号6','123456','用户姓名6','upload/yonghu_touxiang6.jpg','男',6,'13823888886','440300199606060006'),(17,'2023-03-05 03:12:21','用户账号7','123456','用户姓名7','upload/yonghu_touxiang7.jpg','男',7,'13823888887','440300199707070007'),(18,'2023-03-05 03:12:21','用户账号8','123456','用户姓名8','upload/yonghu_touxiang8.jpg','男',8,'13823888888','440300199808080008');
/*!40000 ALTER TABLE `yonghu` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `yuyuefuwu`
--
DROP TABLE IF EXISTS `yuyuefuwu`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yuyuefuwu` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`kefangbianhao` varchar(200) DEFAULT NULL COMMENT '客房编号',
`kefangmingcheng` varchar(200) DEFAULT NULL COMMENT '客房名称',
`shijian` date DEFAULT NULL COMMENT '时间',
`fuwuxiangmu` longtext COMMENT '服务项目',
`yonghuzhanghao` varchar(200) DEFAULT NULL COMMENT '用户账号',
`yonghuxingming` varchar(200) DEFAULT NULL COMMENT '用户姓名',
`yuangonggonghao` varchar(200) DEFAULT NULL COMMENT '员工工号',
`yuangongxingming` varchar(200) DEFAULT NULL COMMENT '员工姓名',
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
`sfsh` varchar(200) DEFAULT '待审核' COMMENT '是否审核',
`shhf` longtext COMMENT '审核回复',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8 COMMENT='预约服务';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `yuyuefuwu`
--
LOCK TABLES `yuyuefuwu` WRITE;
/*!40000 ALTER TABLE `yuyuefuwu` DISABLE KEYS */;
INSERT INTO `yuyuefuwu` VALUES (71,'2023-03-05 03:12:21','客房编号1','客房名称1','2023-03-05','服务项目1','用户账号1','用户姓名1','员工工号1','员工姓名1','联系电话1','是',''),(72,'2023-03-05 03:12:21','客房编号2','客房名称2','2023-03-05','服务项目2','用户账号2','用户姓名2','员工工号2','员工姓名2','联系电话2','是',''),(73,'2023-03-05 03:12:21','客房编号3','客房名称3','2023-03-05','服务项目3','用户账号3','用户姓名3','员工工号3','员工姓名3','联系电话3','是',''),(74,'2023-03-05 03:12:21','客房编号4','客房名称4','2023-03-05','服务项目4','用户账号4','用户姓名4','员工工号4','员工姓名4','联系电话4','是',''),(75,'2023-03-05 03:12:21','客房编号5','客房名称5','2023-03-05','服务项目5','用户账号5','用户姓名5','员工工号5','员工姓名5','联系电话5','是',''),(76,'2023-03-05 03:12:21','客房编号6','客房名称6','2023-03-05','服务项目6','用户账号6','用户姓名6','员工工号6','员工姓名6','联系电话6','是',''),(77,'2023-03-05 03:12:21','客房编号7','客房名称7','2023-03-05','服务项目7','用户账号7','用户姓名7','员工工号7','员工姓名7','联系电话7','是',''),(78,'2023-03-05 03:12:21','客房编号8','客房名称8','2023-03-05','服务项目8','用户账号8','用户姓名8','员工工号8','员工姓名8','联系电话8','是','');
/*!40000 ALTER TABLE `yuyuefuwu` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-03-05 14:00:38
五.关键代码
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{
@Autowired
private UserService userService;
@Autowired
private 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);
UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));
if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
return R.error("用户名已存在。");
}
userService.updateById(user);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
userService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}
六.论文目录参考
七.源码获取
感谢大家的阅读,如有不懂的问题可以评论区交流或私聊!
喜欢文章可以点赞、收藏、关注、评论啦 、👇🏻获取源码+V:jsjbysj88👇🏻