数据库设计搭建

电子商城数据库搭建

​ 主要参考了(5条消息) 常见电商项目的数据库表设计(MySQL版)_下河捉鱼的博客-CSDN博客_电商数据库设计这篇csdn的帖子搭建。

用户登录表
用户ID用户名密码
用户地址表
地址ID用户ID详细地址
用户信息表
用户信息ID用户ID昵称姓名性别生日电话电子邮件银行卡ID优惠券ID账户余额总积分
银行卡表
银行卡ID银行银行卡卡号银行卡类型身份证号手机号码
商品信息表
商品ID分类ID商品名称原价优惠ID快递价格月销量累计销量累计评价口味ID包装ID库存配料表产品标准号食用方法原料产地产品规格生产许可证编号产地保质期存储方法
口味表
口味id口味
包装表
包装id包装
优惠表
优惠id优惠券编号优惠券名字固定减免价格百分比减免价格开始时间结束时间
商品分类表
分类ID分类名称父分类ID分类层级
商品图片表
商品ID图片描述图片URL是否为主图片图片排序
商品评论表
评论ID商品ID订单ID用户ID评论内容评论时间
订单主表
订单ID订单编号下单人ID收货人姓名地址支付方式订单金额运费金额支付金额快递公司名称快递单号下单时间发货时间支付时间收货时间订单状态订单积分
订单详情表
订单详情表id订单表ID订单商品ID商品名称购买商品数量购买商品单价商品重量优惠分摊金额
购物车表
购物车ID用户ID商品ID加入购物车商品数量商品价格加入购物车时间
物流公司信息表
物流公司信息ID物流公司名称物流公司联系人物流公司联系电话配送价格

记着这就是数据库刚开始的模样,那么青涩,想的那么美好。但是后续陆陆续续在一周之内修改了30个版本。而且最后修改出来的只能说是马马虎虎。

数据库文件:

-- 创建orangedb数据库
drop database if exists orangedb;
create database if not exists orangedb;
use orangedb;

-- 建立测试表
drop table if exists test;
create table if not exists test(
	id int(4) primary key auto_increment comment '测试表id',
	name varchar(50) comment '测试名'
)engine=innodb charset=utf8 auto_increment=1 comment '测试表';

insert into test values (1,"test1"),(2,"test2"),(3,"test3"),(4,"test4");


-- 用户地址表
drop table if exists user_address;
create table if not exists  user_address(
	addressId int(4) primary key auto_increment comment '主键ID',
	userId int(4) comment '用户ID',
	province varchar(50) comment '省',
	city varchar(50) comment '市',
	area varchar(50) comment '区',
	detailedAddress varchar(50) comment '详细地址'
)engine=innodb charset=utf8 auto_increment=1 comment '用户地址表';

insert into user_address(userId,province,city,area,detailedAddress) values (1,'江苏省','南京市','江宁区','文鼎广场课工场');

-- 用户信息表
drop table if exists user_information;
create table if not exists  user_information(
	userInfoId int(4) primary key auto_increment comment '主键ID',
	userId int(4) comment '用户ID',
	nickName varchar(50) comment '昵称',
	name varchar(50) comment '姓名',
	gender varchar(50) comment '性别,1:男,2:女,3:保密',
	birthday datetime comment '生日',
	phoneNum varchar(20)  comment '电话号码',
	email  varchar(50) comment '电子邮件',
	accountBalance  int(20) comment '账户余额',
	totalPoints int(20) comment '总积分'
)engine=innodb charset=utf8 auto_increment=1 comment '用户信息表';

insert into user_information(userId,nickName,name,gender,birthday,phoneNum,email,accountBalance,totalPoints) values (1,1,'55开','卢本伟',NOW(),'13955555555',1,9999,9999);

-- 银行卡表
drop table if exists user_bank_card;
create table if not exists  user_bank_card(
	bankCardId int(4) primary key auto_increment comment '主键ID',
	userId int(4) comment '用户ID',
	bankName varchar(50) comment '银行名',
	bankCardNum varchar(50) comment '银行卡卡号',
	bankCardType varchar(50) comment '银行卡类型',
	idCardNum varchar(50) comment '身份证号码',
	phoneNum varchar(20) comment '电话号码'
)engine=innodb charset=utf8 auto_increment=1 comment '用户银行卡表';

insert into user_bank_card(userId,bankName,bankCardNum,bankCardType,idCardNum,phoneNum) values (1,'中国工商银行','6222022013012065091','信用卡','320999184811200515','13955555555');

-- 优惠劵表
drop table if exists coupon;
create table if not exists coupon(
	couponId int(4) primary key auto_increment comment '优惠券主键ID',
	userId int(4) comment '用户ID',
	couponNum varchar(50) comment '优惠券编号',
	couponName varchar(50) comment '优惠券名',
	fixDiscount int(10) comment '固定折扣',
	percentDiscount int(10) comment '百分比折扣,0~10分别代表1折到10折,0:免费,10:不打折',
	startTime datetime comment '开始时间',
	endTime datetime comment '结束时间'
)engine=innodb charset=utf8 auto_increment=1 comment '优惠券表';

insert into coupon(userId,couponNum,couponName,fixDiscount,percentDiscount,startTime,endTime) values (1,'10001','满减卷','10','10',NOW(),'2077-5-20'),(1,'10002','打折劵','0','5',NOW(),'2077-5-20');



-- 账单明细表
drop table if exists user_bill;
create table if not exists user_bill(
	billId int(4) primary key auto_increment comment '账单id',
	userId int(4) comment '用户ID',
	createDate datetime not null comment '创建时间',
	detail varchar(10) not null comment '1:消费,2:提现,3:退款至钱包,4:充值',
	price int(10) not null comment '金额'
)engine=innodb default charset=utf8 auto_increment=1 comment '用户账单表';

insert into user_bill(userId,createDate,detail,price) values (1,now(),'1',20),(1,now(),'2',20),(1,now(),'3',20);

-- 用户收藏表
drop table if exists user_collection;
create table if not exists user_collection(
	collectionId int(4) primary key auto_increment comment '收藏id',
	productId int(4) comment '商品id'
)engine=innodb default charset=utf8  auto_increment=1 comment '用户收藏表';

insert into user_collection(collectionId,productId) values (1,1);


-- 用户足迹表
drop table if exists user_footprint;
create table if not exists user_footprint(
	footPrintId int(4) primary key auto_increment comment '收藏id',
	productId int(4) comment '商品id'
)engine=innodb default charset=utf8 auto_increment=1 comment '用户足迹表';

insert into user_footprint(footPrintId,productId) values (1,1);

-- 用户登录表
drop table if exists `user_login`;
create table if not exists `user_login`(
	`userId` int(4) primary key auto_increment comment '用户id',
	`userName` varchar(32) not null comment '用户名',
	`password` varchar(32) not null comment '密码'
)engine=innodb default charset=utf8 auto_increment=1 comment '用户登录表';

insert into user_login(userName,password) values ('admin','admin');


