本系统后台基于springboot开发的在线点餐系统,系统以Java作为编程语言,采用Mysql数据库作为后台数据库。
系统分为商家和普通用户两大角色功能
商家后台功能如下:商家后台管理、菜单管理、订单管理、评论管理、商家信息管理
前台用户功能:点餐、菜单管理、订单管理、评论管理、个人中心(个人信息和我的钱包)
详情查看扣:2835777178
# 服务配置信息
server:
port: 8080
addr: http://127.0.0.1:${server.port}
spring:
datasource:
username: root
password: root
url: jdbc:mysql://localhost:3306/orderSystem?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2b8
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
#Spring Boot 默认是不注入这些属性值的,需要自己绑定
#druid 数据源专有配置
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
filters: stat,wall,log4j
maxPoolPreparedStatementPerConnectionSize: 20
useGlobalDataSourceStat: true
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
thymeleaf:
cache: false
mybatis:
mapper-locations: classpath*:com/order/mapper/*.xml
type-aliases-package: com.order.pojo
configuration:
map-underscore-to-camel-case: true
-- ----------------------------
-- Table structure for category_table
-- ----------------------------
DROP TABLE IF EXISTS `category_table`;
CREATE TABLE `category_table` (
`category_num` int(11) DEFAULT NULL,
`category_name` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of category_table
-- ----------------------------
INSERT INTO `category_table` VALUES ('1', '荤菜');
INSERT INTO `category_table` VALUES ('2', '素菜');
INSERT INTO `category_table` VALUES ('3', '盖码饭');
INSERT INTO `category_table` VALUES ('4', '面食');
INSERT INTO `category_table` VALUES ('5', '米粉');
INSERT INTO `category_table` VALUES ('6', '酒水');
INSERT INTO `category_table` VALUES ('7', '夜宵');
INSERT INTO `category_table` VALUES ('8', '其他');
-- ----------------------------
-- Table structure for comment_table
-- ----------------------------
DROP TABLE IF EXISTS `comment_table`;
CREATE TABLE `comment_table` (
`user_id` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`grading` double DEFAULT NULL,
`comment_content` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`order_id` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`creation_time` datetime DEFAULT NULL,
`comment_num` int(11) DEFAULT NULL,
`anonymous` varchar(255) COLLATE utf8_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of comment_table
-- ----------------------------
INSERT INTO `comment_table` VALUES ('10001', '5', '挺好吃的,干净卫生', '9722 5144 2900 7162 8', '2021-03-15 23:07:01', null, '匿名');
-- ----------------------------
-- Table structure for menu_table
-- ----------------------------
DROP TABLE IF EXISTS `menu_table`;
CREATE TABLE `menu_table` (
`dish_name` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`dish_price` double DEFAULT NULL,
`dish_stock` int(11) DEFAULT NULL,
`dish_num` int(11) DEFAULT '0',
`category_num` int(11) DEFAULT NULL,
`dish_describe` varchar(255) COLLATE utf8_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of menu_table
-- ----------------------------
INSERT INTO `menu_table` VALUES ('酸辣土豆丝', '6.5', '10', '0', '2', '被评为人间至味的土豆丝,它有多种配方,却只有酸辣的让我最开胃');
INSERT INTO `menu_table` VALUES ('辣子鸡', '15', '20', '0', '1', '千里之行,始于足下');
INSERT INTO `menu_table` VALUES ('梅菜扣肉', '16', '10', '0', '1', '这道菜的精华主要在梅菜上,吸收了猪肉的香味,让人赞不绝口');
INSERT INTO `menu_table` VALUES ('辣椒炒肉', '15', '10', '0', '1', '不管是城市还是农村,南方还是北方,都会有一道自己的小炒肉');
INSERT INTO `menu_table` VALUES ('西红柿盖饭', '14', '10', '0', '3', '好看的皮囊万里挑房,有趣的灵魂200多斤');
INSERT INTO `menu_table` VALUES ('猪肉面', '10', '10', '0', '4', '好看又好吃');
-- ----------------------------
-- Table structure for moneylog_table
-- ----------------------------
DROP TABLE IF EXISTS `moneylog_table`;
CREATE TABLE `moneylog_table` (
`user_id` varchar(35) COLLATE utf8_bin NOT NULL,
`transaction_num` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`transaction_amount` double DEFAULT NULL,
`transaction_type` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`transaction_time` datetime DEFAULT NULL,
`transaction_remarks` varchar(255) COLLATE utf8_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of moneylog_table
-- ----------------------------
INSERT INTO `moneylog_table` VALUES ('10001', '9722 5144 2900 7162 8', '9.5', '消费', '2021-03-15 23:01:49', null);
INSERT INTO `moneylog_table` VALUES ('10001', '3808 9316 4329 4200 9', '16', '消费', '2021-03-16 09:35:09', null);
INSERT INTO `moneylog_table` VALUES ('10001', '97317510-4690-472d-ad92-15bd7e5b8ee0', '100', '充值', '2021-03-16 09:49:17', null);
INSERT INTO `moneylog_table` VALUES ('10001', 'PMUCEvWiRFQ', '100', '提现', '2021-03-16 09:49:32', '我要提现');
-- ----------------------------
-- Table structure for order_details
-- ----------------------------
DROP TABLE IF EXISTS `order_details`;
CREATE TABLE `order_details` (
`order_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`dish_name` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`total_amount` double DEFAULT NULL,
`dish_num` int(11) DEFAULT NULL,
`dish_amount` int(11) DEFAULT NULL,
`dish_money` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of order_details
-- ----------------------------
INSERT INTO `order_details` VALUES ('9722 5144 2900 7162 8', '酸辣土豆丝', null, '0', '1', '6.5');
INSERT INTO `order_details` VALUES ('3808 9316 4329 4200 9', '酸辣土豆丝', null, '0', '2', '13');
-- ----------------------------
-- Table structure for order_table
-- ----------------------------
DROP TABLE IF EXISTS `order_table`;
CREATE TABLE `order_table` (
`order_id` varchar(255) COLLATE utf8_bin NOT NULL,
`user_id` varchar(20) COLLATE utf8_bin NOT NULL,
`order_type` varchar(255) COLLATE utf8_bin NOT NULL,
`order_state` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`user_telephone` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`user_address` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`total_amount` double DEFAULT NULL,
`meal_code` int(11) DEFAULT NULL,
`creation_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of order_table
-- ----------------------------
INSERT INTO `order_table` VALUES ('9722 5144 2900 7162 8', '10001', '外卖', '订单完成', '18711828322', '湖南长沙', '9.5', '3161', '2021-03-15 23:01:49', '2021-03-15 23:01:49');
INSERT INTO `order_table` VALUES ('3808 9316 4329 4200 9', '10001', '外卖', '等待接单', '18711828322', '湖南长沙', '16', '1896', '2021-03-16 09:35:09', '2021-03-16 09:35:09');
-- ----------------------------
-- Table structure for restaurant_table
-- ----------------------------
DROP TABLE IF EXISTS `restaurant_table`;
CREATE TABLE `restaurant_table` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`store_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`store_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`store_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`store_introduce` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`store_score` double DEFAULT NULL,
`payment_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of restaurant_table
-- ----------------------------
INSERT INTO `restaurant_table` VALUES ('1', 'haoren', 'haoren', 'haoren', '专做酸辣粉,百年老店,吃了再也忘不了。', null, null);
-- ----------------------------
-- Table structure for shopping_cart
-- ----------------------------
DROP TABLE IF EXISTS `shopping_cart`;
CREATE TABLE `shopping_cart` (
`user_id` int(11) NOT NULL,
`dish_num` int(11) NOT NULL,
`dish_name` varchar(255) COLLATE utf8_bin NOT NULL,
`dish_amount` int(11) DEFAULT NULL,
`dish_price` double DEFAULT NULL,
`dish_money` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of shopping_cart
-- ----------------------------
-- ----------------------------
-- Table structure for user_table
-- ----------------------------
DROP TABLE IF EXISTS `user_table`;
CREATE TABLE `user_table` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` varchar(255) COLLATE utf8_bin NOT NULL,
`user_name` varchar(20) COLLATE utf8_bin NOT NULL,
`user_pwd` varchar(255) COLLATE utf8_bin NOT NULL,
`user_email` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`user_telephone` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`user_address` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`user_balance` int(11) DEFAULT NULL,
`user_account` varchar(255) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of user_table
-- ----------------------------
INSERT INTO `user_table` VALUES ('1', '10001', '张三', '123456', '[email protected]', '18711828322', '湖南长沙', '475', 'zhangsan');