1 Star 10 Fork 0

KimmingLau/jiajiang-hotel

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
jiajiang-hotel.sql 32.09 KB
一键复制 编辑 原始数据 按行查看 历史
KimmingLau 提交于 2021-06-27 11:31 . 1. 添加数据库文件
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 80019
Source Host : localhost:3306
Source Database : jiajiang-hotel
Target Server Type : MYSQL
Target Server Version : 80019
File Encoding : 65001
Date: 2021-06-27 11:04:51
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for check_info
-- ----------------------------
DROP TABLE IF EXISTS `check_info`;
CREATE TABLE `check_info` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`id_card` varchar(100) DEFAULT NULL COMMENT '身份证',
`check_in_time` datetime DEFAULT NULL COMMENT '入住时间',
`check_out_time` datetime DEFAULT NULL COMMENT '离店时间',
`flag` smallint DEFAULT NULL COMMENT '入住状态: 0-已离店 1-入住中',
`room_id` bigint DEFAULT NULL COMMENT '入住房间ID',
`orderbill_id` bigint DEFAULT NULL COMMENT '所属订单ID',
PRIMARY KEY (`id`),
KEY `idx_check_info_checkInTime` (`check_in_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of check_info
-- ----------------------------
INSERT INTO `check_info` VALUES ('1', '321321', '2021-06-10 23:13:28', '2021-06-24 17:43:15', '0', '11', '2');
INSERT INTO `check_info` VALUES ('2', '123123', '2021-06-10 23:50:31', '2021-06-24 16:56:57', '0', '12', '3');
INSERT INTO `check_info` VALUES ('3', '4214', '2021-06-10 23:50:31', '2021-06-24 16:56:57', '0', '13', '3');
INSERT INTO `check_info` VALUES ('4', '24214', '2021-06-10 23:50:31', '2021-06-24 16:56:57', '0', '14', '3');
INSERT INTO `check_info` VALUES ('5', '1421412', '2021-06-10 23:50:31', '2021-06-24 16:56:57', '0', '21', '3');
INSERT INTO `check_info` VALUES ('6', '951752184526521', '2021-06-11 22:53:01', '2021-06-24 17:46:48', '0', '22', '5');
INSERT INTO `check_info` VALUES ('7', '123', '2021-06-24 17:02:20', '2021-06-24 17:44:03', '0', '23', '7');
INSERT INTO `check_info` VALUES ('8', '513421', '2021-06-24 17:02:20', '2021-06-24 17:44:03', '0', '24', '7');
INSERT INTO `check_info` VALUES ('9', '4214214', '2021-06-24 17:02:20', '2021-06-24 17:44:03', '0', '1', '7');
INSERT INTO `check_info` VALUES ('10', '1414', '2021-06-24 17:02:20', '2021-06-24 17:44:03', '0', '2', '7');
INSERT INTO `check_info` VALUES ('13', '132', '2021-06-24 17:30:52', '2021-06-24 17:38:22', '0', '21', '8');
INSERT INTO `check_info` VALUES ('14', '13213', '2021-06-24 17:30:52', '2021-06-24 17:38:22', '0', '61', '8');
INSERT INTO `check_info` VALUES ('15', '123456789', '2021-06-24 22:41:40', '2021-06-24 22:42:41', '0', '22', '9');
INSERT INTO `check_info` VALUES ('16', null, '2021-06-24 23:37:44', '2021-06-24 23:57:46', '0', '21', '12');
INSERT INTO `check_info` VALUES ('17', null, '2021-06-25 09:30:50', '2021-06-25 09:31:49', '0', '22', '13');
INSERT INTO `check_info` VALUES ('18', '1234214', '2021-06-25 14:05:27', '2021-06-25 14:05:46', '0', '23', '14');
INSERT INTO `check_info` VALUES ('19', '4215', '2021-06-25 14:05:27', '2021-06-25 14:05:46', '0', '24', '14');
INSERT INTO `check_info` VALUES ('20', '213', '2021-06-25 15:07:51', '2021-06-25 15:10:32', '0', '83', '15');
INSERT INTO `check_info` VALUES ('21', '3213', '2021-06-25 15:07:51', '2021-06-25 15:10:32', '0', '25', '15');
-- ----------------------------
-- Table structure for employee
-- ----------------------------
DROP TABLE IF EXISTS `employee`;
CREATE TABLE `employee` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`emp_number` varchar(200) DEFAULT NULL COMMENT '工号',
`emp_name` varchar(20) DEFAULT NULL COMMENT '员工姓名',
`idcard` varchar(50) DEFAULT NULL COMMENT '身份证号',
`role_id` bigint DEFAULT NULL COMMENT '角色ID',
PRIMARY KEY (`id`),
UNIQUE KEY `uqe_employee_username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of employee
-- ----------------------------
INSERT INTO `employee` VALUES ('3', 'lisi', '123456', '2021052320282210', '李四', '12412421321', '3');
INSERT INTO `employee` VALUES ('4', '霍某', '123456', '2021062510183644', '霍某', '1324657895125', '3');
-- ----------------------------
-- Table structure for orderbill
-- ----------------------------
DROP TABLE IF EXISTS `orderbill`;
CREATE TABLE `orderbill` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`order_id` varchar(200) DEFAULT NULL COMMENT '订单号',
`phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '预定人号码',
`order_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '预定人姓名/称呼',
`order_type` tinyint DEFAULT NULL COMMENT '订单类型: 1- 前台办理 2-电话预约 3-网上预约',
`order_status` smallint DEFAULT NULL COMMENT '订单状态: 1-预定 2-入住 3-完成 4:逾期 5:取消',
`deposit_price` decimal(10,2) DEFAULT NULL COMMENT '押金',
`add_price` decimal(10,2) DEFAULT NULL COMMENT '附加费用(损坏物品等)',
`total_price` decimal(10,2) DEFAULT NULL COMMENT '订单总金额',
`check_in_time` date DEFAULT NULL COMMENT '入住时间',
`check_out_time` date DEFAULT NULL COMMENT '离店时间',
`update_time` datetime DEFAULT NULL COMMENT '订单修改时间',
`insert_time` datetime DEFAULT NULL COMMENT '订单新增时间',
PRIMARY KEY (`id`),
KEY `idx_orderbill_order_id` (`order_id`) USING BTREE,
KEY `idx_orderbill_phone` (`phone`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of orderbill
-- ----------------------------
INSERT INTO `orderbill` VALUES ('1', '202106092134236190', '10087', '刘先生', '1', '1', null, null, null, '2021-06-09', '2021-06-12', '2021-06-09 21:34:23', '2021-06-09 21:34:23');
INSERT INTO `orderbill` VALUES ('2', '202106102313103206', '10010', '刘先生', '1', '4', '100.00', '30.00', '252.00', '2021-06-10', '2021-06-12', '2021-06-24 17:43:15', '2021-06-10 23:13:11');
INSERT INTO `orderbill` VALUES ('3', '202106102349371138', '10083', '刘某', '2', '4', '100.00', '100.00', '1066.00', '2021-06-10', '2021-06-12', '2021-06-24 16:56:57', '2021-06-10 23:49:37');
INSERT INTO `orderbill` VALUES ('4', '202106112246140030', '3001', '张三', '1', '1', null, null, null, '2021-06-12', '2021-06-13', '2021-06-11 22:46:14', '2021-06-11 22:46:14');
INSERT INTO `orderbill` VALUES ('5', '202106112252129312', '1008', '李四', '1', '4', '100.00', '0.00', '250.00', '2021-06-12', '2021-06-13', '2021-06-24 17:46:48', '2021-06-11 22:52:12');
INSERT INTO `orderbill` VALUES ('6', '202106232228193888', '123456', '刘先生', '1', '1', null, null, null, '2021-06-23', '2021-06-24', '2021-06-23 22:28:19', '2021-06-23 22:28:19');
INSERT INTO `orderbill` VALUES ('7', '202106241658453784', '10083', '刘先生', '1', '3', '100.00', '0.00', '700.00', '2021-06-24', '2021-06-25', '2021-06-24 17:44:03', '2021-06-24 16:58:46');
INSERT INTO `orderbill` VALUES ('8', '202106241724065260', '10084', '刘铭轩', '1', '3', '100.00', '50.00', '550.00', '2021-06-24', '2021-06-25', '2021-06-24 17:38:22', '2021-06-24 17:24:06');
INSERT INTO `orderbill` VALUES ('9', '202106242241226560', '10089', '霍先生', '1', '3', '100.00', '0.00', '200.00', '2021-06-24', '2021-06-25', '2021-06-24 22:42:41', '2021-06-24 22:41:22');
INSERT INTO `orderbill` VALUES ('10', '202106242301546474', '1234567', '霍先生', '1', '1', null, null, null, '2021-06-24', '2021-06-25', '2021-06-24 23:01:55', '2021-06-24 23:01:55');
INSERT INTO `orderbill` VALUES ('11', '202106242308501187', '10089', '123', '1', '1', null, null, null, '2021-06-25', '2021-06-26', '2021-06-24 23:08:50', '2021-06-24 23:08:50');
INSERT INTO `orderbill` VALUES ('12', '202106242334114684', '159753', '159753', '1', '3', '100.00', '500.00', '700.00', '2021-06-25', '2021-06-26', '2021-06-24 23:57:46', '2021-06-24 23:34:12');
INSERT INTO `orderbill` VALUES ('13', '202106250929246232', '10086', '霍先生', '1', '3', '100.00', '1000.00', '1200.00', '2021-06-25', '2021-06-26', '2021-06-25 09:31:49', '2021-06-25 09:29:25');
INSERT INTO `orderbill` VALUES ('14', '202106251405116932', '123456789', '刘先生', '1', '3', '100.00', '0.00', '400.00', '2021-06-25', '2021-06-26', '2021-06-25 14:05:46', '2021-06-25 14:05:11');
INSERT INTO `orderbill` VALUES ('15', '202106251506568732', '10010', 'dwq', '1', '3', '100.00', '0.00', '400.00', '2021-06-25', '2021-06-26', '2021-06-25 15:10:32', '2021-06-25 15:06:57');
-- ----------------------------
-- Table structure for orderbill_item
-- ----------------------------
DROP TABLE IF EXISTS `orderbill_item`;
CREATE TABLE `orderbill_item` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`room_type_id` bigint DEFAULT NULL COMMENT '预定房型ID',
`quantity` int DEFAULT NULL COMMENT '预定数量',
`price` decimal(10,2) DEFAULT NULL COMMENT '预定时房型实际价格',
`orderbill_id` bigint DEFAULT NULL COMMENT '所属订单id',
PRIMARY KEY (`id`),
KEY `idx_orderbill_item_billId` (`orderbill_id`) USING BTREE,
KEY `idx_orderbill_item_typeId` (`room_type_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of orderbill_item
-- ----------------------------
INSERT INTO `orderbill_item` VALUES ('1', '1', '2', '200.00', '1');
INSERT INTO `orderbill_item` VALUES ('2', '2', '2', '150.00', '1');
INSERT INTO `orderbill_item` VALUES ('3', '1', '1', '222.00', '2');
INSERT INTO `orderbill_item` VALUES ('4', '1', '3', '222.00', '3');
INSERT INTO `orderbill_item` VALUES ('5', '3', '1', '300.00', '3');
INSERT INTO `orderbill_item` VALUES ('6', '2', '1', '180.00', '4');
INSERT INTO `orderbill_item` VALUES ('7', '1', '1', '250.00', '5');
INSERT INTO `orderbill_item` VALUES ('8', '1', '2', '200.00', '6');
INSERT INTO `orderbill_item` VALUES ('9', '1', '2', '200.00', '7');
INSERT INTO `orderbill_item` VALUES ('10', '2', '2', '150.00', '7');
INSERT INTO `orderbill_item` VALUES ('11', '1', '1', '200.00', '8');
INSERT INTO `orderbill_item` VALUES ('12', '3', '1', '300.00', '8');
INSERT INTO `orderbill_item` VALUES ('13', '1', '1', '200.00', '9');
INSERT INTO `orderbill_item` VALUES ('14', '1', '1', '200.00', '10');
INSERT INTO `orderbill_item` VALUES ('15', '1', '1', '200.00', '11');
INSERT INTO `orderbill_item` VALUES ('16', '1', '1', '200.00', '12');
INSERT INTO `orderbill_item` VALUES ('17', '1', '1', '200.00', '13');
INSERT INTO `orderbill_item` VALUES ('18', '1', '2', '200.00', '14');
INSERT INTO `orderbill_item` VALUES ('19', '8', '1', '200.00', '15');
INSERT INTO `orderbill_item` VALUES ('20', '1', '1', '200.00', '15');
-- ----------------------------
-- Table structure for pay
-- ----------------------------
DROP TABLE IF EXISTS `pay`;
CREATE TABLE `pay` (
`id` bigint NOT NULL AUTO_INCREMENT,
`amount` decimal(10,2) DEFAULT NULL COMMENT '支付金额',
`pay_type` tinyint DEFAULT NULL COMMENT '支付方式 1-现金支付 2-微信支付 3-支付宝支付 4-刷卡支付',
`pay_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '支付时间',
`orderbill_id` bigint DEFAULT NULL COMMENT '关联订单ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of pay
-- ----------------------------
-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`role_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '角色代码',
`role_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '角色描述',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of role
-- ----------------------------
INSERT INTO `role` VALUES ('1', 'root', '超级管理员');
INSERT INTO `role` VALUES ('2', 'clerk', '前台柜员');
INSERT INTO `role` VALUES ('3', 'manager', '总经理');
INSERT INTO `role` VALUES ('4', 'system', '系统管理员');
INSERT INTO `role` VALUES ('5', 'cleaner', '清洁工');
-- ----------------------------
-- Table structure for room
-- ----------------------------
DROP TABLE IF EXISTS `room`;
CREATE TABLE `room` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
`room_num` int DEFAULT NULL COMMENT '房间编号',
`floor` int DEFAULT NULL COMMENT '楼层',
`building_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '楼栋代码',
`live_status` smallint DEFAULT NULL COMMENT '入住状态: 0-未入住;1-入住中',
`clean_status` smallint DEFAULT NULL COMMENT '打扫状态: 0-未打扫; 1-已打扫',
`flag` smallint DEFAULT NULL COMMENT '启用状态: 0-禁用; 1-启用',
`room_type_id` bigint DEFAULT NULL COMMENT '房型IDs',
PRIMARY KEY (`id`),
UNIQUE KEY `unq_room_roomNum` (`room_num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of room
-- ----------------------------
INSERT INTO `room` VALUES ('1', '1001', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('2', '1002', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('3', '1003', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('4', '1004', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('5', '1005', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('6', '1006', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('7', '1007', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('8', '1008', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('9', '1009', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('10', '1010', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('11', '1011', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('12', '1012', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('13', '1013', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('14', '1014', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('15', '1015', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('16', '1016', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('17', '1017', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('18', '1018', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('19', '1019', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('20', '1020', '1', 'A', '0', '1', '1', '2');
INSERT INTO `room` VALUES ('21', '2001', '2', 'A', '0', '0', '1', '1');
INSERT INTO `room` VALUES ('22', '2002', '2', 'A', '0', '0', '1', '1');
INSERT INTO `room` VALUES ('23', '2003', '2', 'A', '0', '0', '1', '1');
INSERT INTO `room` VALUES ('24', '2004', '2', 'A', '0', '0', '1', '1');
INSERT INTO `room` VALUES ('25', '2005', '2', 'A', '0', '0', '1', '1');
INSERT INTO `room` VALUES ('26', '3001', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('27', '3002', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('28', '3003', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('29', '3004', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('30', '3005', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('31', '3006', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('32', '3007', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('33', '3008', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('34', '3009', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('35', '3010', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('36', '3011', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('37', '3012', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('38', '3013', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('39', '3014', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('40', '3015', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('41', '3016', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('42', '3017', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('43', '3018', '1', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('44', '3019', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('45', '3020', '3', 'A', '0', '1', '1', '4');
INSERT INTO `room` VALUES ('46', '2006', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('47', '2007', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('48', '2008', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('49', '2009', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('50', '2010', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('51', '2011', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('52', '2012', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('53', '2013', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('54', '2014', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('55', '2015', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('56', '2016', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('57', '2017', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('58', '2018', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('59', '2019', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('60', '2020', '2', 'A', '0', '1', '1', '1');
INSERT INTO `room` VALUES ('61', '4001', '4', 'A', '0', '0', '1', '3');
INSERT INTO `room` VALUES ('62', '4002', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('63', '4003', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('64', '4005', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('65', '4006', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('66', '4007', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('67', '4008', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('68', '4009', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('69', '4010', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('70', '4011', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('71', '4012', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('72', '4013', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('73', '4014', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('74', '4015', '4', 'A', '0', '1', '1', '3');
INSERT INTO `room` VALUES ('83', '10023', '1', 'A', '0', '0', '1', '8');
-- ----------------------------
-- Table structure for room_plan
-- ----------------------------
DROP TABLE IF EXISTS `room_plan`;
CREATE TABLE `room_plan` (
`future_date` date DEFAULT NULL COMMENT '价格对应日期',
`room_type_id` bigint DEFAULT NULL COMMENT '价格对应房型',
`price` decimal(10,2) DEFAULT NULL COMMENT '当天价格',
`discount` double(4,2) DEFAULT NULL COMMENT '当前折扣',
`repertory` int DEFAULT NULL COMMENT '当前剩余房型储备',
KEY `idx_room_type_futureDateAndRoomTypeId` (`future_date`,`room_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of room_plan
-- ----------------------------
INSERT INTO `room_plan` VALUES ('2021-06-09', '1', '200.00', '1.00', '6');
INSERT INTO `room_plan` VALUES ('2021-06-10', '1', '222.00', '1.00', '2');
INSERT INTO `room_plan` VALUES ('2021-06-11', '1', '235.00', '1.00', '2');
INSERT INTO `room_plan` VALUES ('2021-06-12', '1', '250.00', '1.00', '7');
INSERT INTO `room_plan` VALUES ('2021-06-13', '1', '250.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-14', '1', '200.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-15', '1', '200.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-16', '1', '200.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-17', '1', '200.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-18', '1', '200.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-19', '1', '250.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-20', '1', '250.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-21', '1', '200.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-22', '1', '200.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-23', '1', '200.00', '1.00', '8');
INSERT INTO `room_plan` VALUES ('2021-06-24', '1', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-06-25', '1', '200.00', '1.00', '16');
INSERT INTO `room_plan` VALUES ('2021-06-26', '1', '250.00', '0.90', '20');
INSERT INTO `room_plan` VALUES ('2021-06-27', '1', '250.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-28', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-09', '2', '150.00', '1.00', '7');
INSERT INTO `room_plan` VALUES ('2021-06-10', '2', '150.00', '1.00', '8');
INSERT INTO `room_plan` VALUES ('2021-06-11', '2', '150.00', '1.00', '8');
INSERT INTO `room_plan` VALUES ('2021-06-12', '2', '180.00', '1.00', '9');
INSERT INTO `room_plan` VALUES ('2021-06-13', '2', '180.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-14', '2', '150.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-15', '2', '150.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-16', '2', '150.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-17', '2', '150.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-18', '2', '150.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-19', '2', '180.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-20', '2', '180.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-21', '2', '150.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-22', '2', '150.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-23', '2', '150.00', '1.00', '10');
INSERT INTO `room_plan` VALUES ('2021-06-24', '2', '150.00', '1.00', '8');
INSERT INTO `room_plan` VALUES ('2021-06-25', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-26', '2', '180.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-27', '2', '180.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-28', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-09', '3', '300.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-10', '3', '300.00', '1.00', '4');
INSERT INTO `room_plan` VALUES ('2021-06-11', '3', '300.00', '1.00', '4');
INSERT INTO `room_plan` VALUES ('2021-06-12', '3', '320.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-13', '3', '320.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-14', '3', '300.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-15', '3', '300.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-16', '3', '300.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-17', '3', '300.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-18', '3', '300.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-19', '3', '320.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-20', '3', '320.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-21', '3', '300.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-22', '3', '300.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-23', '3', '300.00', '1.00', '5');
INSERT INTO `room_plan` VALUES ('2021-06-24', '3', '300.00', '1.00', '4');
INSERT INTO `room_plan` VALUES ('2021-06-25', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-26', '3', '320.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-27', '3', '320.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-28', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-29', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-29', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-29', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-30', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-30', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-30', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-11', '4', '300.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-12', '4', '350.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-13', '4', '350.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-14', '4', '300.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-15', '4', '300.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-16', '4', '300.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-17', '4', '300.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-18', '4', '300.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-19', '4', '350.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-20', '4', '350.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-21', '4', '300.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-22', '4', '300.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-23', '4', '300.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-24', '4', '300.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-25', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-26', '4', '350.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-27', '4', '350.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-28', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-29', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-30', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-01', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-01', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-01', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-01', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-02', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-02', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-02', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-02', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-03', '1', '250.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-03', '2', '180.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-03', '3', '320.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-03', '4', '350.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-04', '1', '250.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-05', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-06', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-07', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-08', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-09', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-10', '1', '250.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-11', '1', '250.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-12', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-04', '2', '180.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-05', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-06', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-07', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-08', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-09', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-10', '2', '180.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-11', '2', '180.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-12', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-04', '3', '320.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-05', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-06', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-07', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-08', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-09', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-10', '3', '320.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-11', '3', '320.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-12', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-04', '4', '350.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-05', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-06', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-07', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-08', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-09', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-10', '4', '350.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-11', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-12', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-13', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-13', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-13', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-13', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-14', '1', '200.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-14', '2', '150.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-14', '3', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-07-14', '4', '300.00', '1.00', '20');
INSERT INTO `room_plan` VALUES ('2021-06-25', '8', '200.00', '1.00', '0');
INSERT INTO `room_plan` VALUES ('2021-06-26', '8', '250.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-06-27', '8', '250.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-06-28', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-06-29', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-06-30', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-01', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-02', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-03', '8', '250.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-04', '8', '250.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-05', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-06', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-07', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-08', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-09', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-10', '8', '250.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-11', '8', '250.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-12', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-13', '8', '200.00', '1.00', '1');
INSERT INTO `room_plan` VALUES ('2021-07-14', '8', '200.00', '1.00', '1');
-- ----------------------------
-- Table structure for room_type
-- ----------------------------
DROP TABLE IF EXISTS `room_type`;
CREATE TABLE `room_type` (
`id` bigint NOT NULL AUTO_INCREMENT,
`type_name` varchar(20) DEFAULT NULL COMMENT '类型名称',
`bed_count` smallint DEFAULT NULL COMMENT '床位数',
`room_size` double DEFAULT NULL COMMENT '房型总面积',
`type_desc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '类型详细描述',
`workday_price` decimal(10,2) DEFAULT NULL COMMENT '默认工作日价格',
`weekend_price` decimal(10,2) DEFAULT NULL COMMENT '默认周末价格',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of room_type
-- ----------------------------
INSERT INTO `room_type` VALUES ('1', '标准双人间', '2', '40', '', '200.00', '250.00');
INSERT INTO `room_type` VALUES ('2', '单人大床房', '1', '20', '', '150.00', '180.00');
INSERT INTO `room_type` VALUES ('3', '标准三人间', '3', '60', '', '300.00', '320.00');
INSERT INTO `room_type` VALUES ('4', '商务大床房', '1', '30', '', '300.00', '350.00');
INSERT INTO `room_type` VALUES ('8', 'dwqdwq', '1', '20', 'dwq', '200.00', '250.00');
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/KimmingLau/jiajiang-hotel.git
git@gitee.com:KimmingLau/jiajiang-hotel.git
KimmingLau
jiajiang-hotel
jiajiang-hotel
master

搜索帮助