docs(database.sql): SQL脚本优化,补充数据库创建脚本database.sql,添加MySQL5.x的适配脚本

1. 添加database.sql数据库创建脚本
2. 添加MySQL5.x的适配脚本
3. 系统表结构数据整理
4.
订单表结构字段和数据不一致修复
This commit is contained in:
有来技术 2021-08-29 00:54:18 +08:00
parent 1ed793f483
commit eef3ce460b
14 changed files with 1798 additions and 653 deletions

View File

@ -1,248 +0,0 @@
/*
Navicat Premium Data Transfer
Source Server : www.youlai.tech
Source Server Type : MySQL
Source Server Version : 80023
Source Host : www.youlai.tech:3306
Source Schema : mall_oms
Target Server Type : MySQL
Target Server Version : 80023
File Encoding : 65001
Date: 20/06/2021 13:15:25
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for oms_order
-- ----------------------------
DROP TABLE IF EXISTS `oms_order`;
CREATE TABLE `oms_order` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_sn` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '订单号',
`total_amount` bigint(0) NOT NULL DEFAULT 0 COMMENT '订单总额(分)',
`total_quantity` int(0) NOT NULL DEFAULT 0 COMMENT '商品总数',
`source_type` tinyint(0) NOT NULL DEFAULT 1 COMMENT '订单来源[0->PC订单1->APP订单]',
`status` int(0) NOT NULL DEFAULT 101 COMMENT '订单状态:\r\n101->待付款;\r\n102->用户取消;\r\n103->系统取消;\r\n201->已付款;\r\n202->申请退款;\r\n203->已退款;\r\n301->待发货;\r\n401->已发货;\r\n501->用户收货;\r\n502->系统收货;\r\n901->已完成;',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '订单备注',
`member_id` bigint(0) NOT NULL DEFAULT 0 COMMENT '会员id',
`coupon_id` bigint(0) NOT NULL DEFAULT 0 COMMENT '使用的优惠券',
`coupon_amount` bigint(0) NOT NULL DEFAULT 0 COMMENT '优惠券抵扣金额(分)',
`freight_amount` bigint(0) NOT NULL DEFAULT 0 COMMENT '运费金额(分)',
`pay_amount` bigint(0) NOT NULL DEFAULT 0 COMMENT '应付总额(分)',
`pay_time` datetime(0) NULL DEFAULT NULL COMMENT '支付时间',
`pay_type` tinyint(4) NULL DEFAULT NULL COMMENT '支付方式【1->微信jsapi2->支付宝3->余额; 4->微信app',
`out_trade_no` varchar(32) NULL DEFAULT NULL COMMENT '微信支付等第三方支付平台的商户订单号',
`transaction_id` varchar(32) NULL DEFAULT NULL COMMENT '微信支付订单号',
`out_refund_no` varchar(32) NULL DEFAULT NULL COMMENT '商户退款单号',
`refund_id` varchar(32) NULL DEFAULT NULL COMMENT '微信退款单号',
`delivery_time` datetime(0) NULL DEFAULT NULL COMMENT '发货时间',
`receive_time` datetime(0) NULL DEFAULT NULL COMMENT '确认收货时间',
`comment_time` datetime(0) NULL DEFAULT NULL COMMENT '评价时间',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`gmt_create` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `index_order_sn`(`order_sn`) USING BTREE COMMENT '订单号唯一索引',
UNIQUE INDEX `index_otn`(`out_trade_no`) USING BTREE COMMENT '商户订单号唯一索引',
UNIQUE INDEX `index_ti`(`transaction_id`) USING BTREE COMMENT '商户支付单号唯一索引',
UNIQUE INDEX `index_orn`(`out_refund_no`) USING BTREE COMMENT '商户退款单号唯一索引',
UNIQUE INDEX `index_ri`(`refund_id`) USING BTREE COMMENT '退款单号唯一索引'
) ENGINE = InnoDB AUTO_INCREMENT = 1351548262424821912 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单详情表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of oms_order
-- ----------------------------
INSERT INTO `oms_order` VALUES (1351548262424821882, '20210322300000028', 159900, 1, 1, 201, '', 21, 0, 0, 0, 159900, '2021-03-22 23:34:49', 3, NULL, NULL, NULL, 0, '2021-03-22 23:34:43', '2021-03-22 23:34:50');
INSERT INTO `oms_order` VALUES (1351548262424821883, '20210323300000001', 159900, 1, 1, 201, '', 21, 0, 0, 0, 159900, '2021-03-23 01:03:55', 3, NULL, NULL, NULL, 0, '2021-03-23 01:03:43', '2021-03-23 01:03:55');
INSERT INTO `oms_order` VALUES (1351548262424821884, '20210323300000002', 319800, 2, 1, 201, '', 21, 0, 0, 0, 319800, '2021-03-23 01:10:24', 3, NULL, NULL, NULL, 0, '2021-03-23 01:10:15', '2021-03-23 01:10:24');
INSERT INTO `oms_order` VALUES (1351548262424821885, '20210323300000003', 159900, 1, 1, 103, '', 21, 0, 0, 0, 159900, NULL, NULL, NULL, NULL, NULL, 0, '2021-03-23 02:21:24', '2021-03-23 02:22:32');
INSERT INTO `oms_order` VALUES (1351548262424821886, '20210323300000004', 319800, 2, 1, 201, '', 21, 0, 0, 0, 319800, '2021-03-23 06:37:29', 3, NULL, NULL, NULL, 0, '2021-03-23 06:37:26', '2021-03-23 06:37:29');
INSERT INTO `oms_order` VALUES (1351548262424821887, '20210323300000005', 159900, 1, 1, 201, '', 21, 0, 0, 0, 159900, '2021-03-23 07:02:30', 3, NULL, NULL, NULL, 0, '2021-03-23 07:02:27', '2021-03-23 07:02:30');
INSERT INTO `oms_order` VALUES (1351548262424821888, '20210323300000006', 319800, 2, 1, 201, '', 21, 0, 0, 0, 319800, '2021-03-23 07:31:46', 3, NULL, NULL, NULL, 0, '2021-03-23 07:31:42', '2021-03-23 07:31:46');
INSERT INTO `oms_order` VALUES (1351548262424821889, '20210323300000009', 159900, 1, 1, 201, '', 22, 0, 0, 0, 159900, '2021-03-23 18:55:46', 3, NULL, NULL, NULL, 0, '2021-03-23 18:55:41', '2021-03-23 18:55:46');
INSERT INTO `oms_order` VALUES (1351548262424821890, '20210325300000001', 319800, 2, 1, 201, '', 21, 0, 0, 0, 319800, '2021-03-25 19:03:03', 3, NULL, NULL, NULL, 0, '2021-03-25 19:02:51', '2021-03-25 19:03:03');
INSERT INTO `oms_order` VALUES (1351548262424821891, '20210329300000001', 159900, 1, 1, 201, '', 25, 0, 0, 0, 159900, '2021-03-29 15:57:48', 3, NULL, NULL, NULL, 0, '2021-03-29 15:57:45', '2021-03-29 15:57:48');
INSERT INTO `oms_order` VALUES (1351548262424821892, '20210329300000002', 299900, 1, 1, 201, '', 25, 0, 0, 0, 299900, '2021-03-29 16:02:48', 3, NULL, NULL, NULL, 0, '2021-03-29 16:02:45', '2021-03-29 16:02:48');
INSERT INTO `oms_order` VALUES (1351548262424821893, '20210331300000001', 159900, 1, 1, 201, '', 25, 0, 0, 0, 159900, '2021-03-31 14:22:38', 3, NULL, NULL, NULL, 0, '2021-03-31 14:22:32', '2021-03-31 14:22:38');
INSERT INTO `oms_order` VALUES (1351548262424821894, '20210414300000001', 159900, 1, 1, 201, '', 27, 0, 0, 0, 159900, '2021-04-14 22:59:48', 3, NULL, NULL, NULL, 0, '2021-04-14 22:59:42', '2021-04-14 22:59:48');
INSERT INTO `oms_order` VALUES (1351548262424821895, '20210414300000003', 199900, 1, 1, 201, '', 27, 0, 0, 0, 199900, '2021-04-14 23:03:24', 3, NULL, NULL, NULL, 0, '2021-04-14 23:03:20', '2021-04-14 23:03:24');
INSERT INTO `oms_order` VALUES (1351548262424821896, '20210414300000005', 159900, 1, 1, 103, '', 31, 0, 0, 0, 159900, NULL, NULL, NULL, NULL, NULL, 0, '2021-04-14 23:33:47', '2021-04-14 23:34:48');
INSERT INTO `oms_order` VALUES (1351548262424821897, '20210414300000007', 319800, 2, 1, 103, '', 31, 0, 0, 0, 319800, NULL, NULL, NULL, NULL, NULL, 0, '2021-04-14 23:38:15', '2021-04-14 23:39:16');
INSERT INTO `oms_order` VALUES (1351548262424821898, '20210414300000008', 319800, 2, 1, 103, '', 31, 0, 0, 0, 319800, NULL, NULL, NULL, NULL, NULL, 0, '2021-04-14 23:38:31', '2021-04-14 23:39:31');
INSERT INTO `oms_order` VALUES (1351548262424821899, '20210414300000010', 319800, 2, 1, 103, '', 31, 0, 0, 0, 319800, NULL, NULL, NULL, NULL, NULL, 0, '2021-04-14 23:42:46', '2021-04-14 23:43:47');
INSERT INTO `oms_order` VALUES (1351548262424821900, '20210414300000012', 479700, 3, 1, 201, '', 31, 0, 0, 0, 479700, '2021-04-14 23:48:07', 3, NULL, NULL, NULL, 0, '2021-04-14 23:48:04', '2021-04-14 23:48:07');
INSERT INTO `oms_order` VALUES (1351548262424821901, '20210416300000001', 159900, 1, 1, 201, '', 31, 0, 0, 0, 159900, '2021-04-16 16:18:30', 3, NULL, NULL, NULL, 0, '2021-04-16 16:18:25', '2021-04-16 16:18:30');
INSERT INTO `oms_order` VALUES (1351548262424821904, '20210611300000001', 200, 1, 1, 103, '', 39, 0, 0, 0, 200, NULL, NULL, NULL, NULL, NULL, 0, '2021-06-11 00:20:24', '2021-06-11 00:21:35');
INSERT INTO `oms_order` VALUES (1351548262424821905, '20210611300000002', 200, 1, 1, 103, '', 39, 0, 0, 0, 200, NULL, NULL, NULL, NULL, NULL, 0, '2021-06-11 00:24:06', '2021-06-11 00:25:51');
INSERT INTO `oms_order` VALUES (1351548262424821906, '20210611300000003', 200, 1, 1, 201, '', 39, 0, 0, 0, 200, '2021-06-11 00:26:19', 3, NULL, NULL, NULL, 0, '2021-06-11 00:26:15', '2021-06-11 00:26:19');
INSERT INTO `oms_order` VALUES (1351548262424821907, '20210611300000004', 200, 1, 1, 201, '', 39, 0, 0, 0, 200, '2021-06-11 00:42:46', 3, NULL, NULL, NULL, 0, '2021-06-11 00:42:40', '2021-06-11 00:42:46');
INSERT INTO `oms_order` VALUES (1351548262424821908, '20210611300000005', 999900, 1, 1, 201, '', 39, 0, 0, 0, 999900, '2021-06-11 07:58:10', 3, NULL, NULL, NULL, 0, '2021-06-11 07:58:01', '2021-06-11 07:58:10');
INSERT INTO `oms_order` VALUES (1351548262424821909, '20210611300000007', 1999800, 2, 1, 201, '', 39, 0, 0, 0, 1999800, '2021-06-11 08:35:15', 3, NULL, NULL, NULL, 0, '2021-06-11 08:35:10', '2021-06-11 08:35:15');
INSERT INTO `oms_order` VALUES (1351548262424821910, '20210612300000001', 999900, 1, 1, 103, '', 39, 0, 0, 0, 999900, NULL, NULL, NULL, NULL, NULL, 0, '2021-06-12 14:16:12', '2021-06-12 14:17:13');
INSERT INTO `oms_order` VALUES (1351548262424821911, '20210617300000002', 1999800, 2, 1, 201, '', 39, 0, 0, 0, 1999800, '2021-06-17 08:48:52', 3, NULL, NULL, NULL, 0, '2021-06-17 08:48:43', '2021-06-17 08:48:52');
-- ----------------------------
-- Table structure for oms_order_delivery
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_delivery`;
CREATE TABLE `oms_order_delivery` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint(0) NOT NULL COMMENT '订单id',
`delivery_company` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '物流公司(配送方式)',
`delivery_sn` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '物流单号',
`receiver_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '收货人姓名',
`receiver_phone` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '收货人电话',
`receiver_post_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '收货人邮编',
`receiver_province` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '省份/直辖市',
`receiver_city` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '城市',
`receiver_region` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '',
`receiver_detail_address` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '详细地址',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '备注',
`delivery_status` tinyint(0) NULL DEFAULT 0 COMMENT '物流状态【0->运输中1->已收货】',
`delivery_time` datetime(0) NULL DEFAULT NULL COMMENT '发货时间',
`receive_time` datetime(0) NULL DEFAULT NULL COMMENT '确认收货时间',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 42 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单物流记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for oms_order_item
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_item`;
CREATE TABLE `oms_order_item` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint(0) NOT NULL COMMENT 'order_id',
`sku_id` bigint(0) NOT NULL DEFAULT 0 COMMENT '商品sku id',
`sku_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品sku编号',
`sku_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品sku名字',
`sku_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品sku图片',
`sku_price` bigint(0) NOT NULL DEFAULT 0 COMMENT '商品sku价格(分)',
`sku_quantity` int(0) NOT NULL DEFAULT 0 COMMENT '商品购买的数量',
`sku_total_price` bigint(0) NOT NULL DEFAULT 0 COMMENT '商品sku总价格(分)',
`spu_id` bigint(0) NOT NULL DEFAULT 0 COMMENT 'spu_id',
`spu_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'spu_name',
`spu_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'spu_pic',
`brand_id` bigint(0) NOT NULL DEFAULT 0 COMMENT '品牌id',
`brand_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '品牌名称',
`category_id` bigint(0) NOT NULL DEFAULT 0 COMMENT '商品分类id',
`category_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品分类名称',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`gmt_create` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_order_id`(`order_id`) USING BTREE COMMENT '订单id索引'
) ENGINE = InnoDB AUTO_INCREMENT = 159 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单商品信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of oms_order_item
-- ----------------------------
INSERT INTO `oms_order_item` VALUES (128, 1351548262424821882, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-22 23:34:46', '2021-03-22 23:34:46');
INSERT INTO `oms_order_item` VALUES (129, 1351548262424821883, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 01:03:47', '2021-03-23 01:03:47');
INSERT INTO `oms_order_item` VALUES (130, 1351548262424821884, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-23 01:10:17', '2021-03-23 01:10:17');
INSERT INTO `oms_order_item` VALUES (131, 1351548262424821885, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 02:21:27', '2021-03-23 02:21:27');
INSERT INTO `oms_order_item` VALUES (132, 1351548262424821886, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-23 06:37:27', '2021-03-23 06:37:27');
INSERT INTO `oms_order_item` VALUES (133, 1351548262424821887, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 07:02:27', '2021-03-23 07:02:27');
INSERT INTO `oms_order_item` VALUES (134, 1351548262424821888, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-23 07:31:43', '2021-03-23 07:31:43');
INSERT INTO `oms_order_item` VALUES (135, 1351548262424821889, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 18:55:41', '2021-03-23 18:55:41');
INSERT INTO `oms_order_item` VALUES (136, 1351548262424821890, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-25 19:02:51', '2021-03-25 19:02:51');
INSERT INTO `oms_order_item` VALUES (137, 1351548262424821891, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-29 15:57:45', '2021-03-29 15:57:45');
INSERT INTO `oms_order_item` VALUES (138, 1351548262424821892, 186, '1614505517559', '测试手机1 黑 6+128 ', 'http://a.youlai.store:9000/default/9715dde8c35c429b8c56cbe800ebd205.jpg', 299900, 1, 299900, 0, '', '', 0, '', 0, '', 0, '2021-03-29 16:02:46', '2021-03-29 16:02:46');
INSERT INTO `oms_order_item` VALUES (139, 1351548262424821893, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-31 14:22:33', '2021-03-31 14:22:33');
INSERT INTO `oms_order_item` VALUES (140, 1351548262424821894, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-04-14 22:59:43', '2021-04-14 22:59:43');
INSERT INTO `oms_order_item` VALUES (141, 1351548262424821895, 192, '1614505936511', '测试手机2 黑 8+256 ', 'http://a.youlai.tech:9000/default/3e369c91377a4c9f9eb33f66a6dd6906.jpg', 199900, 1, 199900, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:03:21', '2021-04-14 23:03:21');
INSERT INTO `oms_order_item` VALUES (142, 1351548262424821896, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:33:48', '2021-04-14 23:33:48');
INSERT INTO `oms_order_item` VALUES (143, 1351548262424821897, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:38:15', '2021-04-14 23:38:15');
INSERT INTO `oms_order_item` VALUES (144, 1351548262424821898, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:38:31', '2021-04-14 23:38:31');
INSERT INTO `oms_order_item` VALUES (145, 1351548262424821899, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:42:47', '2021-04-14 23:42:47');
INSERT INTO `oms_order_item` VALUES (146, 1351548262424821900, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 3, 479700, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:48:04', '2021-04-14 23:48:04');
INSERT INTO `oms_order_item` VALUES (147, 1351548262424821901, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-04-16 16:18:27', '2021-04-16 16:18:27');
INSERT INTO `oms_order_item` VALUES (150, 1351548262424821904, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:20:33', '2021-06-11 00:20:33');
INSERT INTO `oms_order_item` VALUES (151, 1351548262424821905, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:24:07', '2021-06-11 00:24:07');
INSERT INTO `oms_order_item` VALUES (152, 1351548262424821906, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:26:16', '2021-06-11 00:26:16');
INSERT INTO `oms_order_item` VALUES (153, 1351548262424821907, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:42:43', '2021-06-11 00:42:43');
INSERT INTO `oms_order_item` VALUES (154, 1351548262424821908, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-11 07:58:04', '2021-06-11 07:58:04');
INSERT INTO `oms_order_item` VALUES (155, 1351548262424821909, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-11 08:35:11', '2021-06-11 08:35:11');
INSERT INTO `oms_order_item` VALUES (156, 1351548262424821909, 244, '1623369301480', '测试合约机 蓝 12+256g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-11 08:35:11', '2021-06-11 08:35:11');
INSERT INTO `oms_order_item` VALUES (157, 1351548262424821910, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-12 14:16:13', '2021-06-12 14:16:13');
INSERT INTO `oms_order_item` VALUES (158, 1351548262424821911, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 2, 1999800, 0, '', '', 0, '', 0, '', 0, '2021-06-17 08:48:45', '2021-06-17 08:48:45');
-- ----------------------------
-- Table structure for oms_order_log
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_log`;
CREATE TABLE `oms_order_log` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint(0) NOT NULL COMMENT '订单id',
`user` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作人[用户;系统;后台管理员]',
`detail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作详情',
`order_status` int(0) NULL DEFAULT NULL COMMENT '操作时订单状态',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '备注',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 51 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单操作历史记录' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for oms_order_pay
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_pay`;
CREATE TABLE `oms_order_pay` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint(0) NOT NULL COMMENT '订单id',
`pay_sn` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '支付流水号',
`pay_amount` bigint(0) NOT NULL DEFAULT 0 COMMENT '应付总额(分)',
`pay_time` datetime(0) NULL DEFAULT NULL COMMENT '支付时间',
`pay_type` tinyint(0) NULL DEFAULT NULL COMMENT '支付方式【1->支付宝2->微信3->银联; 4->货到付款;】',
`pay_status` tinyint(0) NULL DEFAULT NULL COMMENT '支付状态',
`confirm_time` datetime(0) NULL DEFAULT NULL COMMENT '确认时间',
`callback_content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '回调内容',
`callback_time` datetime(0) NULL DEFAULT NULL COMMENT '回调时间',
`pay_subject` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '交易内容',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '支付信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for oms_order_setting
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_setting`;
CREATE TABLE `oms_order_setting` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`flash_order_overtime` int(0) NULL DEFAULT NULL COMMENT '秒杀订单超时关闭时间(分)',
`normal_order_overtime` int(0) NULL DEFAULT NULL COMMENT '正常订单超时时间(分)',
`confirm_overtime` int(0) NULL DEFAULT NULL COMMENT '发货后自动确认收货时间(天)',
`finish_overtime` int(0) NULL DEFAULT NULL COMMENT '自动完成交易时间,不能申请退货(天)',
`comment_overtime` int(0) NULL DEFAULT NULL COMMENT '订单完成后自动好评时间(天)',
`member_level` tinyint(0) NULL DEFAULT NULL COMMENT '会员等级【0-不限会员等级,全部通用;其他-对应的其他会员等级】',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单配置信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
`branch_id` bigint(0) NOT NULL COMMENT 'branch transaction id',
`xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'global transaction id',
`context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'undo_log context,such as serialization',
`rollback_info` longblob NOT NULL COMMENT 'rollback info',
`log_status` int(0) NOT NULL COMMENT '0:normal status,1:defense status',
`log_created` datetime(6) NOT NULL COMMENT 'create datetime',
`log_modified` datetime(6) NOT NULL COMMENT 'modify datetime',
UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'AT transaction mode undo table' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -0,0 +1,25 @@
/*
*
* MySQL5.x版本
*/
-- ----------------------------
-- 系统管理数据库
-- ----------------------------
CREATE DATABASE IF NOT EXISTS youlai DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
-- ----------------------------
-- 商城会员数据库
-- ----------------------------
CREATE DATABASE IF NOT EXISTS mall_ums DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
-- ----------------------------
-- 商城商品数据库
-- ----------------------------
CREATE DATABASE IF NOT EXISTS mall_pms DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
-- ----------------------------
-- 商城订单数据库
-- ----------------------------
CREATE DATABASE IF NOT EXISTS mall_oms DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
-- ----------------------------
-- 商城营销数据库
-- ----------------------------
CREATE DATABASE IF NOT EXISTS mall_sms DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;

