7 Star 107 Fork 52

Noah2021/电商秒杀系统深度优化

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
backup.sql 10.56 KB
一键复制 编辑 原始数据 按行查看 历史
Noah2021 提交于 2022-03-28 11:22 . update backup.sql.
-- MySQL dump 10.13 Distrib 5.5.40, for Win64 (x86)
--
-- Host: localhost Database: miaosha
-- ------------------------------------------------------
-- Server version 5.5.40
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `item`
--
DROP TABLE IF EXISTS `item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(64) NOT NULL DEFAULT '',
`price` double(10,0) NOT NULL DEFAULT '0',
`description` varchar(500) NOT NULL DEFAULT '',
`sales` int(11) NOT NULL DEFAULT '0',
`img_url` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `item`
--
LOCK TABLES `item` WRITE;
/*!40000 ALTER TABLE `item` DISABLE KEYS */;
INSERT INTO `item` VALUES (1,'Sony_XM2',1100,'初级降噪',0,'https://img12.360buyimg.com/n7/jfs/t1/153308/37/12948/287783/5feda8ceEf68df9ea/fe428c62d634d809.jpg'),(2,'Sony_XM3',1200,'中级降噪',0,'https://img13.360buyimg.com/n7/jfs/t1/162012/37/5466/112680/601a7790E23094383/dd13972e46680ff6.jpg'),(3,'Sony_XM4',1300,'高级降噪',4,'https://img10.360buyimg.com/n7/jfs/t1/132549/13/7602/50860/5f3e4926E8dc899e7/ea99eabb3dba7ad1.jpg'),(9,'iPhoneX',3000,'引领业界潮流',0,'https://img12.360buyimg.com/n7/jfs/t1/165611/2/6231/405356/60236e1cE9c6501d4/6d12ddd970f7dd2e.png'),(10,'iPad',2000,'工作生产力',1,'https://img11.360buyimg.com/n7/jfs/t1/123771/23/12622/61075/5f616e9cE68afe904/f90cc40ce6de49bc.jpg');
/*!40000 ALTER TABLE `item` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `item_stock`
--
DROP TABLE IF EXISTS `item_stock`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `item_stock` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`stock` int(11) NOT NULL DEFAULT '0',
`item_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `item_id_index` (`item_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `item_stock`
--
LOCK TABLES `item_stock` WRITE;
/*!40000 ALTER TABLE `item_stock` DISABLE KEYS */;
INSERT INTO `item_stock` VALUES (1,99,1),(2,99,2),(3,95,3),(4,99,9),(5,98,10);
/*!40000 ALTER TABLE `item_stock` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order_info`
--
DROP TABLE IF EXISTS `order_info`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `order_info` (
`id` varchar(32) NOT NULL,
`user_id` int(11) NOT NULL DEFAULT '0',
`item_id` int(11) NOT NULL DEFAULT '0',
`item_price` double NOT NULL DEFAULT '0',
`amount` int(11) NOT NULL DEFAULT '0',
`order_price` double NOT NULL DEFAULT '0',
`promo_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order_info`
--
LOCK TABLES `order_info` WRITE;
/*!40000 ALTER TABLE `order_info` DISABLE KEYS */;
INSERT INTO `order_info` VALUES ('2021021100000100',23,3,100,1,100,1),('2021021100000200',23,10,100,1,100,3),('2021050900000300',25,3,100,1,100,3),('2021050900000400',25,3,100,1,100,3),('2021050900000500',25,3,100,1,100,3),('2021050900000600',25,3,100,1,100,3),('2021050900000700',25,3,100,1,100,3),('2021050900000800',25,3,100,1,100,3),('2021050900000900',25,3,100,1,100,3),('2021050900001000',25,3,100,1,100,3),('2021050900001100',25,10,100,1,100,10),('2021050900001200',25,3,100,1,100,3),('2021050900001300',25,3,100,1,100,3),('2021050900001400',25,3,100,1,100,3),('2021051000001500',25,3,100,1,100,3),('2021051000001600',25,3,100,1,100,3),('2021051000001700',25,3,100,1,100,3),('2021051000001800',25,3,100,1,100,3),('2021051300001900',25,3,100,1,100,3),('2021061800002000',25,3,100,1,100,3),('2022032700002100',27,10,100,1,100,10);
/*!40000 ALTER TABLE `order_info` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `promo`
--
DROP TABLE IF EXISTS `promo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `promo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`promo_name` varchar(255) NOT NULL DEFAULT '',
`start_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`item_id` int(11) NOT NULL DEFAULT '0',
`promo_item_price` double NOT NULL DEFAULT '0',
`end_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `promo`
--
LOCK TABLES `promo` WRITE;
/*!40000 ALTER TABLE `promo` DISABLE KEYS */;
INSERT INTO `promo` VALUES (3,'耳机促销','2021-02-11 00:00:00',3,100,'2021-09-28 00:00:00'),(9,'手机白菜价','2021-02-12 00:00:00',9,100,'2021-10-13 00:00:00'),(10,'平板甩卖','2021-02-11 00:00:00',10,100,'2022-08-01 00:00:00');
/*!40000 ALTER TABLE `promo` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `sequence_info`
--
DROP TABLE IF EXISTS `sequence_info`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sequence_info` (
`name` varchar(255) NOT NULL,
`current_value` int(11) NOT NULL DEFAULT '0',
`step` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `sequence_info`
--
LOCK TABLES `sequence_info` WRITE;
/*!40000 ALTER TABLE `sequence_info` DISABLE KEYS */;
INSERT INTO `sequence_info` VALUES ('order_info',22,1);
/*!40000 ALTER TABLE `sequence_info` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `stock_log`
--
DROP TABLE IF EXISTS `stock_log`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stock_log` (
`stock_log_id` varchar(64) NOT NULL,
`item_id` int(11) NOT NULL DEFAULT '0',
`amount` int(11) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '//1表示初始状态,2表示下单扣减库存成功,3表示下单回滚',
PRIMARY KEY (`stock_log_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `stock_log`
--
LOCK TABLES `stock_log` WRITE;
/*!40000 ALTER TABLE `stock_log` DISABLE KEYS */;
INSERT INTO `stock_log` VALUES ('043e62c24c9d4df695e99bed0565542a',3,1,1),('05215cc36156437dbcc76e73fa82bad0',3,1,1),('06fd7914da5444f7a0dbb48265017155',3,1,1),('085b95e73afa47a0855bf6260236bd05',3,1,1),('3b8c6bcec16842969772aefaada75db9',3,1,1),('3e784505dc494766895bf0c798938f93',3,1,1),('425ce59bb8784a1c9a8e34ca496afd1e',3,1,2),('5081a629b9f1476fac3f7bbefb48c5ff',10,1,1),('54cca8120dc54dc2bf11ad5a58e2bd0d',3,1,1),('58a8776a53454c0ba427767909618be1',3,1,2),('60ee25ea5ab746aca0919a06c24d9f09',3,1,1),('89e3ed8b14f3442ca8001b3e73fbbc81',3,1,1),('8baa618cd7254a20b19f26d9bc758b18',10,1,1),('915a27cf9f5449f5992517913af7f6c2',3,1,1),('9fc72e6b01f04de0a4f13350daf08904',10,1,1),('b7634add7b1545e48818ad1dd0bd6cc4',10,1,1),('ba090eceff8a4d49968c35a3f5a4752d',3,1,1),('c4e3e7b0a9a14d098a2eed99216897b6',3,1,1),('c558e2f6a4424f2f8a7c0c6ccbfb0257',3,1,1),('cc8642358dc646ffa72c51a64f6b6db4',3,1,2),('d022b5e730be40209dfc82f15660e54f',3,1,1),('d6b2f61453e14314a60723e09aa8d71b',10,1,1),('e1e2e8de0ab24bf792ccd1304e777870',3,1,1),('e6a23af1a9154291adbb42e0376b0f37',3,1,1),('e746f2d6ff424eaf96acc5248f2b1d0e',3,1,1),('f0fb45f3a8c24f5f82552393625ae78a',3,1,1),('f1722c026a664b4daceba066d1816192',10,1,1);
/*!40000 ALTER TABLE `stock_log` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user_info`
--
DROP TABLE IF EXISTS `user_info`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL DEFAULT '',
`gender` tinyint(4) NOT NULL DEFAULT '0' COMMENT '//1代表男性,2代表女性',
`age` int(11) NOT NULL DEFAULT '0',
`telphone` varchar(255) NOT NULL DEFAULT '',
`register_mode` varchar(255) NOT NULL DEFAULT '' COMMENT '//byphone,bywechat,byalipay',
`third_party_id` varchar(64) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `telphone_unique_index` (`telphone`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user_info`
--
LOCK TABLES `user_info` WRITE;
/*!40000 ALTER TABLE `user_info` DISABLE KEYS */;
INSERT INTO `user_info` VALUES (25,'zhangsan',1,22,'188888','iPhone','');
/*!40000 ALTER TABLE `user_info` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user_password`
--
DROP TABLE IF EXISTS `user_password`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_password` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`encrpt_password` varchar(128) NOT NULL DEFAULT '',
`user_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user_password`
--
LOCK TABLES `user_password` WRITE;
/*!40000 ALTER TABLE `user_password` DISABLE KEYS */;
INSERT INTO `user_password` VALUES (16,'MDAwMDAw',25);
/*!40000 ALTER TABLE `user_password` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2022-03-27 16:30:53
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/noah2021/miaosha.git
git@gitee.com:noah2021/miaosha.git
noah2021
miaosha
电商秒杀系统深度优化
master

搜索帮助