1 Star 0 Fork 7

zhonghaixia/mistore-Springboot+Vue实现小米商城

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mistore.sql 37.64 KB
一键复制 编辑 原始数据 按行查看 历史
liuxianchun 提交于 2021-03-15 21:50 . add RabbitMQ
/*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 50709
Source Host : localhost:3306
Source Schema : mistore
Target Server Type : MySQL
Target Server Version : 50709
File Encoding : 65001
Date: 06/02/2021 14:30:36
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for carousel
-- ----------------------------
DROP TABLE IF EXISTS `carousel`;
CREATE TABLE `carousel` (
`carousel_id` int(11) NOT NULL AUTO_INCREMENT,
`imgPath` char(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`describes` char(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`product_id` int(11) NOT NULL,
PRIMARY KEY (`carousel_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of carousel
-- ----------------------------
INSERT INTO `carousel` VALUES (1, 'public/imgs/cms_1.jpg', '123456', 7);
INSERT INTO `carousel` VALUES (2, 'public/imgs/cms_2.jpg', '123456', 6);
INSERT INTO `carousel` VALUES (3, 'public/imgs/cms_3.jpg', '123456', 3);
INSERT INTO `carousel` VALUES (4, 'public/imgs/cms_4.jpg', '123456', 18);
-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`category_id` int(11) NOT NULL AUTO_INCREMENT,
`category_name` char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`category_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of category
-- ----------------------------
INSERT INTO `category` VALUES (1, '手机');
INSERT INTO `category` VALUES (2, '电视机');
INSERT INTO `category` VALUES (3, '空调');
INSERT INTO `category` VALUES (4, '洗衣机');
INSERT INTO `category` VALUES (5, '保护套');
INSERT INTO `category` VALUES (6, '保护膜');
INSERT INTO `category` VALUES (7, '充电器');
INSERT INTO `category` VALUES (8, '充电宝');
-- ----------------------------
-- Table structure for collect
-- ----------------------------
DROP TABLE IF EXISTS `collect`;
CREATE TABLE `collect` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`collect_time` datetime(0) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `FK_collect_user_id`(`user_id`) USING BTREE,
INDEX `FK_collect_id`(`product_id`) USING BTREE,
CONSTRAINT `FK_collect_id` FOREIGN KEY (`product_id`) REFERENCES `product` (`product_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `FK_collect_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of collect
-- ----------------------------
-- ----------------------------
-- Table structure for orders
-- ----------------------------
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`product_num` int(11) NOT NULL,
`product_price` decimal(10, 0) NOT NULL,
`order_time` datetime(0) NOT NULL,
`order_id` bigint(20) NULL DEFAULT NULL,
`pay_time` datetime(0) NULL DEFAULT NULL COMMENT '付款时间',
`pay_status` int(2) NULL DEFAULT NULL COMMENT '0为未付款,1为已付款',
`status` int(11) NULL DEFAULT NULL COMMENT '0为失效,1为生效',
PRIMARY KEY (`id`) USING BTREE,
INDEX `FK_order_user_id`(`user_id`) USING BTREE,
INDEX `FK_order_id`(`product_id`) USING BTREE,
CONSTRAINT `FK_order_id` FOREIGN KEY (`product_id`) REFERENCES `product` (`product_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `FK_order_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 231 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of orders
-- ----------------------------
-- ----------------------------
-- Table structure for product
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
`product_id` int(11) NOT NULL AUTO_INCREMENT,
`product_name` char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`category_id` int(11) NOT NULL,
`product_title` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`product_intro` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`product_picture` char(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`product_price` decimal(10, 2) NOT NULL,
`product_selling_price` decimal(10, 2) NOT NULL,
`product_num` int(11) NOT NULL,
`product_sales` int(11) NOT NULL,
`status` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`product_id`) USING BTREE,
INDEX `FK_product_category`(`category_id`) USING BTREE,
CONSTRAINT `FK_product_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of product
-- ----------------------------
INSERT INTO `product` VALUES (1, 'Redmi K30', 1, '120Hz流速屏,全速热爱', '120Hz高帧率流速屏/ 索尼6400万前后六摄 / 6.67\'小孔径全面屏 / 最高可选8GB+256GB大存储 / 高通骁龙730G处理器 / 3D四曲面玻璃机身 / 4500mAh+27W快充 / 多功能NFC', 'public/imgs/phone/Redmi-k30.png', 2000.00, 1599.00, 10, 0, 1);
INSERT INTO `product` VALUES (2, 'Redmi K30 5G', 1, '双模5G,120Hz流速屏', '双模5G / 三路并发 / 高通骁龙765G / 7nm 5G低功耗处理器 / 120Hz高帧率流速屏 / 6.67\'小孔径全面屏 / 索尼6400万前后六摄 / 最高可选8GB+256GB大存储 / 4500mAh+30W快充 / 3D四曲面玻璃机身 / 多功能NFC', 'public/imgs/phone/Redmi-k30-5G.png', 2599.00, 2599.00, 10, 0, 1);
INSERT INTO `product` VALUES (3, '小米CC9 Pro', 1, '1亿像素,五摄四闪', '1亿像素主摄 / 全场景五摄像头 / 四闪光灯 / 3200万自拍 / 10 倍混合光学变焦,50倍数字变焦 / 5260mAh ⼤电量 / 标配 30W疾速快充 / ⼩米⾸款超薄屏下指纹 / 德国莱茵低蓝光认证 / 多功能NFC / 红外万能遥控 / 1216超线性扬声器', 'public/imgs/phone/Mi-CC9.png', 2799.00, 2599.00, 20, 0, 1);
INSERT INTO `product` VALUES (4, 'Redmi 8', 1, '5000mAh超长续航', '5000mAh超长续航 / 高通骁龙439八核处理器 / 4GB+64GB', 'public/imgs/phone/Redmi-8.png', 799.00, 699.00, 20, 0, 1);
INSERT INTO `product` VALUES (5, 'Redmi 8A', 1, '5000mAh超长续航', '5000mAh超长续航 / 高通骁龙439八核处理器 / 4GB+64GB / 1200万AI后置相机', 'public/imgs/phone/Redmi-8A.png', 599.00, 699.00, 20, 0, 1);
INSERT INTO `product` VALUES (6, 'Redmi Note8 Pro', 1, '6400万全场景四摄', '6400万四摄小金刚拍照新旗舰超强解析力,超震撼', 'public/imgs/phone/Redmi-Note8-pro.png', 1399.00, 1199.00, 20, 0, 1);
INSERT INTO `product` VALUES (7, 'Redmi Note8', 1, '千元4800万四摄', '千元4800万四摄 | 高通骁龙665 | 小金刚品质保证', 'public/imgs/phone/Redmi-Note8.png', 999.00, 999.00, 20, 0, 1);
INSERT INTO `product` VALUES (8, 'Redmi 7A', 1, '小巧大电量 持久流畅', '小巧大电量,持久又流畅骁龙8核高性能处理器 | 4000mAh超长续航 | AI人脸解锁 | 整机防泼溅', 'public/imgs/phone/Redmi-7A.png', 599.00, 539.00, 20, 0, 1);
INSERT INTO `product` VALUES (9, '小米电视4A 32英寸', 2, '人工智能系统,高清液晶屏', '小米电视4A 32英寸 | 64位四核处理器 | 1GB+4GB大内存 | 人工智能系统', 'public/imgs/appliance/MiTv-4A-32.png', 799.00, 799.00, 10, 0, 1);
INSERT INTO `product` VALUES (10, '小米全面屏电视E55A', 2, '全面屏设计,人工智能语音', '全面屏设计 | 内置小爱同学 | 4K + HDR | 杜比DTS | PatchWall | 海量内容 | 2GB + 8GB大存储 | 64位四核处理器', 'public/imgs/appliance/MiTv-E55A.png', 2099.00, 1899.00, 10, 0, 1);
INSERT INTO `product` VALUES (11, '小米全面屏电视E65A', 2, '全面屏设计,人工智能语音', '人工智能语音系统 | 海量影视内容 | 4K 超高清屏 | 杜比音效 | 64位四核处理器 | 2GB + 8GB大存储', 'public/imgs/appliance/MiTv-E65A.png', 3999.00, 2799.00, 10, 0, 1);
INSERT INTO `product` VALUES (12, '小米电视4X 43英寸', 2, 'FHD全高清屏,人工智能语音', '人工智能语音系统 | FHD全高清屏 | 64位四核处理器 | 海量片源 | 1GB+8GB大内存 | 钢琴烤漆', 'public/imgs/appliance/MiTv-4X-43.png', 1499.00, 1299.00, 10, 0, 1);
INSERT INTO `product` VALUES (13, '小米电视4C 55英寸', 2, '4K HDR,人工智能系统', '人工智能 | 大内存 | 杜比音效 | 超窄边 | 4K HDR | 海量片源 | 纤薄机身| 钢琴烤漆', 'public/imgs/appliance/MiTv-4C-55.png', 1999.00, 1799.00, 10, 0, 1);
INSERT INTO `product` VALUES (14, '小米电视4A 65英寸', 2, '4K HDR,人工智能系统', '人工智能 | 大内存 | 杜比音效 | 超窄边 | 4K HDR | 海量片源 | 纤薄机身| 钢琴烤漆', 'public/imgs/appliance/MiTv-4A-65.png', 2999.00, 2799.00, 10, 0, 1);
INSERT INTO `product` VALUES (15, '小米壁画电视 65英寸', 2, '壁画外观,全面屏,远场语音', '纯平背板 | 通体13.9mm | 远场语音 | 4K+HDR | 杜比+DTS | 画框模式 | 内置小爱同学 | PatchWall | SoundBar+低音炮 | 四核处理器+大存储', 'public/imgs/appliance/MiTv-ArtTv-65.png', 6999.00, 6999.00, 10, 0, 1);
INSERT INTO `product` VALUES (16, '米家互联网空调C1(一级能效)', 3, '变频节能省电,自清洁', '一级能效 | 1.5匹 | 全直流变频 | 高效制冷/热 | 静音设计 | 自清洁 | 全屋互联', 'public/imgs/appliance/AirCondition-V1C1.png', 2699.00, 2599.00, 20, 0, 1);
INSERT INTO `product` VALUES (17, '米家空调', 3, '出众静音,快速制冷热', '大1匹 | 三级能效 | 静音 | 快速制冷热 | 广角送风 | 除湿功能 | 高密度过滤网 | 典雅外观', 'public/imgs/appliance/AirCondition-F3W1.png', 1799.00, 1699.00, 20, 0, 1);
INSERT INTO `product` VALUES (18, '米家互联网洗烘一体机 Pro 10kg', 4, '智能洗烘,省心省力', '国标双A+级洗烘能力 / 22种洗烘模式 / 智能投放洗涤剂 / 支持小爱同学语音遥控 / 支持OTA在线智能升级 / 智能空气洗 / 除菌率达99.9%+', 'public/imgs/appliance/Washer-Pro-10.png', 2999.00, 2999.00, 20, 0, 1);
INSERT INTO `product` VALUES (19, 'Redmi K20/ K20 Pro 怪力魔王保护壳', 5, '怪力魔王专属定制', '优选PC材料,强韧张力,经久耐用 / 精选开孔,全面贴合机身 / 手感轻薄细腻,舒适无负担 / 三款颜色可选,彰显个性,与众不同', 'public/imgs/accessory/protectingShell-RedMi-K20&pro.png', 39.00, 39.00, 20, 0, 1);
INSERT INTO `product` VALUES (20, '小米9 ARE U OK保护壳', 5, '一个与众不同的保护壳', '彰显独特个性 / 轻薄无负担 / 优选PC材料 / 贴合机身 / 潮流五色', 'public/imgs/accessory/protectingShell-Mi-9.png', 49.00, 39.00, 20, 0, 1);
INSERT INTO `product` VALUES (21, '小米CC9&小米CC9美图定制版 标准高透贴膜', 6, '高清透亮,耐磨性强', '耐磨性强,防护更出众 / 疏油疏水,有效抗水抗脏污 / 高清透亮,保留了原生屏幕的亮丽颜色和清晰度 / 操作灵敏,智能吸附 / 进口高端PET材质,裸机般手感', 'public/imgs/accessory/protectingMen-Mi-CC9.png', 19.00, 19.00, 20, 0, 1);
INSERT INTO `product` VALUES (22, '小米CC9e 标准高透贴膜', 6, '高清透亮,耐磨性强', '耐磨性强,防护更出众 / 疏油疏水,有效抗水抗脏污 / 高清透亮,保留了原生屏幕的亮丽颜色和清晰度 / 操作灵敏,智能吸附 / 进口高端PET材质,裸机般手感', 'public/imgs/accessory/protectingMen-Mi-CC9e.png', 19.00, 19.00, 20, 0, 1);
INSERT INTO `product` VALUES (23, '小米USB充电器30W快充版(1A1C)', 7, '多一种接口,多一种选择', '双口输出 / 30W 输出 / 可折叠插脚 / 小巧便携', 'public/imgs/accessory/charger-30w.png', 59.00, 59.00, 20, 0, 1);
INSERT INTO `product` VALUES (24, '小米USB充电器快充版(18W)', 7, '安卓、苹果设备均可使用', '支持QC3.0设备充电 / 支持iOS设备充电/ 美观耐用', 'public/imgs/accessory/charger-18w.png', 29.00, 29.00, 20, 0, 1);
INSERT INTO `product` VALUES (25, '小米USB充电器60W快充版(6口)', 7, '6口输出,USB-C输出接口', '6口输出 / USB-C输出接口 / 支持QC3.0快充协议 / 总输出功率60W', 'public/imgs/accessory/charger-60w.png', 129.00, 129.00, 20, 0, 1);
INSERT INTO `product` VALUES (26, '小米USB充电器36W快充版(2口)', 7, '6多重安全保护,小巧便携', '双USB输出接口 / 支持QC3.0快充协议 / 多重安全保护 / 小巧便携', 'public/imgs/accessory/charger-36w.png', 59.00, 59.00, 20, 0, 1);
INSERT INTO `product` VALUES (27, '小米车载充电器快充版', 7, '让爱车成为移动充电站', 'QC3.0 双口输出 / 智能温度控制 / 5重安全保护 / 兼容iOS&Android设备', 'public/imgs/accessory/charger-car.png', 69.00, 69.00, 20, 0, 1);
INSERT INTO `product` VALUES (28, '小米车载充电器快充版(37W)', 7, '双口快充,车载充电更安全', '单口27W 快充 / 双口输出 / 多重安全保护', 'public/imgs/accessory/charger-car-37w.png', 49.00, 49.00, 20, 0, 1);
INSERT INTO `product` VALUES (29, '小米二合一移动电源(充电器)', 7, '一个设备多种用途', '5000mAh充沛电量 / 多协议快充 / USB 口输出', 'public/imgs/accessory/charger-tio.png', 99.00, 99.00, 20, 0, 1);
INSERT INTO `product` VALUES (30, '小米无线充电宝青春版10000mAh', 8, '能量满满,无线有线都能充', '10000mAh大容量 / 支持边充边放 / 有线无线都能充 / 双向快充', 'public/imgs/accessory/charger-10000mAh.png', 129.00, 129.00, 20, 0, 1);
INSERT INTO `product` VALUES (31, '小米CC9 Pro/尊享版 撞色飘带保护壳', 5, '全面贴合,无感更舒适', '优选环保PC材质,强韧张力,全面贴合,无感更舒适', 'public/imgs/accessory/protectingShell-Mi-CC9Pro.png', 69.00, 69.00, 20, 0, 1);
INSERT INTO `product` VALUES (32, 'Redmi K20系列 幻境之心保护壳', 5, '柔软坚韧,全面贴合', '优质环保材质,柔软坚韧 / 全面贴合,有效抵抗灰尘 / 鲜亮三种颜色可选,为爱机随时换装', 'public/imgs/accessory/protectingShell-RedMi-K20.png', 39.00, 39.00, 20, 0, 1);
INSERT INTO `product` VALUES (33, '小米9 SE 街头风保护壳黑色', 5, '个性时尚,细节出众', '个性时尚 / 细节出众 / 纤薄轻巧 / 多彩时尚', 'public/imgs/accessory/protectingShell-Mi-9SE.png', 49.00, 49.00, 20, 0, 1);
INSERT INTO `product` VALUES (34, '小米9 街头风保护壳 红色', 5, '个性时尚,细节出众', '时尚多彩 / 细节出众 / 纤薄轻巧 / 是腕带也是支架', 'public/imgs/accessory/protectingShell-Mi-9-red.png', 49.00, 49.00, 20, 0, 1);
INSERT INTO `product` VALUES (35, '小米MIX 3 极简保护壳蓝色', 5, '时尚简约设计,手感细腻顺滑', '时尚简约设计,手感细腻顺滑 / 优质环保PC原材料,强韧张力,经久耐用 / 超薄 0.8MM厚度', 'public/imgs/accessory/protectingShell-Mix-3.png', 49.00, 12.90, 20, 0, 1);
-- ----------------------------
-- Table structure for product_picture
-- ----------------------------
DROP TABLE IF EXISTS `product_picture`;
CREATE TABLE `product_picture` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`product_id` int(11) NOT NULL,
`product_picture` char(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`introduction` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `FK_product_id`(`product_id`) USING BTREE,
CONSTRAINT `FK_product_id` FOREIGN KEY (`product_id`) REFERENCES `product` (`product_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 111 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of product_picture
-- ----------------------------
INSERT INTO `product_picture` VALUES (1, 1, 'public/imgs/phone/picture/Redmi-k30-1.png', NULL);
INSERT INTO `product_picture` VALUES (2, 1, 'public/imgs/phone/picture/Redmi-k30-2.png', NULL);
INSERT INTO `product_picture` VALUES (3, 1, 'public/imgs/phone/picture/Redmi-k30-3.png', NULL);
INSERT INTO `product_picture` VALUES (4, 1, 'public/imgs/phone/picture/Redmi-k30-4.png', NULL);
INSERT INTO `product_picture` VALUES (5, 1, 'public/imgs/phone/picture/Redmi-k30-5.png', NULL);
INSERT INTO `product_picture` VALUES (6, 2, 'public/imgs/phone/picture/Redmi K30 5G-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (7, 2, 'public/imgs/phone/picture/Redmi K30 5G-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (8, 2, 'public/imgs/phone/picture/Redmi K30 5G-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (9, 2, 'public/imgs/phone/picture/Redmi K30 5G-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (10, 2, 'public/imgs/phone/picture/Redmi K30 5G-5.jpg', NULL);
INSERT INTO `product_picture` VALUES (11, 3, 'public/imgs/phone/picture/MI CC9 Pro-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (12, 3, 'public/imgs/phone/picture/MI CC9 Pro-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (13, 3, 'public/imgs/phone/picture/MI CC9 Pro-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (14, 3, 'public/imgs/phone/picture/MI CC9 Pro-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (15, 3, 'public/imgs/phone/picture/MI CC9 Pro-5.jpg', NULL);
INSERT INTO `product_picture` VALUES (16, 3, 'public/imgs/phone/picture/MI CC9 Pro-6.jpg', NULL);
INSERT INTO `product_picture` VALUES (17, 4, 'public/imgs/phone/picture/Redmi 8-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (18, 4, 'public/imgs/phone/picture/Redmi 8-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (19, 4, 'public/imgs/phone/picture/Redmi 8-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (20, 4, 'public/imgs/phone/picture/Redmi 8-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (21, 4, 'public/imgs/phone/picture/Redmi 8-5.jpg', NULL);
INSERT INTO `product_picture` VALUES (22, 5, 'public/imgs/phone/picture/Redmi 8A-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (23, 6, 'public/imgs/phone/picture/Redmi Note8 Pro-1.png', NULL);
INSERT INTO `product_picture` VALUES (24, 6, 'public/imgs/phone/picture/Redmi Note8 Pro-2.png', NULL);
INSERT INTO `product_picture` VALUES (25, 6, 'public/imgs/phone/picture/Redmi Note8 Pro-3.png', NULL);
INSERT INTO `product_picture` VALUES (26, 6, 'public/imgs/phone/picture/Redmi Note8 Pro-4.png', NULL);
INSERT INTO `product_picture` VALUES (27, 6, 'public/imgs/phone/picture/Redmi Note8 Pro-5.png', NULL);
INSERT INTO `product_picture` VALUES (28, 7, 'public/imgs/phone/picture/Redmi Note8-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (29, 7, 'public/imgs/phone/picture/Redmi Note8-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (30, 7, 'public/imgs/phone/picture/Redmi Note8-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (31, 7, 'public/imgs/phone/picture/Redmi Note8-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (32, 7, 'public/imgs/phone/picture/Redmi Note8-5.jpg', NULL);
INSERT INTO `product_picture` VALUES (33, 8, 'public/imgs/phone/picture/Redmi 7A-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (34, 8, 'public/imgs/phone/picture/Redmi 7A-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (35, 8, 'public/imgs/phone/picture/Redmi 7A-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (36, 8, 'public/imgs/phone/picture/Redmi 7A-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (37, 8, 'public/imgs/phone/picture/Redmi 7A-5.jpg', NULL);
INSERT INTO `product_picture` VALUES (38, 9, 'public/imgs/phone/picture/MiTv-4A-32-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (39, 9, 'public/imgs/phone/picture/MiTv-4A-32-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (40, 9, 'public/imgs/phone/picture/MiTv-4A-32-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (41, 9, 'public/imgs/phone/picture/MiTv-4A-32-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (42, 10, 'public/imgs/phone/picture/MiTv-E55A-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (43, 10, 'public/imgs/phone/picture/MiTv-E55A-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (44, 10, 'public/imgs/phone/picture/MiTv-E55A-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (45, 10, 'public/imgs/phone/picture/MiTv-E55A-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (46, 11, 'public/imgs/phone/picture/MiTv-E65A-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (47, 11, 'public/imgs/phone/picture/MiTv-E65A-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (48, 11, 'public/imgs/phone/picture/MiTv-E65A-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (49, 11, 'public/imgs/phone/picture/MiTv-E65A-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (50, 12, 'public/imgs/phone/picture/MiTv-4X 43-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (51, 12, 'public/imgs/phone/picture/MiTv-4X 43-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (52, 12, 'public/imgs/phone/picture/MiTv-4X 43-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (53, 13, 'public/imgs/phone/picture/MiTv-4C 55-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (54, 13, 'public/imgs/phone/picture/MiTv-4C 55-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (55, 13, 'public/imgs/phone/picture/MiTv-4C 55-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (56, 14, 'public/imgs/phone/picture/MiTv-4A 65-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (57, 15, 'public/imgs/phone/picture/MiTv-ArtTv-65-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (58, 16, 'public/imgs/phone/picture/AirCondition-V1C1-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (59, 17, 'public/imgs/phone/picture/AirCondition-F3W1-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (60, 18, 'public/imgs/phone/picture/Washer-Pro-10-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (61, 18, 'public/imgs/phone/picture/Washer-Pro-10-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (62, 18, 'public/imgs/phone/picture/Washer-Pro-10-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (63, 18, 'public/imgs/phone/picture/Washer-Pro-10-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (64, 19, 'public/imgs/phone/picture/protectingShell-RedMi-K20&pro-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (65, 20, 'public/imgs/phone/picture/protectingShell-Mi-9-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (66, 20, 'public/imgs/phone/picture/protectingShell-Mi-9-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (67, 21, 'public/imgs/phone/picture/protectingMen-Mi-CC9-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (68, 22, 'public/imgs/phone/picture/protectingMen-Mi-CC9e-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (69, 23, 'public/imgs/phone/picture/charger-30w-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (70, 23, 'public/imgs/phone/picture/charger-30w-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (71, 23, 'public/imgs/phone/picture/charger-30w-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (72, 23, 'public/imgs/phone/picture/charger-30w-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (73, 24, 'public/imgs/phone/picture/charger-18w-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (74, 24, 'public/imgs/phone/picture/charger-18w-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (75, 24, 'public/imgs/phone/picture/charger-18w-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (76, 25, 'public/imgs/phone/picture/charger-60w-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (77, 25, 'public/imgs/phone/picture/charger-60w-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (78, 25, 'public/imgs/phone/picture/charger-60w-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (79, 25, 'public/imgs/phone/picture/charger-60w-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (80, 26, 'public/imgs/phone/picture/charger-36w-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (81, 26, 'public/imgs/phone/picture/charger-36w-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (82, 26, 'public/imgs/phone/picture/charger-36w-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (83, 26, 'public/imgs/phone/picture/charger-36w-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (84, 26, 'public/imgs/phone/picture/charger-36w-5.jpg', NULL);
INSERT INTO `product_picture` VALUES (85, 27, 'public/imgs/phone/picture/charger-car-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (86, 27, 'public/imgs/phone/picture/charger-car-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (87, 27, 'public/imgs/phone/picture/charger-car-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (88, 27, 'public/imgs/phone/picture/charger-car-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (89, 27, 'public/imgs/phone/picture/charger-car-5.jpg', NULL);
INSERT INTO `product_picture` VALUES (90, 27, 'public/imgs/phone/picture/charger-car-6.jpg', NULL);
INSERT INTO `product_picture` VALUES (91, 28, 'public/imgs/phone/picture/charger-car-37w-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (92, 28, 'public/imgs/phone/picture/charger-car-37w-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (93, 28, 'public/imgs/phone/picture/charger-car-37w-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (94, 28, 'public/imgs/phone/picture/charger-car-37w-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (95, 28, 'public/imgs/phone/picture/charger-car-37w-5.jpg', NULL);
INSERT INTO `product_picture` VALUES (96, 29, 'public/imgs/phone/picture/charger-tio-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (97, 29, 'public/imgs/phone/picture/charger-tio-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (98, 29, 'public/imgs/phone/picture/charger-tio-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (99, 29, 'public/imgs/phone/picture/charger-tio-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (100, 29, 'public/imgs/phone/picture/charger-tio-5.jpg', NULL);
INSERT INTO `product_picture` VALUES (101, 30, 'public/imgs/phone/picture/charger-10000mAh-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (102, 30, 'public/imgs/phone/picture/charger-10000mAh-2.jpg', NULL);
INSERT INTO `product_picture` VALUES (103, 30, 'public/imgs/phone/picture/charger-10000mAh-3.jpg', NULL);
INSERT INTO `product_picture` VALUES (104, 30, 'public/imgs/phone/picture/charger-10000mAh-4.jpg', NULL);
INSERT INTO `product_picture` VALUES (105, 30, 'public/imgs/phone/picture/charger-10000mAh-5.jpg', NULL);
INSERT INTO `product_picture` VALUES (106, 31, 'public/imgs/phone/picture/protectingShell-Mi-CC9Pro-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (107, 32, 'public/imgs/phone/picture/protectingShell-RedMi-K20-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (108, 33, 'public/imgs/phone/picture/protectingShell-Mi-9SE-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (109, 34, 'public/imgs/phone/picture/protectingShell-Mi-9-red-1.jpg', NULL);
INSERT INTO `product_picture` VALUES (110, 35, 'public/imgs/phone/picture/protectingShell-Mix-3-1.jpg', NULL);
-- ----------------------------
-- Table structure for secgoods
-- ----------------------------
DROP TABLE IF EXISTS `secgoods`;
CREATE TABLE `secgoods` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '秒杀商品id',
`goods_stock` int(11) NULL DEFAULT NULL COMMENT '商品库存',
`product_id` int(11) NULL DEFAULT NULL COMMENT '商品id',
`start_date` datetime(0) NULL DEFAULT NULL COMMENT '秒杀开始时间',
`end_date` datetime(0) NULL DEFAULT NULL COMMENT '秒杀结束时间',
`seckill_price` decimal(10, 2) NULL DEFAULT NULL,
`status` int(11) NULL DEFAULT NULL COMMENT '0为失效,1为生效',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of secgoods
-- ----------------------------
INSERT INTO `secgoods` VALUES (1, 20, 2, '2021-01-31 21:55:55', '2021-02-12 18:27:29', 1699.00, 1);
INSERT INTO `secgoods` VALUES (2, 20, 5, '2021-02-03 16:27:29', '2021-02-24 23:27:29', 499.00, 1);
INSERT INTO `secgoods` VALUES (3, 20, 15, '2021-04-06 21:55:55', '2021-10-06 18:27:29', 4599.00, 1);
INSERT INTO `secgoods` VALUES (4, 20, 9, '2021-02-02 15:55:55', '2021-03-01 18:27:29', 699.00, 1);
INSERT INTO `secgoods` VALUES (5, 20, 22, '2021-02-02 16:27:29', '2021-02-16 23:27:29', 499.00, 1);
-- ----------------------------
-- Table structure for secorder
-- ----------------------------
DROP TABLE IF EXISTS `secorder`;
CREATE TABLE `secorder` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '秒杀订单id',
`order_id` bigint(20) NOT NULL COMMENT '订单id',
`user_id` int(11) NOT NULL,
`product_id` int(11) NULL DEFAULT NULL,
`secgoods_id` int(11) NULL DEFAULT NULL COMMENT '秒杀商品的id',
`order_time` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 150 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of secorder
-- ----------------------------
INSERT INTO `secorder` VALUES (88, 2021020400000133, 2, 22, 5, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (89, 2021020400000135, 4, 22, 5, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (90, 2021020400000134, 4, 15, 3, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (91, 2021020400000136, 2, 9, 4, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (92, 2021020400000137, 1, 15, 3, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (93, 2021020400000139, 2, 15, 3, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (94, 2021020400000138, 5, 9, 4, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (95, 2021020400000141, 6, 15, 3, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (96, 2021020400000140, 20, 9, 4, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (97, 2021020400000143, 31, 15, 3, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (98, 2021020400000146, 68, 22, 5, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (99, 2021020400000147, 5, 15, 3, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (100, 2021020400000148, 69, 15, 3, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (101, 2021020400000152, 69, 9, 4, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (102, 2021020400000149, 259, 22, 5, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (103, 2021020400000151, 47, 15, 3, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (104, 2021020400000153, 3, 22, 5, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (105, 2021020400000150, 48, 9, 4, '2021-02-04 19:37:18');
INSERT INTO `secorder` VALUES (106, 2021020400000156, 3, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (107, 2021020400000157, 45, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (108, 2021020400000158, 34, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (109, 2021020400000159, 3, 15, 3, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (110, 2021020400000162, 54, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (111, 2021020400000160, 55, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (112, 2021020400000164, 5, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (113, 2021020400000166, 26, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (114, 2021020400000170, 27, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (115, 2021020400000171, 17, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (116, 2021020400000145, 67, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (117, 2021020400000173, 26, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (118, 2021020400000175, 29, 15, 3, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (119, 2021020400000176, 68, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (120, 2021020400000163, 1, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (121, 2021020400000180, 50, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (122, 2021020400000181, 61, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (123, 2021020400000182, 64, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (124, 2021020400000183, 59, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (125, 2021020400000167, 7, 15, 3, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (126, 2021020400000186, 73, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (127, 2021020400000185, 21, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (128, 2021020400000155, 4, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (129, 2021020400000174, 23, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (130, 2021020400000168, 10, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (131, 2021020400000144, 46, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (132, 2021020400000142, 1, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (133, 2021020400000165, 7, 22, 5, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (134, 2021020400000188, 21, 15, 3, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (135, 2021020400000179, 53, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (136, 2021020400000177, 41, 9, 4, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (137, 2021020400000154, 54, 15, 3, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (138, 2021020400000189, 24, 15, 3, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (139, 2021020400000187, 33, 15, 3, '2021-02-04 19:37:19');
INSERT INTO `secorder` VALUES (140, 2021020400000184, 62, 9, 4, '2021-02-04 19:37:20');
INSERT INTO `secorder` VALUES (141, 2021020400000190, 42, 15, 3, '2021-02-04 19:37:20');
INSERT INTO `secorder` VALUES (142, 2021020400000172, 15, 15, 3, '2021-02-04 19:37:20');
INSERT INTO `secorder` VALUES (143, 2021020400000169, 12, 22, 5, '2021-02-04 19:37:20');
INSERT INTO `secorder` VALUES (144, 2021020400000191, 25, 15, 3, '2021-02-04 19:37:20');
INSERT INTO `secorder` VALUES (145, 2021020400000161, 58, 15, 3, '2021-02-04 19:37:20');
INSERT INTO `secorder` VALUES (146, 2021020400000178, 51, 22, 5, '2021-02-04 19:37:20');
INSERT INTO `secorder` VALUES (147, 2021020400000192, 72, 15, 3, '2021-02-04 19:37:20');
INSERT INTO `secorder` VALUES (148, 2021020400000193, 5, 2, 1, '2021-02-04 21:00:29');
INSERT INTO `secorder` VALUES (149, 2021020400000194, 5, 5, 2, '2021-02-04 21:44:48');
-- ----------------------------
-- Table structure for sequence
-- ----------------------------
DROP TABLE IF EXISTS `sequence`;
CREATE TABLE `sequence` (
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '序列名',
`value` int(11) NOT NULL COMMENT '序列值',
`next` int(11) NOT NULL COMMENT '递增值',
PRIMARY KEY (`name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sequence
-- ----------------------------
INSERT INTO `sequence` VALUES ('order', 0, 1);
-- ----------------------------
-- Table structure for shoppingcart
-- ----------------------------
DROP TABLE IF EXISTS `shoppingcart`;
CREATE TABLE `shoppingcart` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`num` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `FK_user_id`(`user_id`) USING BTREE,
INDEX `FK_shoppingCart_id`(`product_id`) USING BTREE,
CONSTRAINT `FK_shoppingCart_id` FOREIGN KEY (`product_id`) REFERENCES `product` (`product_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `FK_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 48 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of shoppingcart
-- ----------------------------
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`userName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`password` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`userPhoneNumber` bigint(11) NULL DEFAULT NULL,
`email` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`gender` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`salt` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '加密用',
`login_count` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`user_id`) USING BTREE,
UNIQUE INDEX `userName`(`userName`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1016 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of users
-- ----------------------------
-- ----------------------------
-- Function structure for get_trans_num
-- ----------------------------
DROP FUNCTION IF EXISTS `get_trans_num`;
delimiter ;;
CREATE FUNCTION `get_trans_num`(seq_name varchar(20))
RETURNS bigint(24)
begin
DECLARE getval bigint(24);
SET getval = (SELECT CONCAT(DATE_FORMAT(CURDATE(), '%Y%m%d'), LPAD((SELECT next_trans_num(seq_name)), 8, '0')));
RETURN getval;
end
;;
delimiter ;
-- ----------------------------
-- Function structure for next_trans_num
-- ----------------------------
DROP FUNCTION IF EXISTS `next_trans_num`;
delimiter ;;
CREATE FUNCTION `next_trans_num`(seq_name varchar(20))
RETURNS bigint(20)
begin
UPDATE sequence SET value=last_insert_id(value+next) WHERE name=seq_name;
RETURN last_insert_id();
end
;;
delimiter ;
-- ----------------------------
-- Event structure for ClearSequence
-- ----------------------------
CREATE EVENT ClearSequence
ON SCHEDULE EVERY 1 DAY
DO
UPDATE sequence SET value=0;
SET FOREIGN_KEY_CHECKS = 1;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/bigseacoming/mistore.git
git@gitee.com:bigseacoming/mistore.git
bigseacoming
mistore
mistore-Springboot+Vue实现小米商城
main

搜索帮助