-- 购物车表
DROP TABLE IF EXISTS `cart`;
CREATE TABLE `cart` (
  `carId` int(4) PRIMARY KEY auto_increment comment '购物车主键id',
  `userId` int(4) COMMENT '用户表id',
  `productId` int(4)  COMMENT '商品id',
	`proName` varchar(64) DEFAULT NULL COMMENT '商品名称',
	`price` int(64) DEFAULT NULL COMMENT '单价',
  `quantity` int(11) DEFAULT NULL COMMENT '数量',
	`amount` int(64) DEFAULT NULL COMMENT '金额',
  `checked` int(11) DEFAULT NULL COMMENT '是否选择,1=已勾选,0=未勾选',
  `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  `updateTime` datetime DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1 comment '购物车表';

insert into cart(userId,productId,proName,price,quantity,amount,checked,createTime,updateTime) values (1,1,'商品A',50,2,100,1,now(),now());



-- 商品地址表
DROP TABLE IF EXISTS `shop_address`;
CREATE TABLE `shop_address` (
  `shopId` int(4) NOT NULL COMMENT '收货信息id',
  `userId` int(4) DEFAULT NULL COMMENT '用户id',
  `receiverName` varchar(20) DEFAULT NULL COMMENT '收货人姓名',
  `receiverMobile` varchar(20) DEFAULT NULL COMMENT '收货移动电话',
  `receiverProvince` varchar(20) DEFAULT NULL COMMENT '省份',
  `receiverCity` varchar(20) DEFAULT NULL COMMENT '城市',
  `receiverDistrict` varchar(20) DEFAULT NULL COMMENT '区/县',
  `receiverAddress` varchar(200) DEFAULT NULL COMMENT '详细地址',
  `createTime` datetime DEFAULT NULL,
  `updateTime` datetime DEFAULT NULL,
  PRIMARY KEY (`shopId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


-- 物流方式表
DROP TABLE IF EXISTS `logistics`;
CREATE TABLE IF NOT EXISTS `logistics` (
  `logisticsId` int(6) NOT NULL COMMENT '物流id',
  `logisticsName` varchar(64) DEFAULT NULL COMMENT '物流名称',
  PRIMARY KEY (`logisticsId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `logistics` VALUES ('1', '圆通');  
INSERT INTO `logistics` VALUES ('2', '申通');  
INSERT INTO `logistics` VALUES ('3', '韵达');  
INSERT INTO `logistics` VALUES ('4', '中通');  
INSERT INTO `logistics` VALUES ('5', '顺丰'); 

-- 支付方式表
DROP TABLE IF EXISTS `payType`;
CREATE TABLE IF NOT EXISTS `payType` (
  `payTypeId` int(6) NOT NULL COMMENT '支付方式id',
  `payTypeName` varchar(64) DEFAULT NULL COMMENT '支付方式名称',
  PRIMARY KEY (`payTypeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `payType` VALUES ('1', '银联');  
INSERT INTO `payType` VALUES ('2', '微信');  
INSERT INTO `payType` VALUES ('3', '支付宝'); 

-- 订单表
DROP TABLE IF EXISTS `orders`;
CREATE TABLE IF NOT EXISTS `orders` (
  `orderId` int(4) PRIMARY KEY NOT NULL auto_increment COMMENT '订单id',
	`orderNum` varchar(64) NOT NULL COMMENT '订单流水号',
  `userId` int(4) DEFAULT NULL COMMENT '用户id',
  `shopId` int(4) DEFAULT NULL COMMENT '收货信息id',
  `logisticsId` int(6) NOT NULL COMMENT '物流id',
	`payTypeId` int(6) NOT NULL COMMENT '支付方式id',
	`payment` decimal(20,2) DEFAULT NULL COMMENT '实际付款金额,单位是元,保留两位小数,含运费',
  `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  `updateTime` datetime DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1 comment='订单表';

insert into orders(orderNum,userId,shopId,logisticsId,payTypeId,payment,createTime,updateTime) value('101',1,1,1,1,20.00,now(),now());


-- =========================================================================================================================================================

-- 商品表
DROP TABLE IF EXISTS `product`;
CREATE TABLE IF NOT EXISTS `product` (
  `productId` bigint(10) auto_increment NOT NULL primary key COMMENT '商品id',
  `brandId` bigint(10) DEFAULT NULL COMMENT '品牌Id',
	`kindId` bigint(10) DEFAULT NULL COMMENT '种类Id',
  `productName` varchar(100) NOT NULL COMMENT '商品名称',
  `price` decimal(20,2) NOT NULL COMMENT '价格,单位-元保留两位小数',
	`monthSales` int(4) comment '月销量',
	`totalSales` int(4) comment '累计销量',
	`totalEvaluate` int(4) comment '累计评价',
	`tasteId` bigint(10) comment '品味id',
	`packId` bigint(10) comment '包装id',
	`stock` int(11) NOT NULL COMMENT '库存数量',
	`burdenSheet` varchar(100) comment '配料表',
	`productStandardCode` varchar(100) comment '产品标准号',
	`edibleMethods` varchar(10) comment '食用方法',
	`producingArea` varchar(255) comment '原料产地',
	`productLicenseNo` varchar(100) COMMENT '生产许可证编号',
	`area` varchar(255) comment '产地',
	`expirationDate` varchar(255) comment '保质期',
	`storageMethod` varchar(100) comment '存储方法'
)engine=innodb DEFAULT CHARSET=utf8 auto_increment=1 comment '商品信息表';

insert into product(brandId,kindId,productName,price,monthSales,totalSales,
totalEvaluate,tasteId,packId,stock,burdenSheet,productStandardCode,edibleMethods,
producingArea,productLicenseNo,area,expirationDate,storageMethod) 
value(1,1,"良品铺子 手剥松子218g 坚果炒货 巴西松子",56.90,9999,9999,9999,1,1,999,
'进口松子、食用盐','GB/T 22165','开袋去壳即食','巴基斯坦','QS4201 1801 0226','湖北省武汉市',
'180天','请放置于常温、阴凉、通风、干燥处保存');

-- 口味表
DROP TABLE IF EXISTS `taste`;
CREATE TABLE IF NOT EXISTS `taste`(
	`statusId` int(4) not null primary key comment '口味id',
	`statusName` varchar(100) not null comment '口味名'
)engine=innodb DEFAULT CHARSET=utf8 comment '口味表';

insert into taste(statusId,statusName) value(1,'原味'),(2,'奶油'),(3,'炭烧'),(4,'咸香');

-- 包装表
DROP TABLE IF EXISTS `pack`;
CREATE TABLE IF NOT EXISTS `pack`(
	`packId` int(4)  not null primary key comment '包装id',
	`packName` varchar(100) not null comment '包装名'
)engine=innodb DEFAULT CHARSET=utf8 comment '包装表';

insert into pack(packId,packName) value(1,'手袋单人份'),(2,'礼盒双人份'),(3,'全家福利包');


-- 品牌表
CREATE TABLE `brand`(
	`brandId` bigint(10) not null primary key comment '品牌id',
	`brandName` varchar(100) not null comment '品牌名'
)engine=innodb DEFAULT CHARSET=utf8  comment '品牌表';

insert into brand(brandId,brandName) value(1,'百草味'),(2,'良品铺子'),(3,'新农哥'),(4,'楼兰蜜语'),(5,'口水娃'),(6,'考拉兄弟');


-- 种类表
DROP TABLE IF EXISTS `kind`;
CREATE TABLE `kind`(
	`kindId` bigint(10)  not null primary key comment '种类id',
	`kindName` varchar(100) not null comment '种类名'
)engine=innodb DEFAULT CHARSET=utf8 comment '种类表';

insert into kind(kindId,kindName) value(1,'东北松子'),(2,'巴西松子'),(3,'夏威夷松子'),(4,'松子');


-- 图片表
DROP TABLE IF EXISTS `picture`;
CREATE TABLE IF NOT EXISTS `picture`(
	`pictureId` bigint(10)  not null primary key comment '图片id',
	`productId`  bigint(10) not null comment '商品id',
	`isMain` int(2) comment '是否为封面图1.是,0.不是',
	`description` varchar(100) not null comment '图片描述',
	`pictureUrl` varchar(255) comment '图片URL'
)engine=innodb DEFAULT CHARSET=utf8 comment '商品图片表';

insert into picture(pictureId,productId,isMain,description,pictureUrl) value(1,1,1,'松子封面图','../images/tw1.jpg');


-- 评论表
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments`(
	`commentId` bigint(10) auto_increment not null primary key comment '评论id',
	`productId`  bigint(10) not null comment '商品id',
	`orderId`  bigint(10) not null comment '订单id',
	`userId`  bigint(10) not null comment '用户id',
	`commentContent` varchar(255) comment '评论内容',
	`commentDate` dateTime comment '评论时间'
)engine=innodb DEFAULT CHARSET=utf8 auto_increment=1 comment '商品评论表';


insert into comments(productId,orderId,userId,commentContent,commentDate) value(1,1,1,'宝贝非常漂亮,超级喜欢!!! 口红颜色很正呐,还有第两支半价,买三支免单一支的活动,下次还要来买。就是物流太慢了,还要我自己去取快递,店家不考虑换个物流么?'
,now());



-- V1.1更新:图片表更新============================================================================================================================================================================================================================================
-- 图片表
DROP TABLE IF EXISTS `picture`;
CREATE TABLE IF NOT EXISTS `picture`(
	`pictureId` bigint(10)  not null primary key comment '图片id',
	`productId`  bigint(10) not null comment '商品id',
	`isMain` int(2) comment '是否为封面图1.是,0.不是',
	`description` varchar(100) not null comment '图片描述',
	`pictureUrl` varchar(255) comment '图片URL'
)engine=innodb DEFAULT CHARSET=utf8 comment '商品图片表';

insert into picture(pictureId,productId,isMain,description,pictureUrl) value(1,1,1,'松子封面图','../images/tw1.jpg');


-- V1.2更新:商品表更新============================================================================================================================================================================================================================================
-- 商品表
DROP TABLE IF EXISTS `product`;
CREATE TABLE IF NOT EXISTS `product` (
  `productId` bigint(10) auto_increment NOT NULL primary key COMMENT '商品id',
  `brandId` bigint(10) DEFAULT NULL COMMENT '品牌Id',
	`kindId` bigint(10) DEFAULT NULL COMMENT '种类Id',
  `productName` varchar(100) NOT NULL COMMENT '商品名称',
  `price` decimal(20,2) NOT NULL COMMENT '价格,单位-元保留两位小数',
	`monthSales` int(4) comment '月销量',
	`totalSales` int(4) comment '累计销量',
	`totalEvaluate` int(4) comment '累计评价',
	`tasteId` bigint(10) comment '品味id',
	`packId` bigint(10) comment '包装id',
	`stock` int(11) NOT NULL COMMENT '库存数量',
	`burdenSheet` varchar(100) comment '配料表',
	`productStandardCode` varchar(100) comment '产品标准号',
	`edibleMethods` varchar(10) comment '食用方法',
	`producingArea` varchar(255) comment '原料产地',
	`productLicenseNo` varchar(100) COMMENT '生产许可证编号',
	`area` varchar(255) comment '产地',
	`expirationDate` varchar(255) comment '保质期',
	`storageMethod` varchar(100) comment '存储方法',
	`pictureUrl` varchar(255) comment '图片路径'
)engine=innodb DEFAULT CHARSET=utf8 auto_increment=1 comment '商品信息表';


INSERT INTO `product` VALUES (1, 1, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/tw1.jpg');
INSERT INTO `product` VALUES (2, 2, 1, '野生东北开口手剥红松子散装特大颗粒5斤整箱 2020新货孕妇坚果', 56.90, 9999, 9998, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/tw2.jpg');
INSERT INTO `product` VALUES (3, 3, 1, '良品铺子 手剥松子218g  巴西松子', 56.90, 9999, 9997, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/12.jpg');
INSERT INTO `product` VALUES (4, 4, 1, '良品铺子 手剥松子218g 坚果炒货 ', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/13.jpg');
INSERT INTO `product` VALUES (5, 5, 2, ' 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/14.jpg');
INSERT INTO `product` VALUES (6, 3, 3, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/15.jpg');
INSERT INTO `product` VALUES (7, 3, 4, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/16.jpg');
INSERT INTO `product` VALUES (8, 3, 5, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/17.jpg');
INSERT INTO `product` VALUES (9, 3, 5, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/18.jpg');
INSERT INTO `product` VALUES (10, 3, 6, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/19.jpg');
INSERT INTO `product` VALUES (11, 3, 2, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/20.jpg');
INSERT INTO `product` VALUES (12, 3, 3, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 57.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/21.jpg');
INSERT INTO `product` VALUES (13, 3, 4, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/22.jpg');
INSERT INTO `product` VALUES (14, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/23.jpg');
INSERT INTO `product` VALUES (15, 3, 3, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/24.jpg');
INSERT INTO `product` VALUES (16, 3, 6, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/25.jpg');
INSERT INTO `product` VALUES (17, 3, 5, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/26.jpg');
INSERT INTO `product` VALUES (24, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/27.jpg');
INSERT INTO `product` VALUES (25, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/28.jpg');
INSERT INTO `product` VALUES (26, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/29.jpg');
INSERT INTO `product` VALUES (27, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/30.jpg');
INSERT INTO `product` VALUES (28, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/31.jpg');
INSERT INTO `product` VALUES (29, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/32.jpg');
INSERT INTO `product` VALUES (30, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/33.jpg');
INSERT INTO `product` VALUES (31, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/34.jpg');
INSERT INTO `product` VALUES (32, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/35.jpg');
INSERT INTO `product` VALUES (33, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/36.jpg');
INSERT INTO `product` VALUES (34, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/37.jpg');
INSERT INTO `product` VALUES (35, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/38.jpg');
INSERT INTO `product` VALUES (36, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/39.jpg');
INSERT INTO `product` VALUES (37, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/40.jpg');
INSERT INTO `product` VALUES (38, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/41.jpg');
INSERT INTO `product` VALUES (39, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/42.jpg');
INSERT INTO `product` VALUES (40, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/43.jpg');
INSERT INTO `product` VALUES (41, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/44.jpg');
INSERT INTO `product` VALUES (42, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/45.jpg');
INSERT INTO `product` VALUES (43, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/46.jpg');
INSERT INTO `product` VALUES (44, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/47.jpg');
INSERT INTO `product` VALUES (45, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/48.jpg');
INSERT INTO `product` VALUES (46, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/49.jpg');


-- V1.3更新:购物车表更新============================================================================================================================================================================================================================================
-- 购物车表
DROP TABLE IF EXISTS `cart`;
CREATE TABLE `cart` (
  `carId` int(11) PRIMARY KEY AUTO_INCREMENT,
  `userId` int(11) DEFAULT NULL COMMENT '用户表id',
  `productId` int(11) DEFAULT NULL COMMENT '商品id',
	`proName` varchar(64) DEFAULT NULL COMMENT '商品名称',
	`price` double DEFAULT NULL COMMENT '单价',
  `quantity` int(11) DEFAULT NULL COMMENT '数量',
	`amount` double DEFAULT NULL COMMENT '金额',
  `checked` int(11) DEFAULT NULL COMMENT '是否选择,1=已勾选,0=未勾选',
  `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  `updateTime` datetime DEFAULT NULL COMMENT '更新时间'
  
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

insert into cart(userId,productId,proName,price,quantity,amount,checked,createTime,updateTime) values (1,1,'商品A',50,2,100,1,now(),now());


-- V1.4更新:用户信息表更新============================================================================================================================================================================================================================================
-- 用户信息表
drop table if exists user_information;
create table if not exists  user_information(
	userInfoId int(4) primary key auto_increment comment '主键ID',
	userId int(4) comment '用户ID',
	nickName varchar(50) comment '昵称',
	name varchar(50) comment '姓名',
	gender varchar(50) comment '性别,1:男,2:女,3:保密',
	birthday datetime comment '生日',
	phoneNum varchar(20)  comment '电话号码',
	email  varchar(50) comment '电子邮件',
	accountBalance  int(20) comment '账户余额',
	totalPoints int(20) comment '总积分'
)engine=innodb charset=utf8 auto_increment=1 comment '用户信息表';

insert into user_information(userId,nickName,name,gender,birthday,phoneNum,email,accountBalance,totalPoints) values (1,'55开','卢本伟',1,NOW(),'13955555555','LbwNB@55.com',9999,9999);

-- V1.5更新:订单表更新============================================================================================================================================================================================================================================
-- 订单表
DROP TABLE IF EXISTS `orders`;
CREATE TABLE IF NOT EXISTS `orders` (
  `orderId` int(4) PRIMARY KEY NOT NULL auto_increment COMMENT '订单id',
	`orderNum` varchar(64) NOT NULL COMMENT '订单流水号',
  `userId` int(4) DEFAULT NULL COMMENT '用户id',
  `shopId` int(4) DEFAULT NULL COMMENT '收货信息id',
  `logisticsId` int(6) NOT NULL COMMENT '物流id',
	`payTypeId` int(6) NOT NULL COMMENT '支付方式id',
	`payment` decimal(20,2) DEFAULT NULL COMMENT '实际付款金额,单位是元,保留两位小数,含运费',
  `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  `updateTime` datetime DEFAULT NULL COMMENT '更新时间',
	`orderStatus` int(4) DEFAULT NULL COMMENT '订单状态,1.已下单,2.已付款,3.已发货,4.已收货,5.已评价,'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1 comment='订单表';

insert into orders(orderNum,userId,shopId,logisticsId,payTypeId,payment,createTime,updateTime,orderStatus) value('101',1,1,1,1,20.00,now(),now(),1);




-- V1.6更新:中国行政区域表删除============================================================================================================================================================================================================================================
-- 中国行政区域表
DROP TABLE IF EXISTS `china`;  

-- V1.7更新:购物车表更新============================================================================================================================================================================================================================================
-- 购物车表
DROP TABLE IF EXISTS `cart`;
CREATE TABLE `cart` (
  `carId` int(11) PRIMARY KEY AUTO_INCREMENT,
  `userId` int(11) DEFAULT NULL COMMENT '用户表id',
  `productId` int(11) DEFAULT NULL COMMENT '商品id',
	`pictureUrl` varchar(255) comment '图片路径',
	`proName` varchar(64) DEFAULT NULL COMMENT '商品名称',
	`price` double DEFAULT NULL COMMENT '单价',
  `quantity` int(11) DEFAULT NULL COMMENT '数量',
	`amount` double DEFAULT NULL COMMENT '金额',
  `checked` int(11) DEFAULT NULL COMMENT '是否选择,1=已勾选,0=未勾选',
  `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  `updateTime` datetime DEFAULT NULL COMMENT '更新时间'
  
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

insert into cart(userId,productId,pictureUrl,proName,price,quantity,amount,checked,createTime,updateTime) values (1,1,'../images/1.jpg','商品A',50,2,100,1,now(),now());



-- V1.8更新:口味表更新============================================================================================================================================================================================================================================
-- 口味表
DROP TABLE IF EXISTS `taste`;
CREATE TABLE IF NOT EXISTS `taste`(
	`tasteId` int(4) not null primary key comment '口味id',
	`tasteName` varchar(100) not null comment '口味名'
)engine=innodb DEFAULT CHARSET=utf8 comment '口味表';

insert into taste(tasteId,tasteName) value(1,'原味'),(2,'奶油'),(3,'炭烧'),(4,'咸香');



-- V1.9更新:用户信息表更新============================================================================================================================================================================================================================================
-- 用户信息表
drop table if exists user_information;
create table if not exists  user_information(
	userInfoId int(4) primary key auto_increment comment '主键ID',
	userId int(4) comment '用户ID',
	nickName varchar(50) comment '昵称',
	name varchar(50) comment '姓名',
	gender varchar(50) comment '性别,1:男,2:女,3:保密',
	birthday datetime comment '生日',
	phoneNum varchar(20)  comment '电话号码',
	email  varchar(50) comment '电子邮件',
	accountBalance  int(20) comment '账户余额',
	totalPoints int(20) comment '总积分',
	userProfile varchar(255) comment '用户头像'
)engine=innodb charset=utf8 auto_increment=1 comment '用户信息表';

insert into user_information(userId,nickName,name,gender,birthday,phoneNum,email,accountBalance,totalPoints,userProfile) values (1,'55开','卢本伟',1,NOW(),'13955555555','LbwNB@55.com',9999,9999,'../images/getAvatar.do.jpg');




-- V2.0更新:购物车表更新============================================================================================================================================================================================================================================
-- 购物车表
DROP TABLE IF EXISTS `cart`;
CREATE TABLE `cart` (
  `carId` int(11) PRIMARY KEY AUTO_INCREMENT,
  `userId` int(11) NOT NULL COMMENT '用户表id',
  `productId` int(11) NOT NULL COMMENT '商品id',
	`pictureUrl` varchar(255) comment '图片路径',
	`proName` varchar(64) NOT NULL COMMENT '商品名称',
	`price` double NOT NULL COMMENT '单价',
  `quantity` int(11) NOT NULL COMMENT '数量',
	`flavor` varchar(64) not null comment '商品口味',
	`pack` varchar(64) not null comment '商品包装',
	`amount` double DEFAULT NULL COMMENT '总金额',
  `checked` int(11) NOT NULL COMMENT '是否选择,1=已勾选,0=未勾选',
  `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  `updateTime` datetime DEFAULT NULL COMMENT '更新时间'
  
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `cart` ( `userId`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `createTime`, `updateTime`) VALUES (1, 1, '../images/tw1.jpg', '商品A', 50, 2, '原味', '手袋单人份', 100, 1, '2021-07-06 08:46:53', '2021-07-06 08:46:53');
INSERT INTO `cart` ( `userId`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `createTime`, `updateTime`) VALUES (1, 1, '../images/tw1.jpg', '商品A', 50, 2, '原味', '手袋单人份', 100, 1, '2021-07-06 08:46:53', '2021-07-06 08:46:53');
INSERT INTO `cart` ( `userId`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `createTime`, `updateTime`) VALUES (1, 1, '../images/tw1.jpg', '商品A', 50, 2, '原味', '手袋单人份', 100, 1, '2021-07-06 08:46:53', '2021-07-06 08:46:53');
INSERT INTO `cart` ( `userId`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `createTime`, `updateTime`) VALUES (1, 1, '../images/tw1.jpg', '商品A', 50, 2, '原味', '手袋单人份', 100, 1, '2021-07-06 08:46:53', '2021-07-06 08:46:53');
INSERT INTO `cart` ( `userId`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `createTime`, `updateTime`) VALUES (1, 1, '../images/tw1.jpg', '商品A', 50, 2, '原味', '手袋单人份', 100, 1, '2021-07-06 08:46:53', '2021-07-06 08:46:53');


-- V2.1更新:订单表更新============================================================================================================================================================================================================================================
-- 订单表
DROP TABLE IF EXISTS `orders`;
CREATE TABLE IF NOT EXISTS `orders` (
  `orderId` int(4) PRIMARY KEY NOT NULL auto_increment COMMENT '订单id',
	`orderNum` varchar(64) NOT NULL COMMENT '订单流水号',
  `userId` int(4) DEFAULT NULL COMMENT '用户id',
  `receiverName` varchar(20) NOT NULL COMMENT '收货人姓名',
  `receiverMobile` varchar(20) NOT NULL COMMENT '收货移动电话',
  `receiverProvince` varchar(20) NOT NULL COMMENT '省份',
  `receiverCity` varchar(20) NOT NULL COMMENT '城市',
  `receiverDistrict` varchar(20) NOT NULL COMMENT '区/县',
  `receiverAddress` varchar(200) NOT NULL COMMENT '详细地址',
  `logisticsName` varchar(16) NOT NULL COMMENT '物流名称',
	`payType` varchar(16) NOT NULL default '支付宝' COMMENT '支付方式',
	`productId` int(11) NOT NULL COMMENT '商品id',
	`pictureUrl` varchar(255) comment '图片路径',
	`proName` varchar(64) NOT NULL COMMENT '商品名称',
	`price` double NOT NULL COMMENT '单价',
  `quantity` int(11) NOT NULL COMMENT '数量',
	`flavor` varchar(64) not null comment '商品口味',
	`pack` varchar(64) not null comment '商品包装',
	`amount` double DEFAULT NULL COMMENT '总金额',
  `checked` int(11) NOT NULL COMMENT '是否选择,1=已勾选,0=未勾选',
	`payment` decimal(20,2) DEFAULT NULL COMMENT '实际付款金额,单位是元,保留两位小数,含运费',
  `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  `updateTime` datetime DEFAULT NULL COMMENT '更新时间',
	`orderStatus` int(4) DEFAULT NULL COMMENT '订单状态,1.已下单,2.已付款,3.已发货,4.已收货,5.已评价'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1 comment='订单表';


INSERT INTO `orders` (`orderId`, `orderNum`, `userId`, `receiverName`, `receiverMobile`, `receiverProvince`, `receiverCity`, `receiverDistrict`, `receiverAddress`, `logisticsName`, `payType`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `payment`, `createTime`, `updateTime`, `orderStatus`) VALUES (1, '2021771', 1, '武启龙', '15824869789', '江苏省', '南京市', '江宁区', '弘景大道99号', '圆通', '支付宝', 1, '../images/tw1.jpg', '商品A', 50, 2, '原味', '手袋单人份', 100, 1, 190.00, '2021-07-08 09:21:40', '2021-07-08 09:21:40', 2);
INSERT INTO `orders` (`orderId`, `orderNum`, `userId`, `receiverName`, `receiverMobile`, `receiverProvince`, `receiverCity`, `receiverDistrict`, `receiverAddress`, `logisticsName`, `payType`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `payment`, `createTime`, `updateTime`, `orderStatus`) VALUES (2, '2021771', 1, '武启龙', '15824869789', '江苏省', '南京市', '江宁区', '弘景大道99号', '圆通', '支付宝', 2, '../images/tw1.jpg', '商品B', 30, 3, '辣味', '手袋单人份', 90, 1, 190.00, '2021-07-08 09:21:40', '2021-07-08 09:21:40', 2);
INSERT INTO `orders` (`orderId`, `orderNum`, `userId`, `receiverName`, `receiverMobile`, `receiverProvince`, `receiverCity`, `receiverDistrict`, `receiverAddress`, `logisticsName`, `payType`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `payment`, `createTime`, `updateTime`, `orderStatus`) VALUES (3, '12550533', 1, '武启龙', '15824869789', '江苏省', '南京市', '江宁区', '弘景大道99号', '申通', '支付宝', 1, '../images/tw1.jpg', '商品A', 50, 2, '原味', '手袋单人份', 100, 1, 190.00, '2021-07-08 09:49:16', '2021-07-08 09:49:16', 2);
INSERT INTO `orders` (`orderId`, `orderNum`, `userId`, `receiverName`, `receiverMobile`, `receiverProvince`, `receiverCity`, `receiverDistrict`, `receiverAddress`, `logisticsName`, `payType`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `payment`, `createTime`, `updateTime`, `orderStatus`) VALUES (4, '12550533', 1, '武启龙', '15824869789', '江苏省', '南京市', '江宁区', '弘景大道99号', '申通', '支付宝', 2, '../images/tw1.jpg', '商品B', 30, 3, '辣味', '手袋单人份', 90, 1, 190.00, '2021-07-08 09:49:16', '2021-07-08 09:49:16', 2);



-- V2.2更新:用户足迹表更新============================================================================================================================================================================================================================================
-- 用户足迹表
drop table if exists user_footprint;
create table if not exists user_footprint(
	userId int(4) COMMENT '用户表id',
	footPrintId int(4) primary key auto_increment comment '足迹id',
	productId int(4) comment '商品id'
)engine=innodb default charset=utf8 auto_increment=1 comment '用户足迹表';

insert into user_footprint(userId,productId) values (1,1);
insert into user_footprint(userId,productId) values (1,2);
insert into user_footprint(userId,productId) values (1,3);
insert into user_footprint(userId,productId) values (1,4);
insert into user_footprint(userId,productId) values (1,5);
insert into user_footprint(userId,productId) values (1,6);



-- V2.3更新:用户收藏表更新============================================================================================================================================================================================================================================
-- 用户收藏表
drop table if exists user_collection;
create table if not exists user_collection(
	userId int(4) COMMENT '用户表id',
	collectionId int(4) primary key auto_increment comment '收藏id',
	productId int(4) comment '商品id'
)engine=innodb default charset=utf8  auto_increment=1 comment '用户收藏表';

insert into user_collection(userId,productId) values (1,1);
insert into user_collection(userId,productId) values (1,2);
insert into user_collection(userId,productId) values (1,3);
insert into user_collection(userId,productId) values (1,4);
insert into user_collection(userId,productId) values (1,5);
insert into user_collection(userId,productId) values (1,6);



-- V2.4更新:图片表更新============================================================================================================================================================================================================================================
-- 图片表
DROP TABLE IF EXISTS `picture`;
CREATE TABLE `picture`  (
  `pictureId` bigint(10) NOT NULL AUTO_INCREMENT COMMENT '图片id',
  `productId` bigint(10) NOT NULL COMMENT '商品id',
  `isMain` int(2) NULL DEFAULT NULL COMMENT '是否为封面图1.是,0.不是',
  `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '图片描述',
  `pictureUrl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片URL',
  PRIMARY KEY (`pictureId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品图片表' ROW_FORMAT = Dynamic;

INSERT INTO `picture` VALUES (1, 1, 1, '松子封面图', '../images/01');
INSERT INTO `picture` VALUES (2, 1, 1, '松子封面图', '../images/02');
INSERT INTO `picture` VALUES (3, 1, 1, '松子封面图', '../images/03');
INSERT INTO `picture` VALUES (4, 2, 1, '松子封面图', '../images/03');
INSERT INTO `picture` VALUES (5, 2, 1, '松子封面图', '../images/02');
INSERT INTO `picture` VALUES (6, 2, 1, '松子封面图', '../images/01');
INSERT INTO `picture` VALUES (7, 3, 1, '松子封面图', '../images/01');
INSERT INTO `picture` VALUES (8, 3, 1, '松子封面图', '../images/02');
INSERT INTO `picture` VALUES (9, 3, 1, '松子封面图', '../images/03');
INSERT INTO `picture` VALUES (10, 4, 1, '松子封面图', '../images/03');
INSERT INTO `picture` VALUES (11, 4, 1, '松子封面图', '../images/02');
INSERT INTO `picture` VALUES (12, 4, 1, '松子封面图', '../images/01');


-- V2.5更新:商品地址表更新============================================================================================================================================================================================================================================
-- 商品地址表
DROP TABLE IF EXISTS `shop_address`;
DROP TABLE IF EXISTS `shop_adress`;
CREATE TABLE `shop_address` (
  `shopId` int(6) NOT NULL auto_increment COMMENT '收货信息id',
  `userId` int(6) NOT NULL COMMENT '用户id',
	`defaultTag` int(6) NOT NULL DEFAULT 1 COMMENT '地址标识:0代表默认地址,1代表普通地址',
  `receiverName` varchar(20) NOT NULL COMMENT '收货人姓名',
  `receiverMobile` varchar(20) NOT NULL COMMENT '收货移动电话',
  `receiverProvince` varchar(20) NOT NULL COMMENT '省份',
  `receiverCity` varchar(20) NOT NULL COMMENT '城市',
  `receiverDistrict` varchar(20) NOT NULL COMMENT '区/县',
  `receiverAddress` varchar(200) NOT NULL COMMENT '详细地址',
  PRIMARY KEY (`shopId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1;

insert into `shop_address`(`userId`,`defaultTag`,`receiverName`,`receiverMobile`,`receiverProvince`,`receiverCity`,`receiverDistrict`,`receiverAddress`) values (1,
 0, '马珏浩', '18260044820', '江苏省', '南京市', '江宁区', '金陵科技学院');
insert into `shop_address`(`userId`,`defaultTag`,`receiverName`,`receiverMobile`,`receiverProvince`,`receiverCity`,`receiverDistrict`,`receiverAddress`) values (1,
 1, '武启龙', '15824869789', '江苏省', '南京市', '江宁区', '弘景大道99号');
insert into `shop_address`(`userId`,`defaultTag`,`receiverName`,`receiverMobile`,`receiverProvince`,`receiverCity`,`receiverDistrict`,`receiverAddress`) values (1,
 1, '侯星翔', '15865456465', '江苏省', '南京市', '江宁区', '协众雅居');
insert into `shop_address`(`userId`,`defaultTag`,`receiverName`,`receiverMobile`,`receiverProvince`,`receiverCity`,`receiverDistrict`,`receiverAddress`) values (1,
1, '王盛旺', '15811111111', '江苏省', '南京市', '江宁区', '月球');
insert into `shop_address`(`userId`,`defaultTag`,`receiverName`,`receiverMobile`,`receiverProvince`,`receiverCity`,`receiverDistrict`,`receiverAddress`) values (1,
 1, '王林军', '18599999999', '江苏省', '南京市', '江宁区', '冥王星');


-- V2.6更新:订单表更新============================================================================================================================================================================================================================================
-- 订单表
DROP TABLE IF EXISTS `orders`;
CREATE TABLE IF NOT EXISTS `orders` (
  `orderId` int(4) PRIMARY KEY NOT NULL auto_increment COMMENT '订单id',
	`orderNum` varchar(64) NOT NULL COMMENT '订单流水号',
  `userId` int(4) DEFAULT NULL COMMENT '用户id',
  `receiverName` varchar(20) NOT NULL COMMENT '收货人姓名',
  `receiverMobile` varchar(20) NOT NULL COMMENT '收货移动电话',
  `receiverProvince` varchar(20) NOT NULL COMMENT '省份',
  `receiverCity` varchar(20) NOT NULL COMMENT '城市',
  `receiverDistrict` varchar(20) NOT NULL COMMENT '区/县',
  `receiverAddress` varchar(200) NOT NULL COMMENT '详细地址',
  `logisticsName` varchar(16) NOT NULL COMMENT '物流名称',
	`payType` varchar(16) NOT NULL default '支付宝' COMMENT '支付方式',
	`productId` int(11) NOT NULL COMMENT '商品id',
	`pictureUrl` varchar(255) comment '图片路径',
	`proName` varchar(64) NOT NULL COMMENT '商品名称',
	`price` double NOT NULL COMMENT '单价',
  `quantity` int(11) NOT NULL COMMENT '数量',
	`flavor` varchar(64) not null comment '商品口味',
	`pack` varchar(64) not null comment '商品包装',
	`amount` double DEFAULT NULL COMMENT '总金额',
  `checked` int(11) NOT NULL COMMENT '是否选择,1=已勾选,0=未勾选',
	`payment` decimal(20,2) DEFAULT NULL COMMENT '实际付款金额,单位是元,保留两位小数,含运费',
  `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  `updateTime` datetime DEFAULT NULL COMMENT '更新时间',
	`orderStatus` varchar(16) DEFAULT NULL COMMENT '订单状态,1.已下单,2.已付款,3.已发货,4.已收货,5.已评价'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1 comment='订单表';

INSERT INTO `orders` (`orderId`, `orderNum`, `userId`, `receiverName`, `receiverMobile`, `receiverProvince`, `receiverCity`, `receiverDistrict`, `receiverAddress`, `logisticsName`, `payType`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `payment`, `createTime`, `updateTime`, `orderStatus`) VALUES (1, '12550533', 1, '武启龙', '15824869789', '江苏省', '南京市', '江宁区', '弘景大道99号', '申通', '支付宝', 1, '../images/tw1.jpg', '商品A', 50, 2, '原味', '手袋单人份', 100, 1, 190.00, '2021-07-08 09:49:16', '2021-07-08 09:49:16', '已付款');
INSERT INTO `orders` (`orderId`, `orderNum`, `userId`, `receiverName`, `receiverMobile`, `receiverProvince`, `receiverCity`, `receiverDistrict`, `receiverAddress`, `logisticsName`, `payType`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`, `amount`, `checked`, `payment`, `createTime`, `updateTime`, `orderStatus`) VALUES (2, '12550533', 1, '武启龙', '15824869789', '江苏省', '南京市', '江宁区', '弘景大道99号', '申通', '支付宝', 2, '../images/tw1.jpg', '商品B', 30, 3, '辣味', '手袋单人份', 90, 1, 190.00, '2021-07-08 09:49:16', '2021-07-08 09:49:16', '已付款');


-- V2.7更新:订单表更新============================================================================================================================================================================================================================================
-- 订单表
DROP TABLE IF EXISTS `orders`;
CREATE TABLE IF NOT EXISTS `orders` (
  `orderId` int(4) PRIMARY KEY NOT NULL auto_increment COMMENT '订单id',
	`orderNum` varchar(64) NOT NULL COMMENT '订单流水号',
  `userId` int(4) DEFAULT NULL COMMENT '用户id',
  `receiverName` varchar(20) NOT NULL COMMENT '收货人姓名',
  `receiverMobile` varchar(20) NOT NULL COMMENT '收货移动电话',
  `receiverProvince` varchar(20) NOT NULL COMMENT '省份',
  `receiverCity` varchar(20) NOT NULL COMMENT '城市',
  `receiverDistrict` varchar(20) NOT NULL COMMENT '区/县',
  `receiverAddress` varchar(200) NOT NULL COMMENT '详细地址',
  `logisticsName` varchar(16) NOT NULL COMMENT '物流名称',
	`payType` varchar(16) NOT NULL default '支付宝' COMMENT '支付方式',
	`productId` int(11) NOT NULL COMMENT '商品id',
	`pictureUrl` varchar(255) comment '图片路径',
	`proName` varchar(64) NOT NULL COMMENT '商品名称',
	`price` double NOT NULL COMMENT '单价',
  `quantity` int(11) NOT NULL COMMENT '数量',
	`flavor` varchar(64) not null comment '商品口味',
	`pack` varchar(64) not null comment '商品包装',
	`freight` varchar(16) not null comment '运费',
	`amount` double DEFAULT NULL COMMENT '总金额',
  `checked` int(11) NOT NULL COMMENT '是否选择,1=已勾选,0=未勾选',
	`payment` decimal(20,2) DEFAULT NULL COMMENT '实际付款金额,单位是元,保留两位小数,含运费',
  `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  `updateTime` datetime DEFAULT NULL COMMENT '更新时间',
	`orderStatus` varchar(16) DEFAULT NULL COMMENT '订单状态,1.已下单,2.已付款,3.已发货,4.已收货,5.已评价'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 auto_increment=1 comment='订单表';

INSERT INTO `orders` (`orderId`, `orderNum`, `userId`, `receiverName`, `receiverMobile`, `receiverProvince`, `receiverCity`, `receiverDistrict`, `receiverAddress`, `logisticsName`, `payType`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`,`freight`, `amount`, `checked`, `payment`, `createTime`, `updateTime`, `orderStatus`) VALUES (1, '12550533', 1, '武启龙', '15824869789', '江苏省', '南京市', '江宁区', '弘景大道99号', '申通', '支付宝', 1, '../images/tw1.jpg', '商品A', 50, 2, '原味', '手袋单人份','包邮', 100, 1, 190.00, '2021-07-08 09:49:16', '2021-07-08 09:49:16', '已付款');
INSERT INTO `orders` (`orderId`, `orderNum`, `userId`, `receiverName`, `receiverMobile`, `receiverProvince`, `receiverCity`, `receiverDistrict`, `receiverAddress`, `logisticsName`, `payType`, `productId`, `pictureUrl`, `proName`, `price`, `quantity`, `flavor`, `pack`,`freight`, `amount`, `checked`, `payment`, `createTime`, `updateTime`, `orderStatus`) VALUES (2, '12550533', 1, '武启龙', '15824869789', '江苏省', '南京市', '江宁区', '弘景大道99号', '申通', '支付宝', 2, '../images/tw1.jpg', '商品B', 30, 3, '辣味', '手袋单人份','包邮', 90, 1, 190.00, '2021-07-08 09:49:16', '2021-07-08 09:49:16', '已付款');



-- V2.8更新:用户登录表更新============================================================================================================================================================================================================================================
-- 用户登录表
drop table if exists `user_login`;
create table if not exists `user_login`(
	`userId` int(4) primary key auto_increment comment '用户id',
	`phone` VARCHAR(11) not null comment '手机号',
	`userName` varchar(32) not null comment '用户名',
	`password` varchar(16) not null comment '密码'
)engine=innodb default charset=utf8 auto_increment=1 comment '用户登录表';



-- V2.9更新:用户登录表更新============================================================================================================================================================================================================================================
-- 用户登录表
drop table if exists `user_login`;
create table if not exists `user_login`(
	`userId` int(4) primary key auto_increment comment '用户id',
	`phone` VARCHAR(11) not null comment '手机号',
	`userName` varchar(32) not null comment '用户名',
	`password` varchar(255) not null comment '密码'
)engine=innodb default charset=utf8 auto_increment=1 comment '用户登录表';

insert into user_login(phone,userName,password) values ('18260044820','admin','admin');



-- V3.0更新:购物车表更新============================================================================================================================================================================================================================================
-- 购物车表
DROP TABLE IF EXISTS `cart`;
CREATE TABLE `cart`  (
  `carId` int(11) NOT NULL AUTO_INCREMENT,
  `userId` int(11) NOT NULL COMMENT '用户表id',
  `productId` int(11) NOT NULL COMMENT '商品id',
  `pictureUrl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片路径',
  `proName` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品名称',
  `price` double NOT NULL COMMENT '单价',
  `quantity` int(11) NOT NULL COMMENT '数量',
  `flavor` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品口味',
  `pack` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品包装',
  `amount` double NULL DEFAULT NULL COMMENT '总金额',
  `checked` int(11) NOT NULL DEFAULT 0 COMMENT '是否选择,1=已勾选,0=未勾选',
  `createTime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `updateTime` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `stock` int(11) NOT NULL COMMENT '库存数量',
  PRIMARY KEY (`carId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 32 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;


INSERT INTO `cart` VALUES (23, 1, 2, '../images/tw1.jpg', '野生东北开口手剥红松子散装特大颗粒5斤整箱 2020新货孕妇坚果', 56.9, 1, '原味', '手袋单人份', 280, 0, '2021-07-12 14:39:22', '2021-07-12 14:39:22', 0);
INSERT INTO `cart` VALUES (29, 1, 4, '../images/tw1.jpg', '良品铺子 手剥松子218g 坚果炒货 ', 56.9, 1, '原味', '手袋单人份', 56.9, 0, '2021-07-12 16:08:30', '2021-07-12 16:08:30', 0);
INSERT INTO `cart` VALUES (30, 1, 8, '../images/tw1.jpg', '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.9, 1, '原味', '手袋单人份', 112, 0, '2021-07-12 16:08:35', '2021-07-12 16:08:35', 0);
INSERT INTO `cart` VALUES (31, 1, 2, '../images/tw1.jpg', '野生东北开口手剥红松子散装特大颗粒5斤整箱 2020新货孕妇坚果', 56.9, 11, '原味', '手袋单人份', 616, 0, '2021-07-12 16:11:52', '2021-07-12 16:11:52', 0);



-- V3.1更新:商品表更新============================================================================================================================================================================================================================================
-- 

DROP TABLE IF EXISTS `product`;
CREATE TABLE `product`  (
  `productId` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '商品id',
  `brandId` bigint(20) NULL DEFAULT NULL COMMENT '品牌Id',
  `kindId` bigint(20) NULL DEFAULT NULL COMMENT '种类Id',
  `productName` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品名称',
  `price` decimal(20, 2) NOT NULL COMMENT '价格,单位-元保留两位小数',
  `monthSales` int(11) NULL DEFAULT NULL COMMENT '月销量',
  `totalSales` int(11) NULL DEFAULT NULL COMMENT '累计销量',
  `totalEvaluate` int(11) NULL DEFAULT NULL COMMENT '累计评价',
  `tasteId` bigint(20) NULL DEFAULT NULL COMMENT '品味id',
  `packId` bigint(20) NULL DEFAULT NULL COMMENT '包装id',
  `stock` int(11) NOT NULL COMMENT '库存数量',
  `burdenSheet` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配料表',
  `productStandardCode` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品标准号',
  `edibleMethods` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '食用方法',
  `producingArea` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原料产地',
  `productLicenseNo` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生产许可证编号',
  `area` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产地',
  `expirationDate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保质期',
  `storageMethod` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '存储方法',
  `pictureUrl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片路径',
  PRIMARY KEY (`productId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品信息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of product
-- ----------------------------
INSERT INTO `product` VALUES (1, 1, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 10000, 10000, 9999, 1, 1, 998, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/tw1.jpg');
INSERT INTO `product` VALUES (2, 2, 1, '野生东北开口手剥红松子散装特大颗粒5斤整箱 2020新货孕妇坚果', 56.90, 9999, 9998, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/tw2.jpg');
INSERT INTO `product` VALUES (3, 3, 1, '良品铺子 手剥松子218g  巴西松子', 56.90, 9999, 9997, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/12.jpg');
INSERT INTO `product` VALUES (4, 4, 1, '良品铺子 手剥松子218g 坚果炒货 ', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/13.jpg');
INSERT INTO `product` VALUES (5, 5, 2, ' 手剥松子218g 坚果炒货 巴西松子', 56.90, 10000, 10000, 9999, 1, 1, 998, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/14.jpg');
INSERT INTO `product` VALUES (6, 3, 3, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/15.jpg');
INSERT INTO `product` VALUES (7, 3, 4, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 10000, 10000, 9999, 1, 1, 998, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/16.jpg');
INSERT INTO `product` VALUES (8, 3, 5, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/17.jpg');
INSERT INTO `product` VALUES (9, 3, 5, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/18.jpg');
INSERT INTO `product` VALUES (10, 3, 6, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/19.jpg');
INSERT INTO `product` VALUES (11, 3, 2, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/20.jpg');
INSERT INTO `product` VALUES (12, 3, 3, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 57.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/21.jpg');
INSERT INTO `product` VALUES (13, 3, 4, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/22.jpg');
INSERT INTO `product` VALUES (14, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/23.jpg');
INSERT INTO `product` VALUES (15, 3, 3, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/24.jpg');
INSERT INTO `product` VALUES (16, 3, 6, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/25.jpg');
INSERT INTO `product` VALUES (17, 3, 5, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/26.jpg');
INSERT INTO `product` VALUES (24, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 78.80, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/27.jpg');
INSERT INTO `product` VALUES (25, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/28.jpg');
INSERT INTO `product` VALUES (26, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/29.jpg');
INSERT INTO `product` VALUES (27, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/30.jpg');
INSERT INTO `product` VALUES (28, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/31.jpg');
INSERT INTO `product` VALUES (29, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 59.40, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/32.jpg');
INSERT INTO `product` VALUES (30, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/33.jpg');
INSERT INTO `product` VALUES (31, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/34.jpg');
INSERT INTO `product` VALUES (32, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/35.jpg');
INSERT INTO `product` VALUES (33, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/36.jpg');
INSERT INTO `product` VALUES (34, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/37.jpg');
INSERT INTO `product` VALUES (35, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 88.88, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/38.jpg');
INSERT INTO `product` VALUES (36, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/39.jpg');
INSERT INTO `product` VALUES (37, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/40.jpg');
INSERT INTO `product` VALUES (38, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/41.jpg');
INSERT INTO `product` VALUES (39, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 66.66, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/42.jpg');
INSERT INTO `product` VALUES (40, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/43.jpg');
INSERT INTO `product` VALUES (41, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/44.jpg');
INSERT INTO `product` VALUES (42, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 49.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/45.jpg');
INSERT INTO `product` VALUES (43, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/46.jpg');
INSERT INTO `product` VALUES (44, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/47.jpg');
INSERT INTO `product` VALUES (45, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 56.90, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/48.jpg');
INSERT INTO `product` VALUES (46, 3, 1, '良品铺子 手剥松子218g 坚果炒货 巴西松子', 36.66, 9999, 9999, 9999, 1, 1, 999, '进口松子、食用盐', 'GB/T 22165', '开袋去壳即食', '巴基斯坦', 'QS4201 1801 0226', '湖北省武汉市', '180天', '请放置于常温、阴凉、通风、干燥处保存', '../images/49.jpg');

包括了一些测试数据的插入,因为和项目耦合性很高,所以没什么通用性,只能是做差不多相同的商城项目时才能用到。(正经商场给我们做成了松子商场23333)

Q.E.D.