View File

@ -0,0 +1,279 @@
/*
*
* MySQL5.x版本
*/
use mall_oms;
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for oms_order
-- ----------------------------
DROP TABLE IF EXISTS `oms_order`;
CREATE TABLE `oms_order` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_sn` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单号',
`total_amount` bigint NOT NULL DEFAULT 0 COMMENT '订单总额(分)',
`total_quantity` int NOT NULL DEFAULT 0 COMMENT '商品总数',
`source_type` tinyint NOT NULL DEFAULT 1 COMMENT '订单来源[0->PC订单1->APP订单]',
`status` int NOT NULL DEFAULT 101 COMMENT '订单状态:\r\n101->待付款;\r\n102->用户取消;\r\n103->系统取消;\r\n201->已付款;\r\n202->申请退款;\r\n203->已退款;\r\n301->待发货;\r\n401->已发货;\r\n501->用户收货;\r\n502->系统收货;\r\n901->已完成;',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单备注',
`member_id` bigint NOT NULL DEFAULT 0 COMMENT '会员id',
`coupon_id` bigint NOT NULL DEFAULT 0 COMMENT '使用的优惠券',
`coupon_amount` bigint NOT NULL DEFAULT 0 COMMENT '优惠券抵扣金额(分)',
`freight_amount` bigint NOT NULL DEFAULT 0 COMMENT '运费金额(分)',
`pay_amount` bigint NOT NULL DEFAULT 0 COMMENT '应付总额(分)',
`pay_time` datetime NULL DEFAULT NULL COMMENT '支付时间',
`pay_type` tinyint NULL DEFAULT NULL COMMENT '支付方式【1->微信jsapi2->支付宝3->余额; 4->微信app',
`out_trade_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信支付等第三方支付平台的商户订单号',
`transaction_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信支付订单号',
`out_refund_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商户退款单号',
`refund_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信退款单号',
`delivery_time` datetime NULL DEFAULT NULL COMMENT '发货时间',
`receive_time` datetime NULL DEFAULT NULL COMMENT '确认收货时间',
`comment_time` datetime NULL DEFAULT NULL COMMENT '评价时间',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `index_order_sn`(`order_sn`) USING BTREE COMMENT '订单号唯一索引',
UNIQUE INDEX `index_otn`(`out_trade_no`) USING BTREE COMMENT '商户订单号唯一索引',
UNIQUE INDEX `index_ti`(`transaction_id`) USING BTREE COMMENT '商户支付单号唯一索引',
UNIQUE INDEX `index_orn`(`out_refund_no`) USING BTREE COMMENT '商户退款单号唯一索引',
UNIQUE INDEX `index_ri`(`refund_id`) USING BTREE COMMENT '退款单号唯一索引'
) ENGINE = InnoDB AUTO_INCREMENT = 1351548262424821949 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单详情表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order
-- ----------------------------
INSERT INTO `oms_order` VALUES (1351548262424821940, '20210815300000009', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-15 12:38:02', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 12:38:02', '2021-08-15 12:38:02');
INSERT INTO `oms_order` VALUES (1351548262424821941, '20210815300000010', 300, 1, 1, 201, '', 39, 0, 0, 0, 300, '2021-08-15 21:34:00', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 21:33:56', '2021-08-15 21:34:00');
INSERT INTO `oms_order` VALUES (1351548262424821942, '20210815300000011', 100, 1, 1, 201, '', 4, 0, 0, 0, 100, '2021-08-15 21:34:16', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 21:34:10', '2021-08-15 21:34:16');
INSERT INTO `oms_order` VALUES (1351548262424821943, '20210815300000012', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-15 21:44:02', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 21:44:01', '2021-08-15 21:44:02');
INSERT INTO `oms_order` VALUES (1351548262424821944, '20210815300000013', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-15 21:45:27', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 21:45:21', '2021-08-15 21:45:27');
INSERT INTO `oms_order` VALUES (1351548262424821945, '20210815300000014', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-15 22:00:38', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 22:00:36', '2021-08-15 22:00:38');
INSERT INTO `oms_order` VALUES (1351548262424821948, '20210816300000002', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-16 23:18:17', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-16 23:18:14', '2021-08-16 23:18:17');
INSERT INTO `oms_order` VALUES (1351548262424821949, '20210828300000009', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-28 00:43:59', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-28 00:43:55', NULL);
-- ----------------------------
-- Table structure for oms_order_delivery
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_delivery`;
CREATE TABLE `oms_order_delivery` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint NOT NULL COMMENT '订单id',
`delivery_company` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流公司(配送方式)',
`delivery_sn` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流单号',
`receiver_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收货人姓名',
`receiver_phone` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收货人电话',
`receiver_post_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收货人邮编',
`receiver_province` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '省份/直辖市',
`receiver_city` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '城市',
`receiver_region` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '',
`receiver_detail_address` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '详细地址',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
`delivery_status` tinyint NULL DEFAULT 0 COMMENT '物流状态【0->运输中1->已收货】',
`delivery_time` datetime NULL DEFAULT NULL COMMENT '发货时间',
`receive_time` datetime NULL DEFAULT NULL COMMENT '确认收货时间',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单物流记录表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order_delivery
-- ----------------------------
-- ----------------------------
-- Table structure for oms_order_item
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_item`;
CREATE TABLE `oms_order_item` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint NOT NULL COMMENT 'order_id',
`sku_id` bigint NOT NULL DEFAULT 0 COMMENT '商品sku id',
`sku_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品sku编号',
`sku_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品sku名字',
`sku_pic` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品sku图片',
`sku_price` bigint NOT NULL DEFAULT 0 COMMENT '商品sku价格(分)',
`sku_quantity` int NOT NULL DEFAULT 0 COMMENT '商品购买的数量',
`sku_total_price` bigint NOT NULL DEFAULT 0 COMMENT '商品sku总价格(分)',
`spu_id` bigint NOT NULL DEFAULT 0 COMMENT 'spu_id',
`spu_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'spu_name',
`spu_pic` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'spu_pic',
`brand_id` bigint NOT NULL DEFAULT 0 COMMENT '品牌id',
`brand_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '品牌名称',
`category_id` bigint NOT NULL DEFAULT 0 COMMENT '商品分类id',
`category_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品分类名称',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_order_id`(`order_id`) USING BTREE COMMENT '订单id索引'
) ENGINE = InnoDB AUTO_INCREMENT = 203 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单商品信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order_item
-- ----------------------------
INSERT INTO `oms_order_item` VALUES (128, 1351548262424821882, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-22 23:34:46', '2021-03-22 23:34:46');
INSERT INTO `oms_order_item` VALUES (129, 1351548262424821883, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 01:03:47', '2021-03-23 01:03:47');
INSERT INTO `oms_order_item` VALUES (130, 1351548262424821884, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-23 01:10:17', '2021-03-23 01:10:17');
INSERT INTO `oms_order_item` VALUES (131, 1351548262424821885, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 02:21:27', '2021-03-23 02:21:27');
INSERT INTO `oms_order_item` VALUES (132, 1351548262424821886, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-23 06:37:27', '2021-03-23 06:37:27');
INSERT INTO `oms_order_item` VALUES (133, 1351548262424821887, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 07:02:27', '2021-03-23 07:02:27');
INSERT INTO `oms_order_item` VALUES (134, 1351548262424821888, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-23 07:31:43', '2021-03-23 07:31:43');
INSERT INTO `oms_order_item` VALUES (135, 1351548262424821889, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 18:55:41', '2021-03-23 18:55:41');
INSERT INTO `oms_order_item` VALUES (136, 1351548262424821890, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-25 19:02:51', '2021-03-25 19:02:51');
INSERT INTO `oms_order_item` VALUES (137, 1351548262424821891, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-29 15:57:45', '2021-03-29 15:57:45');
INSERT INTO `oms_order_item` VALUES (138, 1351548262424821892, 186, '1614505517559', '测试手机1 黑 6+128 ', 'http://a.youlai.store:9000/default/9715dde8c35c429b8c56cbe800ebd205.jpg', 299900, 1, 299900, 0, '', '', 0, '', 0, '', 0, '2021-03-29 16:02:46', '2021-03-29 16:02:46');
INSERT INTO `oms_order_item` VALUES (139, 1351548262424821893, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-31 14:22:33', '2021-03-31 14:22:33');
INSERT INTO `oms_order_item` VALUES (140, 1351548262424821894, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-04-14 22:59:43', '2021-04-14 22:59:43');
INSERT INTO `oms_order_item` VALUES (141, 1351548262424821895, 192, '1614505936511', '测试手机2 黑 8+256 ', 'http://a.youlai.tech:9000/default/3e369c91377a4c9f9eb33f66a6dd6906.jpg', 199900, 1, 199900, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:03:21', '2021-04-14 23:03:21');
INSERT INTO `oms_order_item` VALUES (142, 1351548262424821896, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:33:48', '2021-04-14 23:33:48');
INSERT INTO `oms_order_item` VALUES (143, 1351548262424821897, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:38:15', '2021-04-14 23:38:15');
INSERT INTO `oms_order_item` VALUES (144, 1351548262424821898, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:38:31', '2021-04-14 23:38:31');
INSERT INTO `oms_order_item` VALUES (145, 1351548262424821899, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:42:47', '2021-04-14 23:42:47');
INSERT INTO `oms_order_item` VALUES (146, 1351548262424821900, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 3, 479700, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:48:04', '2021-04-14 23:48:04');
INSERT INTO `oms_order_item` VALUES (147, 1351548262424821901, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-04-16 16:18:27', '2021-04-16 16:18:27');
INSERT INTO `oms_order_item` VALUES (150, 1351548262424821904, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:20:33', '2021-06-11 00:20:33');
INSERT INTO `oms_order_item` VALUES (151, 1351548262424821905, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:24:07', '2021-06-11 00:24:07');
INSERT INTO `oms_order_item` VALUES (152, 1351548262424821906, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:26:16', '2021-06-11 00:26:16');
INSERT INTO `oms_order_item` VALUES (153, 1351548262424821907, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:42:43', '2021-06-11 00:42:43');
INSERT INTO `oms_order_item` VALUES (154, 1351548262424821908, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-11 07:58:04', '2021-06-11 07:58:04');
INSERT INTO `oms_order_item` VALUES (155, 1351548262424821909, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-11 08:35:11', '2021-06-11 08:35:11');
INSERT INTO `oms_order_item` VALUES (156, 1351548262424821909, 244, '1623369301480', '测试合约机 蓝 12+256g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-11 08:35:11', '2021-06-11 08:35:11');
INSERT INTO `oms_order_item` VALUES (157, 1351548262424821910, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-12 14:16:13', '2021-06-12 14:16:13');
INSERT INTO `oms_order_item` VALUES (158, 1351548262424821911, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 2, 1999800, 0, '', '', 0, '', 0, '', 0, '2021-06-17 08:48:45', '2021-06-17 08:48:45');
INSERT INTO `oms_order_item` VALUES (163, 1351548262424821918, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 2, 1999800, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (164, 1351548262424821919, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (165, 1351548262424821920, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 2, 1999800, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (166, 1351548262424821921, 197, '1616310848932', '测试衣服1 白 M ', 'http://a.youlai.store:9000/default/063350d473a64ee7857e91841add1177.jpg', 29900, 1, 29900, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (167, 1351548262424821922, 197, '1616310848932', '测试衣服1 白 M ', 'http://a.youlai.store:9000/default/063350d473a64ee7857e91841add1177.jpg', 29900, 4, 119600, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (168, 1351548262424821923, 245, '1626080416010', 'huawei mate40pro 12 2 3 ', '', 609900, 1, 609900, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (169, 1351548262424821924, 245, '1626080416010', 'huawei mate40pro 12 2 3 ', '', 609900, 2, 1219800, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (170, 1351548262424821925, 245, '1626080416010', 'huawei mate40pro 12 2 3 ', '', 609900, 2, 1219800, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (171, 1351548262424821927, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-13 00:25:33', '2021-08-13 00:25:33');
INSERT INTO `oms_order_item` VALUES (172, 1351548262424821928, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-13 00:29:25', '2021-08-13 00:29:25');
INSERT INTO `oms_order_item` VALUES (173, 1351548262424821912, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-13 22:45:19', '2021-08-13 22:45:19');
INSERT INTO `oms_order_item` VALUES (174, 1351548262424821913, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-13 23:37:42', '2021-08-13 23:37:42');
INSERT INTO `oms_order_item` VALUES (175, 1351548262424821914, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 00:17:19', '2021-08-14 00:17:19');
INSERT INTO `oms_order_item` VALUES (176, 1351548262424821914, 291, '1', '', 'http://a.youlai.tech:9000/default/fb3f1be8aae644f497255f29aa51c641.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 00:17:19', '2021-08-14 00:17:19');
INSERT INTO `oms_order_item` VALUES (177, 1351548262424821915, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 01:24:26', '2021-08-14 01:24:26');
INSERT INTO `oms_order_item` VALUES (178, 1351548262424821916, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 17:24:13', '2021-08-14 17:24:13');
INSERT INTO `oms_order_item` VALUES (179, 1351548262424821917, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 17:30:19', '2021-08-14 17:30:19');
INSERT INTO `oms_order_item` VALUES (180, 1351548262424821918, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 18:58:28', '2021-08-14 18:58:28');
INSERT INTO `oms_order_item` VALUES (181, 1351548262424821919, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 2, 200, 0, '', '', 0, '', 0, '', 0, '2021-08-14 19:01:46', '2021-08-14 19:01:46');
INSERT INTO `oms_order_item` VALUES (182, 1351548262424821921, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 21:41:42', '2021-08-14 21:41:42');
INSERT INTO `oms_order_item` VALUES (183, 1351548262424821922, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 22:32:39', '2021-08-14 22:32:39');
INSERT INTO `oms_order_item` VALUES (184, 1351548262424821923, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 22:35:14', '2021-08-14 22:35:14');
INSERT INTO `oms_order_item` VALUES (185, 1351548262424821924, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 22:38:04', '2021-08-14 22:38:04');
INSERT INTO `oms_order_item` VALUES (186, 1351548262424821925, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 23:14:42', '2021-08-14 23:14:42');
INSERT INTO `oms_order_item` VALUES (187, 1351548262424821926, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 00:42:26', '2021-08-15 00:42:26');
INSERT INTO `oms_order_item` VALUES (188, 1351548262424821927, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 00:46:45', '2021-08-15 00:46:45');
INSERT INTO `oms_order_item` VALUES (189, 1351548262424821928, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 00:50:57', '2021-08-15 00:50:57');
INSERT INTO `oms_order_item` VALUES (190, 1351548262424821929, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 00:54:41', '2021-08-15 00:54:41');
INSERT INTO `oms_order_item` VALUES (191, 1351548262424821930, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 01:00:50', '2021-08-15 01:00:50');
INSERT INTO `oms_order_item` VALUES (192, 1351548262424821931, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 09:24:03', '2021-08-15 09:24:03');
INSERT INTO `oms_order_item` VALUES (193, 1351548262424821932, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 09:24:14', '2021-08-15 09:24:14');
INSERT INTO `oms_order_item` VALUES (194, 1351548262424821933, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 12:23:37', '2021-08-15 12:23:37');
INSERT INTO `oms_order_item` VALUES (195, 1351548262424821940, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 12:38:02', '2021-08-15 12:38:02');
INSERT INTO `oms_order_item` VALUES (196, 1351548262424821941, 331, '4', '黑色 8+256G 套餐一 ', '', 300, 1, 300, 0, '', '', 0, '', 0, '', 0, '2021-08-15 21:33:56', '2021-08-15 21:33:56');
INSERT INTO `oms_order_item` VALUES (197, 1351548262424821942, 308, '1', '123 1233 ', '', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 21:34:10', '2021-08-15 21:34:10');
INSERT INTO `oms_order_item` VALUES (198, 1351548262424821943, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 21:44:01', '2021-08-15 21:44:01');
INSERT INTO `oms_order_item` VALUES (199, 1351548262424821944, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 21:45:22', '2021-08-15 21:45:22');
INSERT INTO `oms_order_item` VALUES (200, 1351548262424821945, 328, '1', '黑色 6+128G 标准 ', '', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 22:00:37', '2021-08-15 22:00:37');
INSERT INTO `oms_order_item` VALUES (201, 1351548262424821946, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-16 17:05:17', '2021-08-16 17:05:17');
INSERT INTO `oms_order_item` VALUES (202, 1351548262424821948, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-16 23:18:16', '2021-08-16 23:18:16');
INSERT INTO `oms_order_item` VALUES (203, 1351548262424821949, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
-- ----------------------------
-- Table structure for oms_order_log
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_log`;
CREATE TABLE `oms_order_log` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint NOT NULL COMMENT '订单id',
`user` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人[用户;系统;后台管理员]',
`detail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作详情',
`order_status` int NULL DEFAULT NULL COMMENT '操作时订单状态',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 52 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单操作历史记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order_log
-- ----------------------------
-- ----------------------------
-- Table structure for oms_order_pay
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_pay`;
CREATE TABLE `oms_order_pay` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint NOT NULL COMMENT '订单id',
`pay_sn` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付流水号',
`pay_amount` bigint NOT NULL DEFAULT 0 COMMENT '应付总额(分)',
`pay_time` datetime NULL DEFAULT NULL COMMENT '支付时间',
`pay_type` tinyint NULL DEFAULT NULL COMMENT '支付方式【1->支付宝2->微信3->银联; 4->货到付款;】',
`pay_status` tinyint NULL DEFAULT NULL COMMENT '支付状态',
`confirm_time` datetime NULL DEFAULT NULL COMMENT '确认时间',
`callback_content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '回调内容',
`callback_time` datetime NULL DEFAULT NULL COMMENT '回调时间',
`pay_subject` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '交易内容',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '支付信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order_pay
-- ----------------------------
-- ----------------------------
-- Table structure for oms_order_setting
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_setting`;
CREATE TABLE `oms_order_setting` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`flash_order_overtime` int NULL DEFAULT NULL COMMENT '秒杀订单超时关闭时间(分)',
`normal_order_overtime` int NULL DEFAULT NULL COMMENT '正常订单超时时间(分)',
`confirm_overtime` int NULL DEFAULT NULL COMMENT '发货后自动确认收货时间(天)',
`finish_overtime` int NULL DEFAULT NULL COMMENT '自动完成交易时间,不能申请退货(天)',
`comment_overtime` int NULL DEFAULT NULL COMMENT '订单完成后自动好评时间(天)',
`member_level` tinyint NULL DEFAULT NULL COMMENT '会员等级【0-不限会员等级,全部通用;其他-对应的其他会员等级】',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单配置信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order_setting
-- ----------------------------
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
`branch_id` bigint NOT NULL COMMENT 'branch transaction id',
`xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'global transaction id',
`context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'undo_log context,such as serialization',
`rollback_info` longblob NOT NULL COMMENT 'rollback info',
`log_status` int NOT NULL COMMENT '0:normal status,1:defense status',
`log_created` datetime(6) NOT NULL COMMENT 'create datetime',
`log_modified` datetime(6) NOT NULL COMMENT 'modify datetime',
UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'AT transaction mode undo table' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of undo_log
-- ----------------------------
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -0,0 +1,245 @@
/*
*
* MySQL5.x版本
*/
use mall_pms;
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for pms_attribute
-- ----------------------------
DROP TABLE IF EXISTS `pms_attribute`;
CREATE TABLE `pms_attribute` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`category_id` bigint NOT NULL COMMENT '分类ID',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '属性名称',
`type` tinyint NOT NULL COMMENT '类型(1:规格;2:属性;)',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_pms_attr_pms_category`(`category_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品属性表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pms_attribute
-- ----------------------------
INSERT INTO `pms_attribute` VALUES (34, 5, '颜色', 1, '2021-07-11 17:57:06', '2021-07-11 18:00:06');
INSERT INTO `pms_attribute` VALUES (35, 5, '规格', 1, '2021-07-11 18:00:06', '2021-07-11 18:00:06');
INSERT INTO `pms_attribute` VALUES (36, 5, '上市时间', 2, '2021-07-11 18:00:08', '2021-07-11 18:00:08');
-- ----------------------------
-- Table structure for pms_brand
-- ----------------------------
DROP TABLE IF EXISTS `pms_brand`;
CREATE TABLE `pms_brand` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '品牌名称',
`logo_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'LOGO图片',
`sort` int NULL DEFAULT NULL COMMENT '排序',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品品牌表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pms_brand
-- ----------------------------
INSERT INTO `pms_brand` VALUES (1, '有来', 'http://a.youlai.tech:9000/default/73bc0adc892646d5b844f76619ec934e.jpg', 1, '2021-07-11 19:56:58', '2021-07-11 20:02:54');
-- ----------------------------
-- Table structure for pms_category
-- ----------------------------
DROP TABLE IF EXISTS `pms_category`;
CREATE TABLE `pms_category` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品分类名称',
`parent_id` bigint NOT NULL COMMENT '父级ID',
`level` int NULL DEFAULT NULL COMMENT '层级',
`icon_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标地址',
`sort` int NULL DEFAULT NULL COMMENT '排序',
`visible` tinyint(1) NULL DEFAULT 1 COMMENT '显示状态:( 0:隐藏 1:显示)',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品分类表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pms_category
-- ----------------------------
INSERT INTO `pms_category` VALUES (3, '手机配件', 0, 1, NULL, 1, 1, NULL, NULL);
INSERT INTO `pms_category` VALUES (4, '智能手机', 3, 2, NULL, 1, 1, NULL, NULL);
INSERT INTO `pms_category` VALUES (5, '5g手机', 4, 3, 'http://a.youlai.tech:9000/default/040a0bd0586944959e11ef37e8d11a9f.jfif', 1, 1, NULL, '2021-08-08 13:28:42');
-- ----------------------------
-- Table structure for pms_catetgory_brand
-- ----------------------------
DROP TABLE IF EXISTS `pms_catetgory_brand`;
CREATE TABLE `pms_catetgory_brand` (
`category_id` bigint NOT NULL,
`brand_id` bigint NOT NULL,
PRIMARY KEY (`category_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pms_catetgory_brand
-- ----------------------------
-- ----------------------------
-- Table structure for pms_sku
-- ----------------------------
DROP TABLE IF EXISTS `pms_sku`;
CREATE TABLE `pms_sku` (
`id` bigint NOT NULL AUTO_INCREMENT,
`sn` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品编码',
`spu_id` bigint NOT NULL COMMENT '产品ID',
`name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品标题',
`spec_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品规格值,以,分割',
`price` bigint NULL DEFAULT NULL COMMENT '价格(单位:分)',
`stock` int NULL DEFAULT 0 COMMENT '库存',
`locked_stock` int NULL DEFAULT 0 COMMENT '锁定库存',
`pic_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品图片',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_pms_sku_pms_spu`(`spu_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 312 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品库存表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pms_sku
-- ----------------------------
INSERT INTO `pms_sku` VALUES (291, '1', 1, NULL, '1_3', 100, 1, 0, 'http://a.youlai.tech:9000/default/fb3f1be8aae644f497255f29aa51c641.jpg', '2021-08-08 00:43:26', '2021-08-08 00:56:24');
INSERT INTO `pms_sku` VALUES (292, '2', 1, NULL, '1_4', 200, 2, 0, 'http://a.youlai.tech:9000/default/fb3f1be8aae644f497255f29aa51c641.jpg', '2021-08-08 00:43:26', '2021-08-08 00:56:24');
INSERT INTO `pms_sku` VALUES (293, '3', 1, NULL, '2_3', 300, 3, 0, 'http://a.youlai.tech:9000/default/074dfb3841444a10a7691eac322bb848.jpg', '2021-08-08 00:43:26', '2021-08-08 00:56:25');
INSERT INTO `pms_sku` VALUES (294, '4', 1, NULL, '2_4', 400, 4, 0, 'http://a.youlai.tech:9000/default/074dfb3841444a10a7691eac322bb848.jpg', '2021-08-08 00:43:26', '2021-08-08 00:56:25');
INSERT INTO `pms_sku` VALUES (295, '213', 72, NULL, '114_115', 12300, 123, 0, NULL, '2021-08-08 08:30:39', '2021-08-08 08:30:39');
INSERT INTO `pms_sku` VALUES (296, '1213', 73, '117|11', '117_119', 100, 12, 0, NULL, '2021-08-08 11:28:50', '2021-08-08 11:29:49');
INSERT INTO `pms_sku` VALUES (297, '2123', 73, '117|12', '117_120', 200, 123, 0, NULL, '2021-08-08 11:28:50', '2021-08-08 11:29:49');
INSERT INTO `pms_sku` VALUES (298, '3123', 73, '118|11', '118_119', 300, 123, 0, NULL, '2021-08-08 11:28:50', '2021-08-08 11:29:49');
INSERT INTO `pms_sku` VALUES (299, '41244', 73, '118|12', '118_120', 400, 123, 0, NULL, '2021-08-08 11:28:50', '2021-08-08 11:29:49');
INSERT INTO `pms_sku` VALUES (300, '1', 74, 'tid_1_1|tid_2_1|tid_3_', '122_124_126', 100, 98, 17, 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_sku` VALUES (301, '2', 74, 'tid_1_1|tid_2_1|tid_3_', '122_124_127', 200, 2, 0, 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_sku` VALUES (302, '3', 74, 'tid_1_1|tid_2_2|tid_3_', '122_125_126', 300, 3, 0, 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_sku` VALUES (303, '4', 74, 'tid_1_1|tid_2_2|tid_3_', '122_125_127', 400, 4, 0, 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_sku` VALUES (304, '5', 74, 'tid_1_2|tid_2_1|tid_3_', '123_124_126', 500, 5, 0, 'http://a.youlai.tech:9000/default/5a57b78ec1bf4bfeb20f7a99907cfaf8.jpg', '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_sku` VALUES (305, '6', 74, 'tid_1_2|tid_2_1|tid_3_', '123_124_127', 600, 6, 0, 'http://a.youlai.tech:9000/default/5a57b78ec1bf4bfeb20f7a99907cfaf8.jpg', '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_sku` VALUES (306, '7', 74, 'tid_1_2|tid_2_2|tid_3_', '123_125_126', 700, 7, 0, 'http://a.youlai.tech:9000/default/5a57b78ec1bf4bfeb20f7a99907cfaf8.jpg', '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_sku` VALUES (307, '8', 74, 'tid_1_2|tid_2_2|tid_3_', '123_125_127', 800, 8, 0, 'http://a.youlai.tech:9000/default/5a57b78ec1bf4bfeb20f7a99907cfaf8.jpg', '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_sku` VALUES (308, '1', 75, '123 1233 ', '129_131', 100, 1, 0, NULL, '2021-08-09 22:40:20', '2021-08-09 22:40:20');
INSERT INTO `pms_sku` VALUES (309, '2', 75, '123 4+64G ', '129_132', 200, 2, 0, NULL, '2021-08-09 22:40:20', '2021-08-09 22:40:20');
INSERT INTO `pms_sku` VALUES (310, '3', 75, '黑 1233 ', '130_131', 300, 3, 0, NULL, '2021-08-09 22:40:20', '2021-08-09 22:40:20');
INSERT INTO `pms_sku` VALUES (311, '4', 75, '黑 4+64G ', '130_132', 400, 4, 0, NULL, '2021-08-09 22:40:20', '2021-08-09 22:40:20');
-- ----------------------------
-- Table structure for pms_spu
-- ----------------------------
DROP TABLE IF EXISTS `pms_spu`;
CREATE TABLE `pms_spu` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品名称',
`category_id` bigint NOT NULL COMMENT '商品类型ID',
`brand_id` bigint NULL DEFAULT NULL COMMENT '商品品牌ID',
`origin_price` bigint NOT NULL COMMENT '原价【起】',
`price` bigint NOT NULL COMMENT '现价【起】',
`sales` int NULL DEFAULT 0 COMMENT '销量',
`pic_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品主图',
`album` json NULL COMMENT '商品图册',
`unit` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '单位',
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品简介',
`detail` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '商品详情',
`status` tinyint NULL DEFAULT NULL COMMENT '商品状态0-下架 1-上架',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_pms_spu_pms_brand`(`brand_id`) USING BTREE,
INDEX `fk_pms_spu_pms_category`(`category_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 76 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pms_spu
-- ----------------------------
INSERT INTO `pms_spu` VALUES (1, '小米10', 5, 1, 599900, 399900, 1, 'http://a.youlai.tech:9000/default/063350d473a64ee7857e91841add1177.jpg', '[\"https://gitee.com/haoxr/image/raw/master/default/image-20210702002909113.png\", \"https://gitee.com/haoxr/image/raw/master/default/image-20210702002909113.png\"]', '', '商品简介', '商品详情', 1, NULL, '2021-08-08 00:56:25');
INSERT INTO `pms_spu` VALUES (72, '手机2号', 5, 1, 100, 200, 0, 'http://a.youlai.tech:9000/default/26afc0d59f094c6d9dff8c2cf8ac1863.jfif', NULL, NULL, '123', NULL, NULL, '2021-08-08 08:30:38', '2021-08-08 08:30:38');
INSERT INTO `pms_spu` VALUES (73, '123', 5, 1, 12300, 12300, 0, 'http://a.youlai.tech:9000/default/f76fa430756749bab698d3797ca8da04.jfif', '[\"http://a.youlai.tech:9000/default/6813cdaa196d47e8b09436db12323a7f.jpg\"]', NULL, '123', '<p>123</p>', NULL, '2021-08-08 11:28:50', '2021-08-08 11:29:49');
INSERT INTO `pms_spu` VALUES (74, '123', 5, 1, 12300, 12300, 0, 'http://a.youlai.tech:9000/default/aae526c28c114561b249add9e34922f8.jfif', '[\"http://a.youlai.tech:9000/default/2e317170b2c241c4b4a8d86fe0926f8c.jfif\"]', NULL, '123', '', NULL, '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_spu` VALUES (75, '1', 5, 1, 21300, 12300, 0, 'http://a.youlai.tech:9000/default/1322f05c8ca240e6ada2255c1903e66d.jfif', '[\"http://a.youlai.tech:9000/default/de015e8674e6408a87b01516a746437a.jfif\"]', NULL, '123', NULL, NULL, '2021-08-09 22:40:20', '2021-08-09 22:40:20');
-- ----------------------------
-- Table structure for pms_spu_attribute_value
-- ----------------------------
DROP TABLE IF EXISTS `pms_spu_attribute_value`;
CREATE TABLE `pms_spu_attribute_value` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`spu_id` bigint NOT NULL COMMENT '产品ID',
`attribute_id` bigint NULL DEFAULT NULL COMMENT '属性ID',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '属性名称',
`value` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '属性值',
`type` tinyint NOT NULL COMMENT '类型(1:规格;2:属性;)',
`pic_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '规格图片',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_pms_spu_attribute_pms_attr`(`name`) USING BTREE,
INDEX `fk_pms_spu_attribute_pms_spu`(`spu_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 133 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品属性项表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pms_spu_attribute_value
-- ----------------------------
INSERT INTO `pms_spu_attribute_value` VALUES (1, 1, 34, '颜色', '', 1, 'http://a.youlai.tech:9000/default/fb3f1be8aae644f497255f29aa51c641.jpg', NULL, '2021-08-08 00:56:24');
INSERT INTO `pms_spu_attribute_value` VALUES (2, 1, 34, '颜色', '', 1, 'http://a.youlai.tech:9000/default/074dfb3841444a10a7691eac322bb848.jpg', NULL, '2021-08-08 00:56:24');
INSERT INTO `pms_spu_attribute_value` VALUES (3, 1, 35, '规格', '6+128g', 1, NULL, NULL, '2021-08-08 00:56:24');
INSERT INTO `pms_spu_attribute_value` VALUES (4, 1, 35, '规格', '8+256g', 1, NULL, NULL, '2021-08-08 00:56:24');
INSERT INTO `pms_spu_attribute_value` VALUES (5, 1, 36, '上市时间', '2021-07-17', 2, NULL, NULL, '2021-08-08 00:56:24');
INSERT INTO `pms_spu_attribute_value` VALUES (95, 68, NULL, '上市时间', '123', 2, NULL, '2021-08-07 23:38:24', '2021-08-07 23:38:24');
INSERT INTO `pms_spu_attribute_value` VALUES (96, 68, NULL, '颜色', '123', 1, NULL, '2021-08-07 23:38:50', '2021-08-07 23:38:50');
INSERT INTO `pms_spu_attribute_value` VALUES (97, 68, NULL, '颜色', '4123', 1, NULL, '2021-08-07 23:38:50', '2021-08-07 23:38:50');
INSERT INTO `pms_spu_attribute_value` VALUES (98, 68, NULL, '规格', '456', 1, NULL, '2021-08-07 23:38:50', '2021-08-07 23:38:50');
INSERT INTO `pms_spu_attribute_value` VALUES (99, 68, NULL, '规格', '123', 1, NULL, '2021-08-07 23:38:50', '2021-08-07 23:38:50');
INSERT INTO `pms_spu_attribute_value` VALUES (100, 69, NULL, '上市时间', '123', 2, NULL, '2021-08-07 23:41:44', '2021-08-07 23:41:44');
INSERT INTO `pms_spu_attribute_value` VALUES (101, 69, NULL, '颜色', '123', 1, NULL, '2021-08-07 23:41:44', '2021-08-07 23:41:44');
INSERT INTO `pms_spu_attribute_value` VALUES (102, 69, NULL, '颜色', '4123', 1, NULL, '2021-08-07 23:41:44', '2021-08-07 23:41:44');
INSERT INTO `pms_spu_attribute_value` VALUES (103, 69, NULL, '规格', '456', 1, NULL, '2021-08-07 23:41:44', '2021-08-07 23:41:44');
INSERT INTO `pms_spu_attribute_value` VALUES (104, 69, NULL, '规格', '123', 1, NULL, '2021-08-07 23:41:45', '2021-08-07 23:41:45');
INSERT INTO `pms_spu_attribute_value` VALUES (113, 72, NULL, '上市时间', '12313', 2, NULL, '2021-08-08 08:30:38', '2021-08-08 08:30:38');
INSERT INTO `pms_spu_attribute_value` VALUES (114, 72, NULL, '颜色', '123', 1, 'http://a.youlai.tech:9000/default/afdbd92d2f4f467ab87379cc1efcb504.jpg', '2021-08-08 08:30:38', '2021-08-08 08:30:38');
INSERT INTO `pms_spu_attribute_value` VALUES (115, 72, NULL, '规格', '123', 1, NULL, '2021-08-08 08:30:38', '2021-08-08 08:30:38');
INSERT INTO `pms_spu_attribute_value` VALUES (116, 73, NULL, '上市时间', '123', 2, NULL, '2021-08-08 11:28:50', '2021-08-08 11:29:49');
INSERT INTO `pms_spu_attribute_value` VALUES (117, 73, NULL, '颜色', '', 1, NULL, '2021-08-08 11:28:50', '2021-08-08 11:29:49');
INSERT INTO `pms_spu_attribute_value` VALUES (118, 73, NULL, '颜色', '', 1, NULL, '2021-08-08 11:28:50', '2021-08-08 11:29:49');
INSERT INTO `pms_spu_attribute_value` VALUES (119, 73, NULL, '规格', '搜索', 1, NULL, '2021-08-08 11:28:50', '2021-08-08 11:29:49');
INSERT INTO `pms_spu_attribute_value` VALUES (120, 73, NULL, '规格', '水电费', 1, NULL, '2021-08-08 11:28:50', '2021-08-08 11:29:49');
INSERT INTO `pms_spu_attribute_value` VALUES (121, 74, NULL, '上市时间', '112', 2, NULL, '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_spu_attribute_value` VALUES (122, 74, NULL, '颜色', '123', 1, 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_spu_attribute_value` VALUES (123, 74, NULL, '颜色', '132', 1, 'http://a.youlai.tech:9000/default/5a57b78ec1bf4bfeb20f7a99907cfaf8.jpg', '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_spu_attribute_value` VALUES (124, 74, NULL, '规格', 'sdf', 1, NULL, '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_spu_attribute_value` VALUES (125, 74, NULL, '规格', '123', 1, NULL, '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_spu_attribute_value` VALUES (126, 74, NULL, '1223123', '123', 1, NULL, '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_spu_attribute_value` VALUES (127, 74, NULL, '1223123', '123444', 1, NULL, '2021-08-09 22:24:46', '2021-08-09 22:24:46');
INSERT INTO `pms_spu_attribute_value` VALUES (128, 75, NULL, '上市时间', '123', 2, NULL, '2021-08-09 22:40:20', '2021-08-09 22:40:20');
INSERT INTO `pms_spu_attribute_value` VALUES (129, 75, NULL, '颜色', '123', 1, NULL, '2021-08-09 22:40:20', '2021-08-09 22:40:20');
INSERT INTO `pms_spu_attribute_value` VALUES (130, 75, NULL, '颜色', '', 1, NULL, '2021-08-09 22:40:20', '2021-08-09 22:40:20');
INSERT INTO `pms_spu_attribute_value` VALUES (131, 75, NULL, '规格', '1233', 1, NULL, '2021-08-09 22:40:20', '2021-08-09 22:40:20');
INSERT INTO `pms_spu_attribute_value` VALUES (132, 75, NULL, '规格', '4+64G', 1, NULL, '2021-08-09 22:40:20', '2021-08-09 22:40:20');
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
`branch_id` bigint NOT NULL COMMENT 'branch transaction id',
`xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'global transaction id',
`context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'undo_log context,such as serialization',
`rollback_info` longblob NOT NULL COMMENT 'rollback info',
`log_status` int NOT NULL COMMENT '0:normal status,1:defense status',
`log_created` datetime(6) NOT NULL COMMENT 'create datetime',
`log_modified` datetime(6) NOT NULL COMMENT 'modify datetime',
UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'AT transaction mode undo table' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of undo_log
-- ----------------------------
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -0,0 +1,191 @@
/*
*
* MySQL5.x版本
*/
use mall_sms;
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for sms_advert
-- ----------------------------
DROP TABLE IF EXISTS `sms_advert`;
CREATE TABLE `sms_advert` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '广告名称',
`pic` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '图片地址',
`start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
`status` tinyint(1) NOT NULL COMMENT '状态1-开启 0-关闭',
`sort` int NULL DEFAULT NULL COMMENT '排序',
`url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '链接地址',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`gmt_create` datetime NULL DEFAULT NULL,
`gmt_modified` datetime NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '广告表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sms_advert
-- ----------------------------
INSERT INTO `sms_advert` VALUES (2, '小程序首页轮播图2', 'http://a.youlai.tech:9000/default/ff398681c1504e5a83afb877794075dd.jpg', '2020-10-25 09:25:07', '2023-10-06 00:00:00', 1, 2, NULL, NULL, '2020-10-25 09:25:23', '2021-06-11 07:56:00');
INSERT INTO `sms_advert` VALUES (3, '小程序首页轮播图3', 'http://a.youlai.tech:9000/default/dabe64b002704e89a1e0fdfb41e93ddf.jpg', '2020-10-25 09:25:37', '2020-10-31 00:00:00', 1, 3, NULL, NULL, '2020-10-25 09:25:56', '2021-06-11 07:56:23');
INSERT INTO `sms_advert` VALUES (4, '小程序首页轮播图4', 'http://a.youlai.tech:9000/default/e0a32427638943f7a7a69e7cad51263b.jpg', '2020-10-25 00:00:00', '2020-10-31 00:00:00', 1, 4, NULL, NULL, '2020-10-25 09:26:47', '2021-06-11 07:56:49');
INSERT INTO `sms_advert` VALUES (5, '小程序首页轮播图5', 'http://a.youlai.tech:9000/default/1ba8a7f0f832431eae882bb12915276c.jpg', '2020-10-25 00:00:00', '2020-10-31 00:00:00', 1, 5, NULL, NULL, '2020-10-25 10:51:02', '2021-06-11 07:56:41');
INSERT INTO `sms_advert` VALUES (9, '222', 'http://a.youlai.tech:9000/default/0dca30954b834783a39c5833e9e47daa.jpg', '2021-06-15 00:00:00', '2021-06-22 15:07:32', 1, 5, NULL, '断电', NULL, NULL);
INSERT INTO `sms_advert` VALUES (10, '222', 'http://a.youlai.tech:9000/default/0dca30954b834783a39c5833e9e47daa.jpg', '2021-06-15 00:00:00', '2021-06-22 15:07:32', 1, 5, NULL, '断电', NULL, NULL);
-- ----------------------------
-- Table structure for sms_coupon
-- ----------------------------
DROP TABLE IF EXISTS `sms_coupon`;
CREATE TABLE `sms_coupon` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
`title` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '优惠券标题有图片则显示图片无门槛50元优惠券 | 单品最高减2000元',
`img` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片',
`type` int NOT NULL DEFAULT 1 COMMENT '1满减券 2叠加满减券 3无门槛券需要限制大小',
`publish` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布状态, PUBLISH发布DRAFT草稿OFFLINE下线',
`condition_price` bigint NOT NULL DEFAULT 0 COMMENT '满多少才可以使用为0则不限制金额',
`price` bigint NOT NULL COMMENT '抵扣价格',
`publish_count` int NOT NULL DEFAULT 1 COMMENT '优惠券总量',
`limit_count` int NOT NULL DEFAULT 1 COMMENT '限领张数(默认为1为0则不限制)',
`take_count` int NOT NULL DEFAULT 0 COMMENT '已领取的优惠券数量',
`used_count` int NOT NULL DEFAULT 0 COMMENT '已使用的优惠券数量',
`start_time` datetime NOT NULL COMMENT '发放开始时间',
`end_time` datetime NOT NULL COMMENT '发放结束时间',
`valid_days` int NOT NULL DEFAULT 1 COMMENT '自领取之日起有效天数',
`status` int NOT NULL DEFAULT 1 COMMENT '逻辑删除使用',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1372839943053258753 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sms_coupon
-- ----------------------------
INSERT INTO `sms_coupon` VALUES (1, '新人无门槛优惠券,立减20元', 'http://file.gorun996.com/img/2021/03/17/211545.png', 3, ' PUBLISH', 0, 1500, 1000, 1, 0, 0, '2021-03-17 21:10:35', '2025-03-17 21:10:38', 7, 1, '2021-03-17 21:10:54', '2021-03-17 21:10:56');
INSERT INTO `sms_coupon` VALUES (2, '满减优惠券', NULL, 1, 'PUBLISH', 50, 2000, 100, 1, 0, 0, '2021-03-17 21:19:22', '2022-03-17 21:19:24', 7, 1, '2021-03-17 21:19:44', '2021-03-17 21:19:46');
-- ----------------------------
-- Table structure for sms_coupon_record
-- ----------------------------
DROP TABLE IF EXISTS `sms_coupon_record`;
CREATE TABLE `sms_coupon_record` (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`coupon_id` bigint NULL DEFAULT NULL COMMENT '优惠券id',
`use_state` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '使用状态 可用 NEW,已使用USED,过期 EXPIRED;',
`user_id` bigint NULL DEFAULT NULL COMMENT '用户id',
`user_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户昵称(冗余字段)',
`coupon_type` int NOT NULL DEFAULT 1 COMMENT '1满减券 2叠加满减券 3无门槛券',
`coupon_title` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '优惠券标题',
`condition_price` bigint NOT NULL DEFAULT 0 COMMENT '满多少才可以使用为0则不限制金额',
`price` bigint NOT NULL COMMENT '抵扣价格',
`start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
`order_id` bigint NULL DEFAULT NULL COMMENT '订单id',
`status` int NOT NULL DEFAULT 1 COMMENT '逻辑删除使用',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1372841652324487169 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券领劵使用记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sms_coupon_record
-- ----------------------------
INSERT INTO `sms_coupon_record` VALUES (1, 1, 'NEWS', 1, 'zhgsan', 1, '大促销', 50, 20, '2021-03-19 11:12:42', '2021-04-19 11:12:50', NULL, 1, NULL, NULL);
-- ----------------------------
-- Table structure for sms_coupon_template
-- ----------------------------
DROP TABLE IF EXISTS `sms_coupon_template`;
CREATE TABLE `sms_coupon_template` (
`id` bigint NOT NULL COMMENT '主键自增 ID',
`available` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否可用(1:可用;0:不可用)',
`expired` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否过期(1:未过期;0:已过期)',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '优惠券模板名称',
`logo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '优惠券模板logo',
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '优惠券模板描述',
`category` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '优惠券模板分类',
`product_line` int NOT NULL COMMENT '业务产品线',
`total` int NOT NULL DEFAULT 0 COMMENT '总优惠券数量',
`code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '优惠券模板编码',
`target` int NOT NULL COMMENT '目标用户',
`rule` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '优惠券规则',
`gmt_create` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
`gmt_created_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`gmt_modified` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
`gmt_modified_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `sms_coupon_template_name_uindex`(`name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券模板表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sms_coupon_template
-- ----------------------------
-- ----------------------------
-- Table structure for sms_seckill_session
-- ----------------------------
DROP TABLE IF EXISTS `sms_seckill_session`;
CREATE TABLE `sms_seckill_session` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '场次名称',
`start_time` datetime NULL DEFAULT NULL COMMENT '每日开始时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '每日结束时间',
`status` tinyint(1) NULL DEFAULT NULL COMMENT '启用状态 1-开启 0-关闭',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '秒杀活动场次' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sms_seckill_session
-- ----------------------------
INSERT INTO `sms_seckill_session` VALUES (1, '测试秒杀场次1', '2021-03-07 20:20:50', '2021-03-09 20:20:53', 1, '2021-03-07 20:21:04', '2021-03-07 20:21:07');
INSERT INTO `sms_seckill_session` VALUES (2, '测试秒杀场次2', '2021-03-07 20:20:50', '2021-03-09 20:20:53', 1, '2021-03-07 20:21:04', '2021-03-07 20:21:07');
-- ----------------------------
-- Table structure for sms_seckill_sku_relation
-- ----------------------------
DROP TABLE IF EXISTS `sms_seckill_sku_relation`;
CREATE TABLE `sms_seckill_sku_relation` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`session_id` bigint NULL DEFAULT NULL COMMENT '活动场次id',
`sku_id` bigint NULL DEFAULT NULL COMMENT '商品id',
`seckill_price` bigint NOT NULL DEFAULT 0 COMMENT '秒杀价格',
`seckill_count` int NOT NULL DEFAULT 0 COMMENT '秒杀总量',
`seckill_limit` int NOT NULL DEFAULT 0 COMMENT '每人限购数量',
`seckill_sort` int NULL DEFAULT NULL COMMENT '排序',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '秒杀活动商品关联' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sms_seckill_sku_relation
-- ----------------------------
INSERT INTO `sms_seckill_sku_relation` VALUES (1, 1, 186, 10, 100, 1, 1, '2021-03-07 20:22:01', '2021-03-07 20:22:03');
INSERT INTO `sms_seckill_sku_relation` VALUES (2, 2, 186, 10, 100, 1, 1, '2021-03-07 20:22:01', '2021-03-07 20:22:03');
INSERT INTO `sms_seckill_sku_relation` VALUES (3, 2, 187, 10, 100, 1, 1, '2021-03-07 20:22:01', '2021-03-07 20:22:03');
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
`branch_id` bigint NOT NULL COMMENT 'branch transaction id',
`xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'global transaction id',
`context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'undo_log context,such as serialization',
`rollback_info` longblob NOT NULL COMMENT 'rollback info',
`log_status` int NOT NULL COMMENT '0:normal status,1:defense status',
`log_created` datetime(6) NOT NULL COMMENT 'create datetime',
`log_modified` datetime(6) NOT NULL COMMENT 'modify datetime',
UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'AT transaction mode undo table' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of undo_log
-- ----------------------------
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -0,0 +1,115 @@
/*
*
* MySQL5.x版本
*/
use mall_ums;
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for ums_address
-- ----------------------------
DROP TABLE IF EXISTS `ums_address`;
CREATE TABLE `ums_address` (
`id` bigint(0) NOT NULL AUTO_INCREMENT,
`member_id` bigint(0) NULL DEFAULT NULL COMMENT '会员ID',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收货人姓名',
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收货人联系方式',
`province` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '',
`city` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '',
`area` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '',
`address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详细地址',
`zip_code` char(6) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮编',
`defaulted` tinyint(0) NULL DEFAULT NULL COMMENT '是否默认地址',
`gmt_create` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of ums_address
-- ----------------------------
INSERT INTO `ums_address` VALUES (3, 4, '花韦', '13151572876', '上海', '南京市', '雨花台区', '1号', NULL, 1, NULL, NULL);
INSERT INTO `ums_address` VALUES (4, 4, '花韦', '13151572876', '上海', '南京市', '雨花台区', '1号', NULL, 0, NULL, NULL);
INSERT INTO `ums_address` VALUES (5, 4, 'niuniu', '13151572870', '上海', '上海市', '浦东新区', '1号路1栋', NULL, 0, NULL, NULL);
INSERT INTO `ums_address` VALUES (6, 4, '123', '13150572890', '上海', '上海市', '浦东新区', '123', NULL, 0, NULL, NULL);
INSERT INTO `ums_address` VALUES (7, 4, '123', '13157282800', '上海', '上海市', '浦东新区', '13157282800', NULL, 0, NULL, NULL);
INSERT INTO `ums_address` VALUES (12, 21, '郝先瑞', '17621250365', '上海', '上海市', '浦东新区', '111111', NULL, NULL, '2021-03-22 21:56:58', '2021-03-22 21:56:58');
INSERT INTO `ums_address` VALUES (13, 21, '测试地址', '17621498765', '上海', '上海市', '浦东新区', '111', NULL, NULL, '2021-03-22 21:59:25', '2021-03-22 21:59:25');
INSERT INTO `ums_address` VALUES (14, 22, 'F', '15297828702', '上海', '上海市', '浦东新区', 'qqq', NULL, 1, '2021-03-22 22:12:15', '2021-03-22 22:12:15');
INSERT INTO `ums_address` VALUES (15, 25, '完全', '13415418395', '上海', '上海市', '浦东新区', '钉钉', NULL, NULL, '2021-03-31 14:22:16', '2021-03-31 14:22:16');
INSERT INTO `ums_address` VALUES (16, 31, '郝先瑞', '17612590365', '上海', '上海市', '浦东新区', '111', NULL, 1, '2021-04-14 23:37:46', '2021-04-14 23:37:46');
INSERT INTO `ums_address` VALUES (17, 32, '张三', '13721071025', '上海', '上海市', '浦东新区', '春秋北路', NULL, 1, '2021-04-14 23:46:39', '2021-04-14 23:46:39');
INSERT INTO `ums_address` VALUES (18, 34, 'zs', '13721071025', '上海', '上海市', '浦东新区', '江山大街', NULL, 1, '2021-04-20 01:00:49', '2021-06-04 00:57:59');
INSERT INTO `ums_address` VALUES (19, 35, '秦忠旺', '15589569011', '上海', '烟台市', '莱山区', '天合城40号楼402', NULL, 1, '2021-04-21 10:05:09', '2021-04-21 10:05:09');
INSERT INTO `ums_address` VALUES (20, 39, '郝先瑞', '17621590365', '上海', '上海市', '浦东新区', '111', NULL, 1, '2021-06-10 23:10:30', '2021-06-10 23:10:30');
-- ----------------------------
-- Table structure for ums_member
-- ----------------------------
DROP TABLE IF EXISTS `ums_member`;
CREATE TABLE `ums_member` (
`id` bigint(0) NOT NULL AUTO_INCREMENT,
`gender` tinyint(1) NULL DEFAULT NULL,
`nick_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`birthday` date NULL DEFAULT NULL,
`avatar_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`openid` char(28) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`session_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`status` tinyint(1) NULL DEFAULT 1,
`point` int(0) NULL DEFAULT 0 COMMENT '会员积分',
`deleted` tinyint(1) NULL DEFAULT 0,
`gmt_create` datetime(0) NULL DEFAULT NULL,
`gmt_modified` datetime(0) NULL DEFAULT NULL,
`balance` bigint(0) NULL DEFAULT 1000000000,
`city` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`country` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`language` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`province` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 41 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of ums_member
-- ----------------------------
INSERT INTO `ums_member` VALUES (2, 1, 'Flamesky', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eorwiaJcRPxKMNHgov0HGBRA8JODQrhw67x61FGEFwic2E2UlhXSKmQ455jqT5RIPsZjmpkdia0pyZdA/132', 'oEMah4qx8utBwve1_5U2bq4z9Ucw', NULL, 1, 0, 0, '2021-01-12 17:52:03', NULL, 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (3, 1, '非洲小白脸', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/PiajxSqBRaEIIs1glKcYOadLFibr2et98eXTADdicLUGrQqF8EtvicIu5e5TwOkuBAzIf8zEl0aYPJaDkfIHTOEWuQ/132', 'oH-MK0V-N4Lotq-kXIMAMjLdXdtY', NULL, 1, 0, 0, '2021-01-12 17:52:06', NULL, 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (4, 1, '花花的世界', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLxWhtkFhVKpfXib0BibMaIzeOAVCGVScnR5ibsibdENiaibjvnfy7AxeSSCTbn9IBvqMe1iaJ6BWTxIjZtg/132', 'oUBUG5lBhnnn-HBCF9mYMZbQv7A8', NULL, 1, 0, 0, '2021-01-12 17:52:09', '2021-02-24 22:43:41', 999680200, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (5, 1, '微尘', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/vNZqQTZRAia4sz17MJeeXeqhzaBbIEzEXGvgwG4l1KQg2mQAb3eB1q9HLnVJUo4u8OSNSv1seuqHxNPKyYicb4Dw/132', 'oZ75o5Kk-opj_ioVOj6vTO7-K0HM', NULL, 1, 0, 0, '2021-01-12 17:52:12', NULL, 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (6, 1, '大田', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIPhsrhOFictxk44ialrd4gZP6SyFmz4v2rHBZ3C72O0KsKQDTHlVBqtoSJ5uiaPAvD0t9F5VBjbruQw/132', 'oUBUG5m_9Gfa3bZmzP_tRNnX2vsg', NULL, 1, 0, 0, '2021-01-12 17:52:16', NULL, 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (7, 1, '看好路,向前走!', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/lZibiaShtph66QznR6yiarR7VsBkkjqGqPCwqDGD8WlaxnllcjG7SRiaX0DOujFXX8epAbyvFpHv03uI83xXFhdwZA/132', 'oUBUG5tj5LF8IjJDU2s1cqSdthdo', NULL, 1, 0, 0, NULL, NULL, 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (8, 1, 'CIAO', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/0d5kVzsH20SUXzPjbgamFn7DraWURYE7GJX15rMSVVDCeHN3kKW3ZozlUichS7Ch5jXADocWYW3jzBTj24oZVKw/132', 'oEeWo5IXHzfBqOQRI5mzSAfzoN2A', NULL, 1, 0, 0, NULL, NULL, 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (10, 1, '时光会咬人', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJyb4yl7JJCDKNX3yRwGjZ8fdXBTSVaW9cQIErvibmDR08m0vsrqWonxvRibrFxric0wqAKgVFa1IBlg/132', 'oUBUG5mQmw7d5XMwci78J6nDApA0', NULL, 1, 0, 0, '2021-01-30 17:22:18', NULL, 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (12, 1, 'I', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJGjiauanv1bnlJxKiaBQtalptWZUnCnE725cS8SjWoVAjLDuFLg3sKDfumhKuMs7NGHIc0gz8dNopQ/132', 'oUBUG5rX8pS8O__e3Li-owjcCWvg', NULL, 1, 0, 0, '2021-02-01 19:45:57', '2021-02-01 19:45:57', 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (14, 1, '77777777', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83ercp0SnvuleWloRkX8y5pibLHtg2OoKGECJH7udBoAoicsO87ibjmsUMiaDgJAJ8ibaiavGv1aEQicle8lMA/132', 'oUBUG5mOf9q54E6ob0kDC_cymoiw', NULL, 1, 0, 0, '2021-02-02 19:49:50', '2021-02-02 19:49:50', 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (15, 1, 'Max_Qiu', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIspnkuj3p0Ly4v6dIz5nClVLnNvIE5BVyd6ORaz6kLrwsxbicfqnG7ic4JpqWedpqk1lgx71QlHauQ/132', 'owHt46JBw46D1cCP8kyLefAoB8Ss', NULL, 1, 0, 0, '2021-02-04 12:08:16', '2021-02-04 12:08:16', 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (16, 0, '神经蛙', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q3auHgzwzM4Z6nX9KwiaJy2momCR0BLGnXF7ibI9WCJNTpqiaWDYS80624vRibsWr1muV2N8qM5wia0n5lSxOvttjNA/132', 'oUBUG5i0B3nUFejoqSlNwFlcJ_oc', NULL, 1, 0, 0, '2021-02-16 15:48:07', '2021-02-16 15:48:07', 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (17, 1, '自渡.', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/jAiavgRK2sHGs29TfZOlfGibBEpkq5btJQcVib2OoOibDTrsbC3d1R2LEtyEN48Cx8pQBZE174k13ribJamUkrD1ctg/132', 'oUBUG5l9OT1HaIZmOKJciVVaiZaA', NULL, 1, 0, 0, '2021-02-17 13:11:54', '2021-02-17 13:11:54', 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (18, 1, 'lxm', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKCMRO8bKSzryP9QD8DqOHyaVP8ibK41qpviaqNpTN3IDibiapjqLibibIZS7LrQTfiaNV6YNhYn8vzqcviaw/132', 'oEJcR0faCvzl8xF5fMKPoPBZQwB8', NULL, 1, 0, 0, '2021-02-20 16:47:34', '2021-02-20 16:47:34', 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (19, 1, '林育挺', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/pHghIy3YR0f1pyWuENRiaqic03azQnbW6YtjyWrfl0bXZjF4J9UA5QPG9jXUe8BymtngqJ0zPwnS0VSPLIBBJEiaw/132', 'oUBUG5oCupLtC1SaawIk9uotF66U', NULL, 1, 0, 0, '2021-02-20 22:12:13', '2021-02-20 22:12:13', 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (20, 1, '香蕉皮i', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/Z1BicLpfe2ygKc91pm1LhKdLKUtFPdyn4lSkVkA5Pn5iaI5lT3h4M4dFAanxGKEMfPIgOCZjxjiaIHLuqq9Fn5E0Q/132', 'oUBUG5soM0AUAgP8PM8e0M2X5qxs', NULL, 1, 0, 0, '2021-02-24 12:09:26', '2021-02-24 12:09:26', 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (22, 1, 'F', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/geyibXYyaoODjLy2aYP54WjUxYz71pwOMDrnRWBXibgh2gDr4hZuw5qiawic75oacEXYxRicykCRINube7MFd9ANicrw/132', 'oUBUG5glvFzDxwkFEK7MUsRcBqhI', NULL, 1, 0, 0, '2021-03-22 21:37:51', '2021-03-22 21:37:51', 999060500, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (23, 1, '蓝动', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/9cfWYQjJMKsplTQQLJqR3A75j9Hib44jHF0vIEJqfHC2ttfg0GCiaSzQbSQVVxrgicAJallo3eB2qsGyE1Z4RNYCQ/132', 'oUBUG5nOlD91HYvXRhCqKrMSWzUs', NULL, 1, 0, 0, '2021-03-23 17:35:03', '2021-03-23 17:35:03', 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (24, 1, '路亚小生', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/tnib4ZCXWGOznmtyoHBL5BFicYZWICNyic0EyPWk70kr9IWzHSCVdIqFKN2o7BxyuYaDib0ogmfpuMTBgo3pOibPt9A/132', 'oUBUG5l8zS6fstLbQh4GNf81w438', NULL, 1, 0, 0, '2021-03-24 12:06:23', '2021-03-24 12:06:23', 1000000000, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (25, 1, 'Alan', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/QohQ9hnZnxF2mJOM1RywBPqToNVicDpeF8KdXrwmtYnRyoWaBHk0R25T1wxzleCJV3Un8iappa70yn8fJmgGAZnQ/132', 'oUBUG5kQ2YvWcX7OIYpw8owuWGqE', NULL, 1, 0, 0, '2021-03-29 15:57:24', '2021-03-29 15:57:24', 999380300, NULL, NULL, NULL, NULL);
INSERT INTO `ums_member` VALUES (39, 1, '郝先瑞', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/J31cY2qVWviaOqhjPlr18VY5ic1SUvDESG1mQkicQfFugWibYe7VJIhYJBZYDBib0T4TJVhUOtiaW1TGkJRqIWd3K0dQ/132', 'oUBUG5hAB_8EMrSaqd2HjJQBFg74', 'dR9xGLsS+hr98pLqt621hw==', 1, 0, 0, '2021-06-10 01:55:41', '2021-06-10 02:04:31', 994999500, '浦东新区', '中国', 'zh_CN', '上海');
INSERT INTO `ums_member` VALUES (40, 1, '秋城', NULL, NULL, 'https://thirdwx.qlogo.cn/mmopen/vi_32/ajNVdqHZLLDfyM5iaYFwhzQ1Xv9zyA3bXDV42niazQlibiajdXba0YK4yAFFWIMY7vwfI1ny8Ej8pm0pmp7OkC2afg/132', 'oUBUG5oPQnarJi7g2mXE_svcHVeU', NULL, 1, 0, 0, '2021-06-19 16:57:51', '2021-06-19 16:57:51', 1000000000, '张家口', '中国', 'zh_CN', '河北');
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
`branch_id` bigint(0) NOT NULL COMMENT 'branch transaction id',
`xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'global transaction id',
`context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'undo_log context,such as serialization',
`rollback_info` longblob NOT NULL COMMENT 'rollback info',
`log_status` int(0) NOT NULL COMMENT '0:normal status,1:defense status',
`log_created` datetime(6) NOT NULL COMMENT 'create datetime',
`log_modified` datetime(6) NOT NULL COMMENT 'modify datetime',
UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'AT transaction mode undo table' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -0,0 +1,313 @@
/*
*
* MySQL5.x版本
*/
use youlai;
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称',
`parent_id` bigint NULL DEFAULT 0 COMMENT '父节点id',
`tree_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '父节点id路径',
`sort` int NULL DEFAULT 0 COMMENT '显示顺序',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '状态1-正常 0-禁用',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态1-删除 0-未删除',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_dept
-- ----------------------------
INSERT INTO `sys_dept` VALUES (1, '有来技术', 0, '0', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (2, '研发部门', 1, '0,1', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (3, '测试部门', 1, '0,1', 2, 1, 0, NULL, NULL);
-- ----------------------------
-- Table structure for sys_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '类型名称',
`code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '类型编码',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态0-正常 ,1-停用)',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `type_code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典类型表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_dict
-- ----------------------------
INSERT INTO `sys_dict` VALUES (1, '性别', 'gender', 1, NULL, '2019-12-06 19:03:32', '2021-02-08 14:58:01');
INSERT INTO `sys_dict` VALUES (2, '授权方式', 'grant_type', 1, NULL, '2020-10-17 08:09:50', '2021-01-31 09:48:24');
INSERT INTO `sys_dict` VALUES (3, '微服务列表', 'micro_service', 1, NULL, '2021-06-17 00:13:43', '2021-06-17 00:17:22');
INSERT INTO `sys_dict` VALUES (4, '请求方式', 'request_method', 1, NULL, '2021-06-17 00:18:07', '2021-06-17 00:18:07');
-- ----------------------------
-- Table structure for sys_dict_item
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_item`;
CREATE TABLE `sys_dict_item` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典项名称',
`value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典项值',
`dict_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典编码',
`sort` int NULL DEFAULT 0 COMMENT '排序',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态0 停用 1正常',
`defaulted` tinyint(1) NULL DEFAULT 0 COMMENT '是否默认0否 1是',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典数据表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_dict_item
-- ----------------------------
INSERT INTO `sys_dict_item` VALUES (1, '', '1', 'gender', 1, 1, 0, NULL, '2019-05-05 13:07:52', '2019-07-02 14:23:05');
INSERT INTO `sys_dict_item` VALUES (2, '', '2', 'gender', 2, 1, 0, NULL, '2019-04-19 11:33:00', '2019-07-02 14:23:05');
INSERT INTO `sys_dict_item` VALUES (3, '未知', '0', 'gender', 1, 1, 0, NULL, '2020-10-17 08:09:31', '2020-10-17 08:09:31');
INSERT INTO `sys_dict_item` VALUES (6, '密码模式', 'password', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:11:52', '2021-01-31 09:48:18');
INSERT INTO `sys_dict_item` VALUES (7, '授权码模式', 'authorization_code', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:12:15', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (8, '客户端模式', 'client_credentials', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:12:36', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (9, '刷新模式', 'refresh_token', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:12:57', '2021-01-08 17:33:12');
INSERT INTO `sys_dict_item` VALUES (10, '简化模式', 'implicit', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:13:23', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (11, '系统服务', 'youlai-admin', 'micro_service', 1, 1, 0, NULL, '2021-06-17 00:14:12', '2021-06-17 00:14:12');
INSERT INTO `sys_dict_item` VALUES (12, '会员服务', 'youlai-ums', 'micro_service', 2, 1, 0, NULL, '2021-06-17 00:15:06', '2021-06-17 00:15:06');
INSERT INTO `sys_dict_item` VALUES (13, '商品服务', 'youlai-pms', 'micro_service', 3, 1, 0, NULL, '2021-06-17 00:15:26', '2021-06-17 00:16:18');
INSERT INTO `sys_dict_item` VALUES (14, '订单服务', 'youlai-oms', 'micro_service', 4, 1, 0, NULL, '2021-06-17 00:15:40', '2021-06-17 00:16:10');
INSERT INTO `sys_dict_item` VALUES (15, '营销服务', 'youlai-sms', 'micro_service', 5, 1, 0, NULL, '2021-06-17 00:16:01', '2021-06-17 00:16:01');
INSERT INTO `sys_dict_item` VALUES (16, '不限', '*', 'request_method', 1, 1, 0, NULL, '2021-06-17 00:18:34', '2021-06-17 00:18:34');
INSERT INTO `sys_dict_item` VALUES (17, 'GET', 'GET', 'request_method', 2, 1, 0, NULL, '2021-06-17 00:18:55', '2021-06-17 00:18:55');
INSERT INTO `sys_dict_item` VALUES (18, 'POST', 'POST', 'request_method', 3, 1, 0, NULL, '2021-06-17 00:19:06', '2021-06-17 00:19:06');
INSERT INTO `sys_dict_item` VALUES (19, 'PUT', 'PUT', 'request_method', 4, 1, 0, NULL, '2021-06-17 00:19:17', '2021-06-17 00:19:17');
INSERT INTO `sys_dict_item` VALUES (20, 'DELETE', 'DELETE', 'request_method', 5, 1, 0, NULL, '2021-06-17 00:19:30', '2021-06-17 00:19:30');
INSERT INTO `sys_dict_item` VALUES (21, 'PATCH', 'PATCH', 'request_method', 6, 1, 0, NULL, '2021-06-17 00:19:42', '2021-06-17 00:19:42');
-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '菜单名称',
`parent_id` bigint NULL DEFAULT NULL COMMENT '父菜单ID',
`path` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '路由路径',
`component` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件路径',
`icon` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '菜单图标',
`sort` int NULL DEFAULT 0 COMMENT '排序',
`visible` tinyint(1) NULL DEFAULT 1 COMMENT '状态0-禁用 1-开启',
`redirect` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '跳转路径',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '菜单管理' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES (1, '系统管理', 0, '/system', 'Layout', 'table', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (2, '用户管理', 1, 'user', 'system/user/index', 'user', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (3, '角色管理', 1, 'role', 'system/role/index', 'peoples', 2, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (4, '菜单管理', 1, 'menu', 'system/menu/index', 'tree-table', 3, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (5, '部门管理', 1, 'dept', 'system/dept/index', 'tree', 4, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (6, '字典管理', 1, 'dict', 'system/dict/index', 'education', 5, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (7, '客户端管理', 1, 'client', 'system/client/index', 'tab', 6, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (9, '营销管理', 0, '/sms', 'Layout', 'number', 5, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (10, '广告管理', 9, 'advert', 'sms/advert/index', 'documentation', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (11, '商品管理', 0, '/pms', 'Layout', 'phone', 2, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (12, '商品列表', 11, 'goods', 'pms/goods/index', 'component', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (13, '订单管理', 0, '/oms', 'Layout', 'shopping', 3, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (14, '订单列表', 13, 'order', 'oms/order', 'component', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (15, '会员管理', 0, '/ums', 'Layout', 'user', 4, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (16, '会员列表', 15, 'user', 'ums/user/index', 'peoples', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (17, '品牌管理', 11, 'brand', 'pms/brand/index', 'component', 5, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (18, '商品分类', 11, 'category', 'pms/category/index', 'component', 3, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (19, '商品上架', 11, 'goods-detail', 'pms/goods/detail', 'component', 2, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
-- ----------------------------
-- Table structure for sys_oauth_client
-- ----------------------------
DROP TABLE IF EXISTS `sys_oauth_client`;
CREATE TABLE `sys_oauth_client` (
`client_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`resource_ids` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`client_secret` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`scope` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`authorized_grant_types` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`web_server_redirect_uri` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`authorities` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`access_token_validity` int NULL DEFAULT NULL,
`refresh_token_validity` int NULL DEFAULT NULL,
`additional_information` varchar(4096) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`autoapprove` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`client_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_oauth_client
-- ----------------------------
INSERT INTO `sys_oauth_client` VALUES ('client', 'youlai-admin,youlai-weapp,client', '123456', 'all', 'authorization_code,password,refresh_token,implicit', NULL, NULL, 3600, 7200, NULL, 'true');
INSERT INTO `sys_oauth_client` VALUES ('youlai-admin', 'youlai-admin,youlai-weapp,client', '123456', 'all', 'password,client_credentials,refresh_token,authorization_code,sms,wechat', NULL, '', 3600, 7200, NULL, 'true');
INSERT INTO `sys_oauth_client` VALUES ('youlai-weapp', 'youlai-admin,youlai-weapp,client', '123456', 'all', 'authorization_code,password,refresh_token,implicit', NULL, NULL, 3600, 7200, NULL, 'true');
-- ----------------------------
-- Table structure for sys_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_permission`;
CREATE TABLE `sys_permission` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限名称',
`menu_id` int NULL DEFAULT NULL COMMENT '菜单模块ID\r\n',
`url_perm` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'URL权限标识',
`btn_perm` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '按钮权限标识',
`gmt_create` datetime NULL DEFAULT NULL,
`gmt_modified` datetime NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `id`(`id`, `name`) USING BTREE,
INDEX `id_2`(`id`, `name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '权限表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_permission
-- ----------------------------
INSERT INTO `sys_permission` VALUES (1, '查看用户', 2, 'GET:/youlai-admin/api/v1/users/*', 'sys:user:view', '2021-02-02 14:16:07', '2021-06-16 22:25:24');
INSERT INTO `sys_permission` VALUES (2, '编辑用户', 2, 'PUT:/youlai-admin/users/*', 'sys:user:edit', '2021-06-16 16:19:44', '2021-06-16 23:36:53');
INSERT INTO `sys_permission` VALUES (3, '新增用户', 2, 'POST:/youlai-admin/api/v1/users', 'sys:user:add', '2021-06-16 23:36:37', '2021-06-16 23:37:03');
INSERT INTO `sys_permission` VALUES (4, '删除用户', 2, 'DELETE:/youlai-admin/api/v1/users/*', 'sys:user:delete', '2021-06-16 23:43:54', '2021-06-16 23:43:54');
INSERT INTO `sys_permission` VALUES (5, '路由列表', 4, 'GET:/youlai-admin/api/v1/menus/route', 'sys:route:query', NULL, NULL);
-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '角色名称',
`code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色编码',
`sort` int NULL DEFAULT NULL COMMENT '显示顺序',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '角色状态0-正常1-停用',
`deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除标识0-未删除1-已删除',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '更新时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'ROOT', 1, 1, 0, '2021-05-21 14:56:51', '2018-12-23 16:00:00');
INSERT INTO `sys_role` VALUES (2, '系统管理员', 'ADMIN', 2, 1, 0, '2021-03-25 12:39:54', '2018-12-23 16:00:00');
INSERT INTO `sys_role` VALUES (3, '访问游客', 'GUEST', 3, 1, 0, '2021-05-26 15:49:05', '2019-05-05 16:00:00');
-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
`role_id` bigint NOT NULL COMMENT '角色ID',
`menu_id` bigint NOT NULL COMMENT '菜单ID'
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO `sys_role_menu` VALUES (2, 1);
INSERT INTO `sys_role_menu` VALUES (2, 2);
INSERT INTO `sys_role_menu` VALUES (2, 3);
INSERT INTO `sys_role_menu` VALUES (2, 4);
INSERT INTO `sys_role_menu` VALUES (2, 5);
INSERT INTO `sys_role_menu` VALUES (2, 6);
INSERT INTO `sys_role_menu` VALUES (2, 7);
INSERT INTO `sys_role_menu` VALUES (2, 11);
INSERT INTO `sys_role_menu` VALUES (2, 19);
INSERT INTO `sys_role_menu` VALUES (2, 18);
INSERT INTO `sys_role_menu` VALUES (2, 17);
INSERT INTO `sys_role_menu` VALUES (2, 12);
INSERT INTO `sys_role_menu` VALUES (2, 13);
INSERT INTO `sys_role_menu` VALUES (2, 14);
INSERT INTO `sys_role_menu` VALUES (2, 15);
INSERT INTO `sys_role_menu` VALUES (2, 16);
INSERT INTO `sys_role_menu` VALUES (2, 9);
INSERT INTO `sys_role_menu` VALUES (2, 10);
-- ----------------------------
-- Table structure for sys_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_permission`;
CREATE TABLE `sys_role_permission` (
`role_id` int NULL DEFAULT NULL COMMENT '角色id',
`permission_id` int NULL DEFAULT NULL COMMENT '资源id',
INDEX `role_id`(`role_id`) USING BTREE,
INDEX `permission_id`(`permission_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色权限表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role_permission
-- ----------------------------
INSERT INTO `sys_role_permission` VALUES (2, 1);
INSERT INTO `sys_role_permission` VALUES (2, 2);
INSERT INTO `sys_role_permission` VALUES (2, 3);
INSERT INTO `sys_role_permission` VALUES (2, 5);
-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`id` int NOT NULL AUTO_INCREMENT,
`username` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
`nickname` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称',
`gender` tinyint(1) NULL DEFAULT 1 COMMENT '性别1-男 2-女',
`password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
`dept_id` int NULL DEFAULT NULL COMMENT '部门ID',
`avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户头像',
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系方式',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '用户状态1-正常 0-禁用',
`email` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户邮箱',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除标识0-未删除1-已删除',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `login_name`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1, 'root', '有来技术', 0, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', NULL, '', '17621590365', 1, 'youlaitech@163.com', 0, NULL, NULL);
INSERT INTO `sys_user` VALUES (2, 'admin', '系统管理员', 1, '$2a$10$yJSqqr6sTxNuYtA6EKcVUe2I4USFCzJ29sNcRrBvtAkSYcNg5ydQ6', 2, 'https://gitee.com/haoxr/image/raw/master/20210605215800.png', '17621210366', 1, 'youlaitech@163.com', 0, '2019-10-10 13:41:22', '2021-06-06 23:41:35');
INSERT INTO `sys_user` VALUES (3, 'test', '测试小用户', 1, '$2a$10$MPJkNw.hKT/fZOgwYP8q9eu/rFJJDsNov697AmdkHNJkpjIpVSw2q', 3, 'https://gitee.com/haoxr/image/raw/master/20210605215800.png', '17621210366', 1, 'youlaitech@163.com', 0, '2021-06-05 01:31:29', '2021-06-05 01:31:29');
-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
`user_id` int NOT NULL COMMENT '用户ID',
`role_id` int NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`, `role_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户和角色关联表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO `sys_user_role` VALUES (1, 1);
INSERT INTO `sys_user_role` VALUES (2, 2);
INSERT INTO `sys_user_role` VALUES (3, 3);
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -0,0 +1,25 @@
/*
*
* MySQL8.x版本
*/
-- ----------------------------
-- 系统管理数据库
-- ----------------------------
CREATE DATABASE IF NOT EXISTS youlai DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;
-- ----------------------------
-- 商城会员数据库
-- ----------------------------
CREATE DATABASE IF NOT EXISTS mall_ums DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;
-- ----------------------------
-- 商城商品数据库
-- ----------------------------
CREATE DATABASE IF NOT EXISTS mall_pms DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;
-- ----------------------------
-- 商城订单数据库
-- ----------------------------
CREATE DATABASE IF NOT EXISTS mall_oms DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;
-- ----------------------------
-- 商城营销数据库
-- ----------------------------
CREATE DATABASE IF NOT EXISTS mall_sms DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;

View File

@ -0,0 +1,290 @@
/*
Navicat Premium Data Transfer
Source Server : www.youlai.tech
Source Server Type : MySQL
Source Server Version : 80023
Source Host : www.youlai.tech:3306
Source Schema : mall_oms
Target Server Type : MySQL
Target Server Version : 80023
File Encoding : 65001
Date: 28/08/2021 14:57:05
*/
use mall_oms;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for oms_order
-- ----------------------------
DROP TABLE IF EXISTS `oms_order`;
CREATE TABLE `oms_order` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_sn` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '订单号',
`total_amount` bigint NOT NULL DEFAULT 0 COMMENT '订单总额(分)',
`total_quantity` int NOT NULL DEFAULT 0 COMMENT '商品总数',
`source_type` tinyint NOT NULL DEFAULT 1 COMMENT '订单来源[0->PC订单1->APP订单]',
`status` int NOT NULL DEFAULT 101 COMMENT '订单状态:\r\n101->待付款;\r\n102->用户取消;\r\n103->系统取消;\r\n201->已付款;\r\n202->申请退款;\r\n203->已退款;\r\n301->待发货;\r\n401->已发货;\r\n501->用户收货;\r\n502->系统收货;\r\n901->已完成;',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '订单备注',
`member_id` bigint NOT NULL DEFAULT 0 COMMENT '会员id',
`coupon_id` bigint NOT NULL DEFAULT 0 COMMENT '使用的优惠券',
`coupon_amount` bigint NOT NULL DEFAULT 0 COMMENT '优惠券抵扣金额(分)',
`freight_amount` bigint NOT NULL DEFAULT 0 COMMENT '运费金额(分)',
`pay_amount` bigint NOT NULL DEFAULT 0 COMMENT '应付总额(分)',
`pay_time` datetime NULL DEFAULT NULL COMMENT '支付时间',
`pay_type` tinyint NULL DEFAULT NULL COMMENT '支付方式【1->微信jsapi2->支付宝3->余额; 4->微信app',
`out_trade_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '微信支付等第三方支付平台的商户订单号',
`transaction_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '微信支付订单号',
`out_refund_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商户退款单号',
`refund_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '微信退款单号',
`delivery_time` datetime NULL DEFAULT NULL COMMENT '发货时间',
`receive_time` datetime NULL DEFAULT NULL COMMENT '确认收货时间',
`comment_time` datetime NULL DEFAULT NULL COMMENT '评价时间',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `index_order_sn`(`order_sn`) USING BTREE COMMENT '订单号唯一索引',
UNIQUE INDEX `index_otn`(`out_trade_no`) USING BTREE COMMENT '商户订单号唯一索引',
UNIQUE INDEX `index_ti`(`transaction_id`) USING BTREE COMMENT '商户支付单号唯一索引',
UNIQUE INDEX `index_orn`(`out_refund_no`) USING BTREE COMMENT '商户退款单号唯一索引',
UNIQUE INDEX `index_ri`(`refund_id`) USING BTREE COMMENT '退款单号唯一索引'
) ENGINE = InnoDB AUTO_INCREMENT = 1351548262424821949 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单详情表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order
-- ----------------------------
INSERT INTO `oms_order` VALUES (1351548262424821940, '20210815300000009', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-15 12:38:02', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 12:38:02', '2021-08-15 12:38:02');
INSERT INTO `oms_order` VALUES (1351548262424821941, '20210815300000010', 300, 1, 1, 201, '', 39, 0, 0, 0, 300, '2021-08-15 21:34:00', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 21:33:56', '2021-08-15 21:34:00');
INSERT INTO `oms_order` VALUES (1351548262424821942, '20210815300000011', 100, 1, 1, 201, '', 4, 0, 0, 0, 100, '2021-08-15 21:34:16', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 21:34:10', '2021-08-15 21:34:16');
INSERT INTO `oms_order` VALUES (1351548262424821943, '20210815300000012', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-15 21:44:02', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 21:44:01', '2021-08-15 21:44:02');
INSERT INTO `oms_order` VALUES (1351548262424821944, '20210815300000013', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-15 21:45:27', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 21:45:21', '2021-08-15 21:45:27');
INSERT INTO `oms_order` VALUES (1351548262424821945, '20210815300000014', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-15 22:00:38', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-15 22:00:36', '2021-08-15 22:00:38');
INSERT INTO `oms_order` VALUES (1351548262424821948, '20210816300000002', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-16 23:18:17', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-16 23:18:14', '2021-08-16 23:18:17');
INSERT INTO `oms_order` VALUES (1351548262424821949, '20210828300000009', 100, 1, 1, 201, '', 39, 0, 0, 0, 100, '2021-08-28 00:43:59', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2021-08-28 00:43:55', NULL);
-- ----------------------------
-- Table structure for oms_order_delivery
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_delivery`;
CREATE TABLE `oms_order_delivery` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint NOT NULL COMMENT '订单id',
`delivery_company` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '物流公司(配送方式)',
`delivery_sn` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '物流单号',
`receiver_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '收货人姓名',
`receiver_phone` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '收货人电话',
`receiver_post_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '收货人邮编',
`receiver_province` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '省份/直辖市',
`receiver_city` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '城市',
`receiver_region` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '',
`receiver_detail_address` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '详细地址',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '备注',
`delivery_status` tinyint NULL DEFAULT 0 COMMENT '物流状态【0->运输中1->已收货】',
`delivery_time` datetime NULL DEFAULT NULL COMMENT '发货时间',
`receive_time` datetime NULL DEFAULT NULL COMMENT '确认收货时间',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单物流记录表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order_delivery
-- ----------------------------
-- ----------------------------
-- Table structure for oms_order_item
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_item`;
CREATE TABLE `oms_order_item` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint NOT NULL COMMENT 'order_id',
`sku_id` bigint NOT NULL DEFAULT 0 COMMENT '商品sku id',
`sku_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品sku编号',
`sku_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品sku名字',
`sku_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品sku图片',
`sku_price` bigint NOT NULL DEFAULT 0 COMMENT '商品sku价格(分)',
`sku_quantity` int NOT NULL DEFAULT 0 COMMENT '商品购买的数量',
`sku_total_price` bigint NOT NULL DEFAULT 0 COMMENT '商品sku总价格(分)',
`spu_id` bigint NOT NULL DEFAULT 0 COMMENT 'spu_id',
`spu_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'spu_name',
`spu_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'spu_pic',
`brand_id` bigint NOT NULL DEFAULT 0 COMMENT '品牌id',
`brand_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '品牌名称',
`category_id` bigint NOT NULL DEFAULT 0 COMMENT '商品分类id',
`category_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品分类名称',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_order_id`(`order_id`) USING BTREE COMMENT '订单id索引'
) ENGINE = InnoDB AUTO_INCREMENT = 203 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单商品信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order_item
-- ----------------------------
INSERT INTO `oms_order_item` VALUES (128, 1351548262424821882, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-22 23:34:46', '2021-03-22 23:34:46');
INSERT INTO `oms_order_item` VALUES (129, 1351548262424821883, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 01:03:47', '2021-03-23 01:03:47');
INSERT INTO `oms_order_item` VALUES (130, 1351548262424821884, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-23 01:10:17', '2021-03-23 01:10:17');
INSERT INTO `oms_order_item` VALUES (131, 1351548262424821885, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 02:21:27', '2021-03-23 02:21:27');
INSERT INTO `oms_order_item` VALUES (132, 1351548262424821886, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-23 06:37:27', '2021-03-23 06:37:27');
INSERT INTO `oms_order_item` VALUES (133, 1351548262424821887, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 07:02:27', '2021-03-23 07:02:27');
INSERT INTO `oms_order_item` VALUES (134, 1351548262424821888, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-23 07:31:43', '2021-03-23 07:31:43');
INSERT INTO `oms_order_item` VALUES (135, 1351548262424821889, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-23 18:55:41', '2021-03-23 18:55:41');
INSERT INTO `oms_order_item` VALUES (136, 1351548262424821890, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-03-25 19:02:51', '2021-03-25 19:02:51');
INSERT INTO `oms_order_item` VALUES (137, 1351548262424821891, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-29 15:57:45', '2021-03-29 15:57:45');
INSERT INTO `oms_order_item` VALUES (138, 1351548262424821892, 186, '1614505517559', '测试手机1 黑 6+128 ', 'http://a.youlai.store:9000/default/9715dde8c35c429b8c56cbe800ebd205.jpg', 299900, 1, 299900, 0, '', '', 0, '', 0, '', 0, '2021-03-29 16:02:46', '2021-03-29 16:02:46');
INSERT INTO `oms_order_item` VALUES (139, 1351548262424821893, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-03-31 14:22:33', '2021-03-31 14:22:33');
INSERT INTO `oms_order_item` VALUES (140, 1351548262424821894, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.store:9000/default/37729cd58065419f84b15f44b0e4f27f.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-04-14 22:59:43', '2021-04-14 22:59:43');
INSERT INTO `oms_order_item` VALUES (141, 1351548262424821895, 192, '1614505936511', '测试手机2 黑 8+256 ', 'http://a.youlai.tech:9000/default/3e369c91377a4c9f9eb33f66a6dd6906.jpg', 199900, 1, 199900, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:03:21', '2021-04-14 23:03:21');
INSERT INTO `oms_order_item` VALUES (142, 1351548262424821896, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:33:48', '2021-04-14 23:33:48');
INSERT INTO `oms_order_item` VALUES (143, 1351548262424821897, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:38:15', '2021-04-14 23:38:15');
INSERT INTO `oms_order_item` VALUES (144, 1351548262424821898, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:38:31', '2021-04-14 23:38:31');
INSERT INTO `oms_order_item` VALUES (145, 1351548262424821899, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 2, 319800, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:42:47', '2021-04-14 23:42:47');
INSERT INTO `oms_order_item` VALUES (146, 1351548262424821900, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 3, 479700, 0, '', '', 0, '', 0, '', 0, '2021-04-14 23:48:04', '2021-04-14 23:48:04');
INSERT INTO `oms_order_item` VALUES (147, 1351548262424821901, 190, '1614505936507', '测试手机2 黑 4+64 ', 'http://a.youlai.tech:9000/default/c9f6f4f2e4de46f78d9c7a87d25948e1.jpg', 159900, 1, 159900, 0, '', '', 0, '', 0, '', 0, '2021-04-16 16:18:27', '2021-04-16 16:18:27');
INSERT INTO `oms_order_item` VALUES (150, 1351548262424821904, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:20:33', '2021-06-11 00:20:33');
INSERT INTO `oms_order_item` VALUES (151, 1351548262424821905, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:24:07', '2021-06-11 00:24:07');
INSERT INTO `oms_order_item` VALUES (152, 1351548262424821906, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:26:16', '2021-06-11 00:26:16');
INSERT INTO `oms_order_item` VALUES (153, 1351548262424821907, 232, '1622008618852', '名称 红色 l ', '', 200, 1, 200, 0, '', '', 0, '', 0, '', 0, '2021-06-11 00:42:43', '2021-06-11 00:42:43');
INSERT INTO `oms_order_item` VALUES (154, 1351548262424821908, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-11 07:58:04', '2021-06-11 07:58:04');
INSERT INTO `oms_order_item` VALUES (155, 1351548262424821909, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-11 08:35:11', '2021-06-11 08:35:11');
INSERT INTO `oms_order_item` VALUES (156, 1351548262424821909, 244, '1623369301480', '测试合约机 蓝 12+256g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-11 08:35:11', '2021-06-11 08:35:11');
INSERT INTO `oms_order_item` VALUES (157, 1351548262424821910, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, '2021-06-12 14:16:13', '2021-06-12 14:16:13');
INSERT INTO `oms_order_item` VALUES (158, 1351548262424821911, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 2, 1999800, 0, '', '', 0, '', 0, '', 0, '2021-06-17 08:48:45', '2021-06-17 08:48:45');
INSERT INTO `oms_order_item` VALUES (163, 1351548262424821918, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 2, 1999800, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (164, 1351548262424821919, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 1, 999900, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (165, 1351548262424821920, 236, '1623369301480', '测试合约机 黑 6+64g ', 'http://a.youlai.tech:9000/default/c6e941103d8841acaf2f3f7356e11686.jpg', 999900, 2, 1999800, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (166, 1351548262424821921, 197, '1616310848932', '测试衣服1 白 M ', 'http://a.youlai.store:9000/default/063350d473a64ee7857e91841add1177.jpg', 29900, 1, 29900, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (167, 1351548262424821922, 197, '1616310848932', '测试衣服1 白 M ', 'http://a.youlai.store:9000/default/063350d473a64ee7857e91841add1177.jpg', 29900, 4, 119600, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (168, 1351548262424821923, 245, '1626080416010', 'huawei mate40pro 12 2 3 ', '', 609900, 1, 609900, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (169, 1351548262424821924, 245, '1626080416010', 'huawei mate40pro 12 2 3 ', '', 609900, 2, 1219800, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (170, 1351548262424821925, 245, '1626080416010', 'huawei mate40pro 12 2 3 ', '', 609900, 2, 1219800, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
INSERT INTO `oms_order_item` VALUES (171, 1351548262424821927, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-13 00:25:33', '2021-08-13 00:25:33');
INSERT INTO `oms_order_item` VALUES (172, 1351548262424821928, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-13 00:29:25', '2021-08-13 00:29:25');
INSERT INTO `oms_order_item` VALUES (173, 1351548262424821912, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-13 22:45:19', '2021-08-13 22:45:19');
INSERT INTO `oms_order_item` VALUES (174, 1351548262424821913, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-13 23:37:42', '2021-08-13 23:37:42');
INSERT INTO `oms_order_item` VALUES (175, 1351548262424821914, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 00:17:19', '2021-08-14 00:17:19');
INSERT INTO `oms_order_item` VALUES (176, 1351548262424821914, 291, '1', '', 'http://a.youlai.tech:9000/default/fb3f1be8aae644f497255f29aa51c641.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 00:17:19', '2021-08-14 00:17:19');
INSERT INTO `oms_order_item` VALUES (177, 1351548262424821915, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 01:24:26', '2021-08-14 01:24:26');
INSERT INTO `oms_order_item` VALUES (178, 1351548262424821916, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 17:24:13', '2021-08-14 17:24:13');
INSERT INTO `oms_order_item` VALUES (179, 1351548262424821917, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 17:30:19', '2021-08-14 17:30:19');
INSERT INTO `oms_order_item` VALUES (180, 1351548262424821918, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 18:58:28', '2021-08-14 18:58:28');
INSERT INTO `oms_order_item` VALUES (181, 1351548262424821919, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 2, 200, 0, '', '', 0, '', 0, '', 0, '2021-08-14 19:01:46', '2021-08-14 19:01:46');
INSERT INTO `oms_order_item` VALUES (182, 1351548262424821921, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 21:41:42', '2021-08-14 21:41:42');
INSERT INTO `oms_order_item` VALUES (183, 1351548262424821922, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 22:32:39', '2021-08-14 22:32:39');
INSERT INTO `oms_order_item` VALUES (184, 1351548262424821923, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 22:35:14', '2021-08-14 22:35:14');
INSERT INTO `oms_order_item` VALUES (185, 1351548262424821924, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 22:38:04', '2021-08-14 22:38:04');
INSERT INTO `oms_order_item` VALUES (186, 1351548262424821925, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-14 23:14:42', '2021-08-14 23:14:42');
INSERT INTO `oms_order_item` VALUES (187, 1351548262424821926, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 00:42:26', '2021-08-15 00:42:26');
INSERT INTO `oms_order_item` VALUES (188, 1351548262424821927, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 00:46:45', '2021-08-15 00:46:45');
INSERT INTO `oms_order_item` VALUES (189, 1351548262424821928, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 00:50:57', '2021-08-15 00:50:57');
INSERT INTO `oms_order_item` VALUES (190, 1351548262424821929, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 00:54:41', '2021-08-15 00:54:41');
INSERT INTO `oms_order_item` VALUES (191, 1351548262424821930, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 01:00:50', '2021-08-15 01:00:50');
INSERT INTO `oms_order_item` VALUES (192, 1351548262424821931, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 09:24:03', '2021-08-15 09:24:03');
INSERT INTO `oms_order_item` VALUES (193, 1351548262424821932, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 09:24:14', '2021-08-15 09:24:14');
INSERT INTO `oms_order_item` VALUES (194, 1351548262424821933, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 12:23:37', '2021-08-15 12:23:37');
INSERT INTO `oms_order_item` VALUES (195, 1351548262424821940, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 12:38:02', '2021-08-15 12:38:02');
INSERT INTO `oms_order_item` VALUES (196, 1351548262424821941, 331, '4', '黑色 8+256G 套餐一 ', '', 300, 1, 300, 0, '', '', 0, '', 0, '', 0, '2021-08-15 21:33:56', '2021-08-15 21:33:56');
INSERT INTO `oms_order_item` VALUES (197, 1351548262424821942, 308, '1', '123 1233 ', '', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 21:34:10', '2021-08-15 21:34:10');
INSERT INTO `oms_order_item` VALUES (198, 1351548262424821943, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 21:44:01', '2021-08-15 21:44:01');
INSERT INTO `oms_order_item` VALUES (199, 1351548262424821944, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 21:45:22', '2021-08-15 21:45:22');
INSERT INTO `oms_order_item` VALUES (200, 1351548262424821945, 328, '1', '黑色 6+128G 标准 ', '', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-15 22:00:37', '2021-08-15 22:00:37');
INSERT INTO `oms_order_item` VALUES (201, 1351548262424821946, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-16 17:05:17', '2021-08-16 17:05:17');
INSERT INTO `oms_order_item` VALUES (202, 1351548262424821948, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, '2021-08-16 23:18:16', '2021-08-16 23:18:16');
INSERT INTO `oms_order_item` VALUES (203, 1351548262424821949, 300, '1', 'tid_1_1|tid_2_1|tid_3_', 'http://a.youlai.tech:9000/default/852f076dd41d4e199c969289838149fa.jpg', 100, 1, 100, 0, '', '', 0, '', 0, '', 0, NULL, NULL);
-- ----------------------------
-- Table structure for oms_order_log
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_log`;
CREATE TABLE `oms_order_log` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint NOT NULL COMMENT '订单id',
`user` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作人[用户;系统;后台管理员]',
`detail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作详情',
`order_status` int NULL DEFAULT NULL COMMENT '操作时订单状态',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '备注',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 52 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单操作历史记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order_log
-- ----------------------------
-- ----------------------------
-- Table structure for oms_order_pay
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_pay`;
CREATE TABLE `oms_order_pay` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_id` bigint NOT NULL COMMENT '订单id',
`pay_sn` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '支付流水号',
`pay_amount` bigint NOT NULL DEFAULT 0 COMMENT '应付总额(分)',
`pay_time` datetime NULL DEFAULT NULL COMMENT '支付时间',
`pay_type` tinyint NULL DEFAULT NULL COMMENT '支付方式【1->支付宝2->微信3->银联; 4->货到付款;】',
`pay_status` tinyint NULL DEFAULT NULL COMMENT '支付状态',
`confirm_time` datetime NULL DEFAULT NULL COMMENT '确认时间',
`callback_content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '回调内容',
`callback_time` datetime NULL DEFAULT NULL COMMENT '回调时间',
`pay_subject` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '交易内容',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '支付信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order_pay
-- ----------------------------
-- ----------------------------
-- Table structure for oms_order_setting
-- ----------------------------
DROP TABLE IF EXISTS `oms_order_setting`;
CREATE TABLE `oms_order_setting` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`flash_order_overtime` int NULL DEFAULT NULL COMMENT '秒杀订单超时关闭时间(分)',
`normal_order_overtime` int NULL DEFAULT NULL COMMENT '正常订单超时时间(分)',
`confirm_overtime` int NULL DEFAULT NULL COMMENT '发货后自动确认收货时间(天)',
`finish_overtime` int NULL DEFAULT NULL COMMENT '自动完成交易时间,不能申请退货(天)',
`comment_overtime` int NULL DEFAULT NULL COMMENT '订单完成后自动好评时间(天)',
`member_level` tinyint NULL DEFAULT NULL COMMENT '会员等级【0-不限会员等级,全部通用;其他-对应的其他会员等级】',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常1->已删除】',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单配置信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of oms_order_setting
-- ----------------------------
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
`branch_id` bigint NOT NULL COMMENT 'branch transaction id',
`xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'global transaction id',
`context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'undo_log context,such as serialization',
`rollback_info` longblob NOT NULL COMMENT 'rollback info',
`log_status` int NOT NULL COMMENT '0:normal status,1:defense status',
`log_created` datetime(6) NOT NULL COMMENT 'create datetime',
`log_modified` datetime(6) NOT NULL COMMENT 'modify datetime',
UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'AT transaction mode undo table' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of undo_log
-- ----------------------------
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -13,6 +13,7 @@
Date: 13/08/2021 23:39:20
*/
use mall_pms;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

View File

@ -13,6 +13,7 @@
Date: 12/07/2021 21:16:15
*/
use mall_sms;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

View File

@ -13,6 +13,7 @@
Date: 20/06/2021 00:52:09
*/
use mall_ums;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

View File

@ -0,0 +1,312 @@
/*
*
* MySQL8.x版本
*/
use youlai;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '部门名称',
`parent_id` bigint NULL DEFAULT 0 COMMENT '父节点id',
`tree_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '父节点id路径',
`sort` int NULL DEFAULT 0 COMMENT '显示顺序',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '状态1-正常 0-禁用',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态1-删除 0-未删除',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_dept
-- ----------------------------
INSERT INTO `sys_dept` VALUES (1, '有来技术', 0, '0', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (2, '研发部门', 1, '0,1', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (3, '测试部门', 1, '0,1', 2, 1, 0, NULL, NULL);
-- ----------------------------
-- Table structure for sys_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ',
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型名称',
`code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型编码',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态0-正常 ,1-停用)',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `type_code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典类型表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_dict
-- ----------------------------
INSERT INTO `sys_dict` VALUES (1, '性别', 'gender', 1, NULL, '2019-12-06 19:03:32', '2021-02-08 14:58:01');
INSERT INTO `sys_dict` VALUES (2, '授权方式', 'grant_type', 1, NULL, '2020-10-17 08:09:50', '2021-01-31 09:48:24');
INSERT INTO `sys_dict` VALUES (3, '微服务列表', 'micro_service', 1, NULL, '2021-06-17 00:13:43', '2021-06-17 00:17:22');
INSERT INTO `sys_dict` VALUES (4, '请求方式', 'request_method', 1, NULL, '2021-06-17 00:18:07', '2021-06-17 00:18:07');
-- ----------------------------
-- Table structure for sys_dict_item
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_item`;
CREATE TABLE `sys_dict_item` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字典项名称',
`value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字典项值',
`dict_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字典编码',
`sort` int NULL DEFAULT 0 COMMENT '排序',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态0 停用 1正常',
`defaulted` tinyint(1) NULL DEFAULT 0 COMMENT '是否默认0否 1是',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典数据表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_dict_item
-- ----------------------------
INSERT INTO `sys_dict_item` VALUES (1, '', '1', 'gender', 1, 1, 0, NULL, '2019-05-05 13:07:52', '2019-07-02 14:23:05');
INSERT INTO `sys_dict_item` VALUES (2, '', '2', 'gender', 2, 1, 0, NULL, '2019-04-19 11:33:00', '2019-07-02 14:23:05');
INSERT INTO `sys_dict_item` VALUES (3, '未知', '0', 'gender', 1, 1, 0, NULL, '2020-10-17 08:09:31', '2020-10-17 08:09:31');
INSERT INTO `sys_dict_item` VALUES (6, '密码模式', 'password', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:11:52', '2021-01-31 09:48:18');
INSERT INTO `sys_dict_item` VALUES (7, '授权码模式', 'authorization_code', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:12:15', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (8, '客户端模式', 'client_credentials', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:12:36', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (9, '刷新模式', 'refresh_token', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:12:57', '2021-01-08 17:33:12');
INSERT INTO `sys_dict_item` VALUES (10, '简化模式', 'implicit', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:13:23', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (11, '系统服务', 'youlai-admin', 'micro_service', 1, 1, 0, NULL, '2021-06-17 00:14:12', '2021-06-17 00:14:12');
INSERT INTO `sys_dict_item` VALUES (12, '会员服务', 'youlai-ums', 'micro_service', 2, 1, 0, NULL, '2021-06-17 00:15:06', '2021-06-17 00:15:06');
INSERT INTO `sys_dict_item` VALUES (13, '商品服务', 'youlai-pms', 'micro_service', 3, 1, 0, NULL, '2021-06-17 00:15:26', '2021-06-17 00:16:18');
INSERT INTO `sys_dict_item` VALUES (14, '订单服务', 'youlai-oms', 'micro_service', 4, 1, 0, NULL, '2021-06-17 00:15:40', '2021-06-17 00:16:10');
INSERT INTO `sys_dict_item` VALUES (15, '营销服务', 'youlai-sms', 'micro_service', 5, 1, 0, NULL, '2021-06-17 00:16:01', '2021-06-17 00:16:01');
INSERT INTO `sys_dict_item` VALUES (16, '不限', '*', 'request_method', 1, 1, 0, NULL, '2021-06-17 00:18:34', '2021-06-17 00:18:34');
INSERT INTO `sys_dict_item` VALUES (17, 'GET', 'GET', 'request_method', 2, 1, 0, NULL, '2021-06-17 00:18:55', '2021-06-17 00:18:55');
INSERT INTO `sys_dict_item` VALUES (18, 'POST', 'POST', 'request_method', 3, 1, 0, NULL, '2021-06-17 00:19:06', '2021-06-17 00:19:06');
INSERT INTO `sys_dict_item` VALUES (19, 'PUT', 'PUT', 'request_method', 4, 1, 0, NULL, '2021-06-17 00:19:17', '2021-06-17 00:19:17');
INSERT INTO `sys_dict_item` VALUES (20, 'DELETE', 'DELETE', 'request_method', 5, 1, 0, NULL, '2021-06-17 00:19:30', '2021-06-17 00:19:30');
INSERT INTO `sys_dict_item` VALUES (21, 'PATCH', 'PATCH', 'request_method', 6, 1, 0, NULL, '2021-06-17 00:19:42', '2021-06-17 00:19:42');
-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '菜单名称',
`parent_id` bigint NULL DEFAULT NULL COMMENT '父菜单ID',
`path` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '路由路径',
`component` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组件路径',
`icon` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '菜单图标',
`sort` int NULL DEFAULT 0 COMMENT '排序',
`visible` tinyint(1) NULL DEFAULT 1 COMMENT '状态0-禁用 1-开启',
`redirect` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '跳转路径',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单管理' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES (1, '系统管理', 0, '/system', 'Layout', 'table', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (2, '用户管理', 1, 'user', 'system/user/index', 'user', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (3, '角色管理', 1, 'role', 'system/role/index', 'peoples', 2, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (4, '菜单管理', 1, 'menu', 'system/menu/index', 'tree-table', 3, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (5, '部门管理', 1, 'dept', 'system/dept/index', 'tree', 4, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (6, '字典管理', 1, 'dict', 'system/dict/index', 'education', 5, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (7, '客户端管理', 1, 'client', 'system/client/index', 'tab', 6, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (9, '营销管理', 0, '/sms', 'Layout', 'number', 5, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (10, '广告管理', 9, 'advert', 'sms/advert/index', 'documentation', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (11, '商品管理', 0, '/pms', 'Layout', 'phone', 2, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (12, '商品列表', 11, 'goods', 'pms/goods/index', 'component', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (13, '订单管理', 0, '/oms', 'Layout', 'shopping', 3, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (14, '订单列表', 13, 'order', 'oms/order', 'component', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (15, '会员管理', 0, '/ums', 'Layout', 'user', 4, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (16, '会员列表', 15, 'user', 'ums/user/index', 'peoples', 1, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (17, '品牌管理', 11, 'brand', 'pms/brand/index', 'component', 5, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (18, '商品分类', 11, 'category', 'pms/category/index', 'component', 3, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
INSERT INTO `sys_menu` VALUES (19, '商品上架', 11, 'goods-detail', 'pms/goods/detail', 'component', 2, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
-- ----------------------------
-- Table structure for sys_oauth_client
-- ----------------------------
DROP TABLE IF EXISTS `sys_oauth_client`;
CREATE TABLE `sys_oauth_client` (
`client_id` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`resource_ids` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`client_secret` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`scope` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`authorized_grant_types` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`web_server_redirect_uri` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`authorities` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`access_token_validity` int NULL DEFAULT NULL,
`refresh_token_validity` int NULL DEFAULT NULL,
`additional_information` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`autoapprove` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`client_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_oauth_client
-- ----------------------------
INSERT INTO `sys_oauth_client` VALUES ('client', 'youlai-admin,youlai-weapp,client', '123456', 'all', 'authorization_code,password,refresh_token,implicit', NULL, NULL, 3600, 7200, NULL, 'true');
INSERT INTO `sys_oauth_client` VALUES ('youlai-admin', 'youlai-admin,youlai-weapp,client', '123456', 'all', 'password,client_credentials,refresh_token,authorization_code,sms,wechat', NULL, '', 3600, 7200, NULL, 'true');
INSERT INTO `sys_oauth_client` VALUES ('youlai-weapp', 'youlai-admin,youlai-weapp,client', '123456', 'all', 'authorization_code,password,refresh_token,implicit', NULL, NULL, 3600, 7200, NULL, 'true');
-- ----------------------------
-- Table structure for sys_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_permission`;
CREATE TABLE `sys_permission` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限名称',
`menu_id` int NULL DEFAULT NULL COMMENT '菜单模块ID\r\n',
`url_perm` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'URL权限标识',
`btn_perm` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '按钮权限标识',
`gmt_create` datetime NULL DEFAULT NULL,
`gmt_modified` datetime NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `id`(`id`, `name`) USING BTREE,
INDEX `id_2`(`id`, `name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '权限表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_permission
-- ----------------------------
INSERT INTO `sys_permission` VALUES (1, '查看用户', 2, 'GET:/youlai-admin/api/v1/users/*', 'sys:user:view', '2021-02-02 14:16:07', '2021-06-16 22:25:24');
INSERT INTO `sys_permission` VALUES (2, '编辑用户', 2, 'PUT:/youlai-admin/users/*', 'sys:user:edit', '2021-06-16 16:19:44', '2021-06-16 23:36:53');
INSERT INTO `sys_permission` VALUES (3, '新增用户', 2, 'POST:/youlai-admin/api/v1/users', 'sys:user:add', '2021-06-16 23:36:37', '2021-06-16 23:37:03');
INSERT INTO `sys_permission` VALUES (4, '删除用户', 2, 'DELETE:/youlai-admin/api/v1/users/*', 'sys:user:delete', '2021-06-16 23:43:54', '2021-06-16 23:43:54');
INSERT INTO `sys_permission` VALUES (5, '路由列表', 4, 'GET:/youlai-admin/api/v1/menus/route', 'sys:route:query', NULL, NULL);
-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '角色名称',
`code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色编码',
`sort` int NULL DEFAULT NULL COMMENT '显示顺序',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '角色状态0-正常1-停用',
`deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除标识0-未删除1-已删除',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '更新时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'ROOT', 1, 1, 0, '2021-05-21 14:56:51', '2018-12-23 16:00:00');
INSERT INTO `sys_role` VALUES (2, '系统管理员', 'ADMIN', 2, 1, 0, '2021-03-25 12:39:54', '2018-12-23 16:00:00');
INSERT INTO `sys_role` VALUES (3, '访问游客', 'GUEST', 3, 1, 0, '2021-05-26 15:49:05', '2019-05-05 16:00:00');
-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
`role_id` bigint NOT NULL COMMENT '角色ID',
`menu_id` bigint NOT NULL COMMENT '菜单ID'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO `sys_role_menu` VALUES (2, 1);
INSERT INTO `sys_role_menu` VALUES (2, 2);
INSERT INTO `sys_role_menu` VALUES (2, 3);
INSERT INTO `sys_role_menu` VALUES (2, 4);
INSERT INTO `sys_role_menu` VALUES (2, 5);
INSERT INTO `sys_role_menu` VALUES (2, 6);
INSERT INTO `sys_role_menu` VALUES (2, 7);
INSERT INTO `sys_role_menu` VALUES (2, 11);
INSERT INTO `sys_role_menu` VALUES (2, 19);
INSERT INTO `sys_role_menu` VALUES (2, 18);
INSERT INTO `sys_role_menu` VALUES (2, 17);
INSERT INTO `sys_role_menu` VALUES (2, 12);
INSERT INTO `sys_role_menu` VALUES (2, 13);
INSERT INTO `sys_role_menu` VALUES (2, 14);
INSERT INTO `sys_role_menu` VALUES (2, 15);
INSERT INTO `sys_role_menu` VALUES (2, 16);
INSERT INTO `sys_role_menu` VALUES (2, 9);
INSERT INTO `sys_role_menu` VALUES (2, 10);
-- ----------------------------
-- Table structure for sys_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_permission`;
CREATE TABLE `sys_role_permission` (
`role_id` int NULL DEFAULT NULL COMMENT '角色id',
`permission_id` int NULL DEFAULT NULL COMMENT '资源id',
INDEX `role_id`(`role_id`) USING BTREE,
INDEX `permission_id`(`permission_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色权限表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role_permission
-- ----------------------------
INSERT INTO `sys_role_permission` VALUES (2, 1);
INSERT INTO `sys_role_permission` VALUES (2, 2);
INSERT INTO `sys_role_permission` VALUES (2, 3);
INSERT INTO `sys_role_permission` VALUES (2, 5);
-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`id` int NOT NULL AUTO_INCREMENT,
`username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
`nickname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
`gender` tinyint(1) NULL DEFAULT 1 COMMENT '性别1-男 2-女',
`password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
`dept_id` int NULL DEFAULT NULL COMMENT '部门ID',
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户头像',
`mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系方式',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '用户状态1-正常 0-禁用',
`email` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户邮箱',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除标识0-未删除1-已删除',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `login_name`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1, 'root', '有来技术', 0, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', NULL, '', '17621590365', 1, 'youlaitech@163.com', 0, NULL, NULL);
INSERT INTO `sys_user` VALUES (2, 'admin', '系统管理员', 1, '$2a$10$yJSqqr6sTxNuYtA6EKcVUe2I4USFCzJ29sNcRrBvtAkSYcNg5ydQ6', 2, 'https://gitee.com/haoxr/image/raw/master/20210605215800.png', '17621210366', 1, 'youlaitech@163.com', 0, '2019-10-10 13:41:22', '2021-06-06 23:41:35');
INSERT INTO `sys_user` VALUES (3, 'test', '测试小用户', 1, '$2a$10$MPJkNw.hKT/fZOgwYP8q9eu/rFJJDsNov697AmdkHNJkpjIpVSw2q', 3, 'https://gitee.com/haoxr/image/raw/master/20210605215800.png', '17621210366', 1, 'youlaitech@163.com', 0, '2021-06-05 01:31:29', '2021-06-05 01:31:29');
-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
`user_id` int NOT NULL COMMENT '用户ID',
`role_id` int NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`, `role_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户和角色关联表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO `sys_user_role` VALUES (1, 1);
INSERT INTO `sys_user_role` VALUES (2, 2);
INSERT INTO `sys_user_role` VALUES (3, 3);
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -1,405 +0,0 @@
/*
Navicat Premium Data Transfer
Source Server : www.youlai.tech
Source Server Type : MySQL
Source Server Version : 80023
Source Host : www.youlai.tech:3306
Source Schema : youlai
Target Server Type : MySQL
Target Server Version : 80023
File Encoding : 65001
Date: 15/08/2021 01:08:23
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称',
`parent_id` int NULL DEFAULT 0 COMMENT '父节点id',
`tree_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '父节点id路径',
`sort` int NULL DEFAULT 0 COMMENT '显示顺序',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态1-正常 0-禁用',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态1-删除 0-未删除',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_dept
-- ----------------------------
INSERT INTO `sys_dept` VALUES (1, '有来技术', 0, '0', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (2, '研发部门', 1, '0,1', 1, 1, 0, '2021-06-03 00:33:56', '2021-06-03 00:33:56');
INSERT INTO `sys_dept` VALUES (9, 'A', 2, '0,1,2', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (10, 'B', 9, '0,1,2,9', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (11, 'C', 10, '0,1,2,9,10', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (12, 'D', 11, '0,1,2,9,10,11', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (13, 'E', 12, '0,1,2,9,10,11,12', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (14, 'F', 13, '0,1,2,9,10,11,12,13', 1, 1, 0, NULL, NULL);
INSERT INTO `sys_dept` VALUES (15, 'G', 14, '0,1,2,9,10,11,12,13,14', 1, 1, 0, NULL, NULL);
-- ----------------------------
-- Table structure for sys_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '类型名称',
`code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '类型编码',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态0-正常 ,1-停用)',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `type_code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典类型表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_dict
-- ----------------------------
INSERT INTO `sys_dict` VALUES (1, '性别', 'gender', 1, '性别', '2019-12-06 19:03:32', '2021-02-08 14:58:01');
INSERT INTO `sys_dict` VALUES (11, '授权方式', 'grant_type', 1, NULL, '2020-10-17 08:09:50', '2021-01-31 09:48:24');
INSERT INTO `sys_dict` VALUES (24, '微服务列表', 'micro_service', 1, '设置URL权限标识使用', '2021-06-17 00:13:43', '2021-06-17 00:17:22');
INSERT INTO `sys_dict` VALUES (25, '请求方式', 'request_method', 1, '设置URL权限标识使用', '2021-06-17 00:18:07', '2021-06-17 00:18:07');
-- ----------------------------
-- Table structure for sys_dict_item
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_item`;
CREATE TABLE `sys_dict_item` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典项名称',
`value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典项值',
`dict_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典编码',
`sort` int NULL DEFAULT 0 COMMENT '排序',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态0 停用 1正常',
`defaulted` tinyint(1) NULL DEFAULT 0 COMMENT '是否默认0否 1是',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典数据表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_dict_item
-- ----------------------------
INSERT INTO `sys_dict_item` VALUES (1, '', '1', 'gender', 1, 1, 0, '性别男', '2019-05-05 13:07:52', '2019-07-02 14:23:05');
INSERT INTO `sys_dict_item` VALUES (2, '', '2', 'gender', 2, 1, 0, '性别女', '2019-04-19 11:33:00', '2019-07-02 14:23:05');
INSERT INTO `sys_dict_item` VALUES (5, '未知', '0', 'gender', 1, 1, 0, '', '2020-10-17 08:09:31', '2020-10-17 08:09:31');
INSERT INTO `sys_dict_item` VALUES (6, '密码模式', 'password', 'grant_type', 1, 1, 0, '', '2020-10-17 09:11:52', '2021-01-31 09:48:18');
INSERT INTO `sys_dict_item` VALUES (7, '授权码模式', 'authorization_code', 'grant_type', 1, 1, 0, '', '2020-10-17 09:12:15', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (8, '客户端模式', 'client_credentials', 'grant_type', 1, 1, 0, '', '2020-10-17 09:12:36', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (9, '刷新模式', 'refresh_token', 'grant_type', 1, 1, 0, '', '2020-10-17 09:12:57', '2021-01-08 17:33:12');
INSERT INTO `sys_dict_item` VALUES (10, '简化模式', 'implicit', 'grant_type', 1, 1, 0, '', '2020-10-17 09:13:23', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (38, '系统服务', 'youlai-admin', 'micro_service', 1, 1, 0, '', '2021-06-17 00:14:12', '2021-06-17 00:14:12');
INSERT INTO `sys_dict_item` VALUES (39, '会员服务', 'youlai-ums', 'micro_service', 2, 1, 0, '', '2021-06-17 00:15:06', '2021-06-17 00:15:06');
INSERT INTO `sys_dict_item` VALUES (40, '商品服务', 'youlai-pms', 'micro_service', 3, 1, 0, '', '2021-06-17 00:15:26', '2021-06-17 00:16:18');
INSERT INTO `sys_dict_item` VALUES (41, '订单服务', 'youlai-oms', 'micro_service', 4, 1, 0, '', '2021-06-17 00:15:40', '2021-06-17 00:16:10');
INSERT INTO `sys_dict_item` VALUES (42, '营销服务', 'youlai-sms', 'micro_service', 5, 1, 0, '', '2021-06-17 00:16:01', '2021-06-17 00:16:01');
INSERT INTO `sys_dict_item` VALUES (43, '不限', '*', 'request_method', 1, 1, 0, '', '2021-06-17 00:18:34', '2021-06-17 00:18:34');
INSERT INTO `sys_dict_item` VALUES (44, 'GET', 'GET', 'request_method', 2, 1, 0, '', '2021-06-17 00:18:55', '2021-06-17 00:18:55');
INSERT INTO `sys_dict_item` VALUES (45, 'POST', 'POST', 'request_method', 3, 1, 0, '', '2021-06-17 00:19:06', '2021-06-17 00:19:06');
INSERT INTO `sys_dict_item` VALUES (46, 'PUT', 'PUT', 'request_method', 4, 1, 0, '', '2021-06-17 00:19:17', '2021-06-17 00:19:17');
INSERT INTO `sys_dict_item` VALUES (47, 'DELETE', 'DELETE', 'request_method', 5, 1, 0, '', '2021-06-17 00:19:30', '2021-06-17 00:19:30');
INSERT INTO `sys_dict_item` VALUES (48, 'PATCH', 'PATCH', 'request_method', 6, 1, 0, '', '2021-06-17 00:19:42', '2021-06-17 00:19:42');
-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '菜单名称',
`parent_id` bigint NULL DEFAULT NULL COMMENT '父菜单ID',
`path` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '路由路径',
`component` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件路径',
`redirect` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '跳转路径',
`icon` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '菜单图标',
`sort` int NULL DEFAULT 0 COMMENT '排序',
`visible` tinyint(1) NULL DEFAULT 1 COMMENT '状态0-禁用 1-开启',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 74 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '菜单管理' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES (1, '系统管理', 0, '/admin', 'Layout', '', 'table', 1, 1, '2020-09-23 09:12:21', '2021-05-21 11:09:57');
INSERT INTO `sys_menu` VALUES (2, '用户管理', 1, 'user', 'admin/user/index', '', 'user', 1, 1, NULL, '2021-06-06 23:36:28');
INSERT INTO `sys_menu` VALUES (4, '菜单管理', 1, 'menu', 'admin/menu/index', NULL, 'tree-table', 3, 1, '2020-09-23 09:12:21', '2021-03-09 09:30:44');
INSERT INTO `sys_menu` VALUES (5, '字典管理', 1, 'dict', 'admin/dict/index', NULL, 'education', 5, 1, '2020-09-23 09:12:21', '2021-03-09 09:30:53');
INSERT INTO `sys_menu` VALUES (6, '部门管理', 1, 'dept', 'admin/dept/index', NULL, 'tree', 4, 1, '2020-09-23 09:12:21', '2021-03-09 09:30:50');
INSERT INTO `sys_menu` VALUES (8, '客户端管理', 1, 'client', 'admin/client/index', NULL, 'tab', 6, 1, '2020-10-17 08:04:08', '2021-03-09 09:30:56');
INSERT INTO `sys_menu` VALUES (9, '营销管理', 0, '/sms', 'Layout', '', 'number', 3, 1, '2020-10-24 15:24:04', '2021-03-02 18:00:13');
INSERT INTO `sys_menu` VALUES (10, '广告管理', 9, 'advert', 'sms/advert/index', NULL, 'documentation', 1, 1, '2020-10-24 15:25:15', '2021-02-01 19:26:21');
INSERT INTO `sys_menu` VALUES (11, '商品管理', 0, '/pms', 'Layout', NULL, 'phone', 2, 1, '2020-10-31 10:44:58', '2021-03-25 22:25:01');
INSERT INTO `sys_menu` VALUES (12, '商品列表', 11, 'goods', 'pms/goods/index', NULL, 'component', 1, 1, '2020-11-06 11:54:37', '2021-03-11 20:18:14');
INSERT INTO `sys_menu` VALUES (13, '订单管理', 0, '/oms', 'Layout', NULL, 'shopping', 3, 1, '2020-10-31 10:49:46', '2021-03-02 18:00:08');
INSERT INTO `sys_menu` VALUES (14, '订单列表', 13, 'order', 'oms/order', '', 'component', 3, 1, '2020-10-31 10:50:23', '2021-03-25 19:52:05');
INSERT INTO `sys_menu` VALUES (15, '会员管理', 0, '/ums', 'Layout', NULL, 'user', 4, 1, '2020-10-31 10:51:07', '2021-02-06 14:57:13');
INSERT INTO `sys_menu` VALUES (16, '会员列表', 15, 'user', 'ums/user/index', NULL, 'peoples', 1, 1, '2020-10-31 10:51:43', '2021-03-02 10:41:56');
INSERT INTO `sys_menu` VALUES (17, '品牌管理', 11, 'brand', 'pms/brand/index', NULL, 'component', 4, 1, '2020-09-23 09:12:21', '2021-02-01 19:25:06');
INSERT INTO `sys_menu` VALUES (18, '商品分类', 11, 'category', 'pms/category/index', NULL, 'component', 3, 1, '2020-09-23 09:12:21', '2021-03-17 11:17:06');
INSERT INTO `sys_menu` VALUES (22, '商品上架', 11, 'goods-detail', 'pms/goods/detail', '', 'component', 2, 1, NULL, '2021-02-19 18:43:23');
INSERT INTO `sys_menu` VALUES (23, '角色管理', 1, 'role', 'admin/role/index', '', 'peoples', 3, 1, NULL, '2021-03-29 10:44:13');
-- ----------------------------
-- Table structure for sys_oauth_client
-- ----------------------------
DROP TABLE IF EXISTS `sys_oauth_client`;
CREATE TABLE `sys_oauth_client` (
`client_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`resource_ids` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`client_secret` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`scope` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`authorized_grant_types` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`web_server_redirect_uri` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`authorities` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`access_token_validity` int NULL DEFAULT NULL,
`refresh_token_validity` int NULL DEFAULT NULL,
`additional_information` varchar(4096) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`autoapprove` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`client_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_oauth_client
-- ----------------------------
INSERT INTO `sys_oauth_client` VALUES ('client', NULL, '123456', 'all', 'authorization_code,password,refresh_token,implicit', NULL, NULL, 3600, 7200, NULL, 'true');
INSERT INTO `sys_oauth_client` VALUES ('youlai-admin', '', '123456', 'all', 'password,client_credentials,refresh_token,authorization_code', '', '', -1, 7200, NULL, 'true');
INSERT INTO `sys_oauth_client` VALUES ('youlai-weapp', '', '123456', 'all', 'authorization_code,password,refresh_token,implicit', NULL, NULL, 3600, 7200, NULL, 'true');
-- ----------------------------
-- Table structure for sys_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_permission`;
CREATE TABLE `sys_permission` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限名称',
`menu_id` bigint NULL DEFAULT NULL COMMENT '菜单模块ID\r\n',
`url_perm` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'URL权限标识',
`btn_perm` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '按钮权限标识',
`gmt_create` datetime NULL DEFAULT NULL,
`gmt_modified` datetime NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `id`(`id`, `name`) USING BTREE,
INDEX `id_2`(`id`, `name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 82 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '权限表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_permission
-- ----------------------------
INSERT INTO `sys_permission` VALUES (1, '查看用户', 2, 'GET:/youlai-admin/api/v1/users/*', 'admin:user:view', '2021-02-02 14:16:07', '2021-06-16 22:25:24');
INSERT INTO `sys_permission` VALUES (74, '编辑用户', 2, 'PUT:/youlai-admin/users/*', 'admin:user:edit', '2021-06-16 16:19:44', '2021-06-16 23:36:53');
INSERT INTO `sys_permission` VALUES (75, '新增用户', 2, 'POST:/youlai-admin/api/v1/users', 'admin:user:add', '2021-06-16 23:36:37', '2021-06-16 23:37:03');
INSERT INTO `sys_permission` VALUES (76, '删除用户', 2, 'DELETE:/youlai-admin/api/v1/users/*', 'admin:user:delete', '2021-06-16 23:43:54', '2021-06-16 23:43:54');
-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '角色名称',
`code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色编码',
`sort` int NULL DEFAULT NULL COMMENT '显示顺序',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '角色状态0正常 1停用',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标识 (0未删除 1已删除)',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '更新时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 83 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'ROOT', 1, 1, 0, '2021-05-21 14:56:51', '2018-12-23 16:00:00');
INSERT INTO `sys_role` VALUES (2, '系统管理员', 'ADMIN', 2, 1, 0, '2021-03-25 12:39:54', '2018-12-23 16:00:00');
INSERT INTO `sys_role` VALUES (3, '游客', 'GUEST', 3, 1, 0, '2021-05-26 15:49:05', '2019-05-05 16:00:00');
INSERT INTO `sys_role` VALUES (67, '测试', 'TEST', 1, 1, 0, '2021-06-05 01:30:40', '2021-06-05 01:30:40');
-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
`role_id` bigint NOT NULL COMMENT '角色ID',
`menu_id` bigint NOT NULL COMMENT '菜单ID'
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO `sys_role_menu` VALUES (3, 12);
INSERT INTO `sys_role_menu` VALUES (3, 1);
INSERT INTO `sys_role_menu` VALUES (3, 11);
INSERT INTO `sys_role_menu` VALUES (3, 2);
INSERT INTO `sys_role_menu` VALUES (3, 6);
INSERT INTO `sys_role_menu` VALUES (2, 10);
INSERT INTO `sys_role_menu` VALUES (2, 13);
INSERT INTO `sys_role_menu` VALUES (2, 14);
INSERT INTO `sys_role_menu` VALUES (2, 15);
INSERT INTO `sys_role_menu` VALUES (2, 16);
INSERT INTO `sys_role_menu` VALUES (2, 23);
INSERT INTO `sys_role_menu` VALUES (2, 2);
INSERT INTO `sys_role_menu` VALUES (2, 4);
INSERT INTO `sys_role_menu` VALUES (2, 6);
INSERT INTO `sys_role_menu` VALUES (2, 8);
INSERT INTO `sys_role_menu` VALUES (2, 9);
INSERT INTO `sys_role_menu` VALUES (3, 4);
INSERT INTO `sys_role_menu` VALUES (3, 5);
INSERT INTO `sys_role_menu` VALUES (3, 10);
INSERT INTO `sys_role_menu` VALUES (3, 14);
INSERT INTO `sys_role_menu` VALUES (2, 5);
INSERT INTO `sys_role_menu` VALUES (1, 25);
INSERT INTO `sys_role_menu` VALUES (3, 8);
INSERT INTO `sys_role_menu` VALUES (1, 23);
INSERT INTO `sys_role_menu` VALUES (2, 11);
INSERT INTO `sys_role_menu` VALUES (2, 12);
INSERT INTO `sys_role_menu` VALUES (2, 18);
INSERT INTO `sys_role_menu` VALUES (2, 22);
INSERT INTO `sys_role_menu` VALUES (1, 2);
INSERT INTO `sys_role_menu` VALUES (1, 10);
INSERT INTO `sys_role_menu` VALUES (1, 9);
INSERT INTO `sys_role_menu` VALUES (1, 11);
INSERT INTO `sys_role_menu` VALUES (1, 12);
INSERT INTO `sys_role_menu` VALUES (1, 17);
INSERT INTO `sys_role_menu` VALUES (1, 18);
INSERT INTO `sys_role_menu` VALUES (1, 22);
INSERT INTO `sys_role_menu` VALUES (1, 4);
INSERT INTO `sys_role_menu` VALUES (1, 41);
INSERT INTO `sys_role_menu` VALUES (1, 5);
INSERT INTO `sys_role_menu` VALUES (1, 6);
INSERT INTO `sys_role_menu` VALUES (1, 8);
INSERT INTO `sys_role_menu` VALUES (1, 1);
INSERT INTO `sys_role_menu` VALUES (1, 13);
INSERT INTO `sys_role_menu` VALUES (1, 14);
INSERT INTO `sys_role_menu` VALUES (1, 15);
INSERT INTO `sys_role_menu` VALUES (1, 16);
INSERT INTO `sys_role_menu` VALUES (1, 26);
INSERT INTO `sys_role_menu` VALUES (65, 2);
INSERT INTO `sys_role_menu` VALUES (66, 2);
INSERT INTO `sys_role_menu` VALUES (67, 23);
INSERT INTO `sys_role_menu` VALUES (67, 5);
INSERT INTO `sys_role_menu` VALUES (67, 8);
INSERT INTO `sys_role_menu` VALUES (2, 17);
INSERT INTO `sys_role_menu` VALUES (67, 41);
INSERT INTO `sys_role_menu` VALUES (67, 1);
INSERT INTO `sys_role_menu` VALUES (67, 2);
INSERT INTO `sys_role_menu` VALUES (67, 4);
-- ----------------------------
-- Table structure for sys_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_permission`;
CREATE TABLE `sys_role_permission` (
`role_id` bigint NULL DEFAULT NULL COMMENT '角色id',
`permission_id` bigint NULL DEFAULT NULL COMMENT '资源id',
INDEX `role_id`(`role_id`) USING BTREE,
INDEX `permission_id`(`permission_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色权限表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role_permission
-- ----------------------------
INSERT INTO `sys_role_permission` VALUES (2, 1);
INSERT INTO `sys_role_permission` VALUES (67, 1);
-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`id` bigint NOT NULL AUTO_INCREMENT,
`username` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
`nickname` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称',
`gender` tinyint(1) NULL DEFAULT 0 COMMENT '性别',
`password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
`dept_id` int NULL DEFAULT NULL COMMENT '部门ID',
`avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户头像',
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系方式',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '用户状态0正常 1禁用',
`email` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户邮箱',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标识0未删除 1已删除',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `login_name`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1, 'root', '超级管理员', 2, '$2a$10$GdoxtCdEM0LHvKpxCa5sgOacLQr0c2PslRHknI3FSHWMdV0hc4Z6.', 1, 'https://gitee.com/haoxr/image/raw/master/20210605215800.png', '17621590365', 1, '1490493387@qq.com', 0, '2021-02-10 12:27:30', '2021-06-06 23:36:51');
INSERT INTO `sys_user` VALUES (2, 'admin', '系统管理员', 1, '$2a$10$yJSqqr6sTxNuYtA6EKcVUe2I4USFCzJ29sNcRrBvtAkSYcNg5ydQ6', 2, 'https://gitee.com/haoxr/image/raw/master/20210605215800.png', '17621210366', 1, '1490493387@qq.com', 0, '2019-10-10 13:41:22', '2021-06-06 23:41:35');
INSERT INTO `sys_user` VALUES (3, 'test', '测试小用户', 1, '$2a$10$MPJkNw.hKT/fZOgwYP8q9eu/rFJJDsNov697AmdkHNJkpjIpVSw2q', 1, 'https://gitee.com/haoxr/image/raw/master/20210605215800.png', NULL, 1, NULL, 0, '2021-06-05 01:31:29', '2021-06-05 01:31:29');
INSERT INTO `sys_user` VALUES (8, '123', NULL, 0, '$2a$10$wWCWmCEVQWd6mP5erjXtRez5LpwBqwAReN1A22BtxcwT8E1MbBpqa', 11, '', NULL, 1, NULL, 0, '2021-08-14 22:22:22', '2021-08-14 22:22:22');
-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
`user_id` bigint NOT NULL COMMENT '用户ID',
`role_id` bigint NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`, `role_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户和角色关联表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO `sys_user_role` VALUES (1, 1);
INSERT INTO `sys_user_role` VALUES (2, 1);
INSERT INTO `sys_user_role` VALUES (2, 2);
INSERT INTO `sys_user_role` VALUES (2, 3);
INSERT INTO `sys_user_role` VALUES (2, 58);
INSERT INTO `sys_user_role` VALUES (2, 59);
INSERT INTO `sys_user_role` VALUES (3, 67);
INSERT INTO `sys_user_role` VALUES (5, 15);
INSERT INTO `sys_user_role` VALUES (6, 3);
INSERT INTO `sys_user_role` VALUES (6, 18);
INSERT INTO `sys_user_role` VALUES (6, 67);
INSERT INTO `sys_user_role` VALUES (7, 67);
INSERT INTO `sys_user_role` VALUES (8, 3);
INSERT INTO `sys_user_role` VALUES (8, 67);
INSERT INTO `sys_user_role` VALUES (9, 2);
INSERT INTO `sys_user_role` VALUES (10, 26);
INSERT INTO `sys_user_role` VALUES (12, 2);
INSERT INTO `sys_user_role` VALUES (13, 2);
INSERT INTO `sys_user_role` VALUES (17, 1);
INSERT INTO `sys_user_role` VALUES (19, 2);
INSERT INTO `sys_user_role` VALUES (21, 3);
INSERT INTO `sys_user_role` VALUES (21, 15);
INSERT INTO `sys_user_role` VALUES (23, 15);
INSERT INTO `sys_user_role` VALUES (24, 1);
INSERT INTO `sys_user_role` VALUES (25, 14);
INSERT INTO `sys_user_role` VALUES (25, 50);
INSERT INTO `sys_user_role` VALUES (26, 50);
INSERT INTO `sys_user_role` VALUES (31, 15);
INSERT INTO `sys_user_role` VALUES (32, 1);
INSERT INTO `sys_user_role` VALUES (32, 2);
INSERT INTO `sys_user_role` VALUES (32, 3);
INSERT INTO `sys_user_role` VALUES (32, 56);
INSERT INTO `sys_user_role` VALUES (32, 57);
INSERT INTO `sys_user_role` VALUES (32, 58);
INSERT INTO `sys_user_role` VALUES (33, 2);
INSERT INTO `sys_user_role` VALUES (36, 60);
INSERT INTO `sys_user_role` VALUES (37, 1);
INSERT INTO `sys_user_role` VALUES (38, 1);
INSERT INTO `sys_user_role` VALUES (38, 2);
INSERT INTO `sys_user_role` VALUES (39, 1);
INSERT INTO `sys_user_role` VALUES (39, 2);
INSERT INTO `sys_user_role` VALUES (40, 60);
SET FOREIGN_KEY_CHECKS = 1;