码迷,mamicode.com
首页 > 数据库 > 详细

ssm实战(1)------数据库表结构

时间:2019-08-21 13:28:02      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:问题   add   sts   ppi   record   ota   null   prim   ide   

1.数据库分析。

2.maven的pom.xml配置,项目包结构初始化。

3.配置git

4.mybatis-generator逆向工程。

5.整合ssm,配置日志服务,ftp服务,自动注入

6.将整个项目提交到git仓库里,分为两个仓库,一个保留以后做新项目可以使用,一个用来继续写代码

 

总共8个表:1.user:用户表;2.category:分类表;3.product:产品表;4.购物车表cart; 5.支付信息表info;6.订单表order7.订单明细表order_item8.收货地址shipping:

 

1.user用户表:

DROP TABLE IF EXISTS `mmall_user`;  :如果表名为 “mmall_user” 则删除表

AUTO_INCREMENT:自动增长

COMMENT ‘用户表id‘ :为列添加注释

UNIQUE KEY `user_name_unique` :用户名为唯一索引,将唯一值判断交给数据库

`password` varchar(50) NOT NULL COMMENT ‘用户密码,MD5加密‘,    :密码需要进行加密,使得在数据库看不到明文密码

-- ----------------------------
--  Table structure for `mmall_user`
-- ----------------------------
DROP TABLE IF EXISTS `mmall_user`;
CREATE TABLE `mmall_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT ‘用户表id‘,
  `username` varchar(50) NOT NULL COMMENT ‘用户名‘,
  `password` varchar(50) NOT NULL COMMENT ‘用户密码,MD5加密‘,
  `email` varchar(50) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `question` varchar(100) DEFAULT NULL COMMENT ‘找回密码问题‘,
  `answer` varchar(100) DEFAULT NULL COMMENT ‘找回密码答案‘,
  `role` int(4) NOT NULL COMMENT ‘角色0-管理员,1-普通用户‘,
  `create_time` datetime NOT NULL COMMENT ‘创建时间‘,
  `update_time` datetime NOT NULL COMMENT ‘最后一次更新时间‘,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_name_unique` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `mmall_user`
-- ----------------------------
BEGIN;
INSERT INTO `mmall_user` VALUES 
(‘1‘, ‘admin‘, ‘427338237BD929443EC5D48E24FD2B1A‘, ‘admin@happymmall.com‘, ‘13800138000‘, ‘问题‘, ‘答案‘, ‘1‘, ‘2016-11-06 16:56:45‘, ‘2017-04-04 19:27:36‘),
(‘13‘, ‘geely‘, ‘08E9A6EA287E70E7E3F7C982BF7923AC‘, ‘geely@happymmall.com‘, ‘13800138000‘, ‘问题‘, ‘答案‘, ‘0‘, ‘2016-11-19 22:19:25‘, ‘2016-11-19 22:19:25‘),
(‘17‘, ‘rosen‘, ‘095AC193FE2212EEC7A93E8FEFF11902‘, ‘rosen1@happymmall.com‘, ‘13800138000‘, ‘问题‘, ‘答案‘, ‘0‘, ‘2017-03-17 10:51:33‘, ‘2017-04-09 23:13:26‘),
(‘21‘, ‘soonerbetter‘, ‘DE6D76FE7C40D5A1A8F04213F2BEFBEE‘, ‘test06@happymmall.com‘, ‘13800138000‘, ‘105204‘, ‘105204‘, ‘0‘, ‘2017-04-13 21:26:22‘, ‘2017-04-13 21:26:22‘); COMMIT;

 

2.分类表:

`parent_id` :可进行递归查询,当值为0时,为根节点,递归结束。

DEFAULT NULL:默认为空字符

 

-- ----------------------------
--  Table structure for `mmall_category`
-- ----------------------------
DROP TABLE IF EXISTS `mmall_category`;
CREATE TABLE `mmall_category` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT ‘类别Id‘,
  `parent_id` int(11) DEFAULT NULL COMMENT ‘父类别id当id=0时说明是根节点,一级类别‘,
  `name` varchar(50) DEFAULT NULL COMMENT ‘类别名称‘,
  `status` tinyint(1) DEFAULT ‘1‘ COMMENT ‘类别状态1-正常,2-已废弃‘,
  `sort_order` int(4) DEFAULT NULL COMMENT ‘排序编号,同类展示顺序,数值相等则自然排序‘,
  `create_time` datetime DEFAULT NULL COMMENT ‘创建时间‘,
  `update_time` datetime DEFAULT NULL COMMENT ‘更新时间‘,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=100032 DEFAULT CHARSET=utf8;

     数据:

-- ----------------------------
--  Records of `mmall_category`
-- ----------------------------
BEGIN;
INSERT INTO `mmall_category` VALUES 
(‘100001‘, ‘0‘, ‘家用电器‘, ‘1‘, null, ‘2017-03-25 16:46:00‘, ‘2017-03-25 16:46:00‘), 
(‘100002‘, ‘0‘, ‘数码3C‘, ‘1‘, null, ‘2017-03-25 16:46:21‘, ‘2017-03-25 16:46:21‘), 
(‘100003‘, ‘0‘, ‘服装箱包‘, ‘1‘, null, ‘2017-03-25 16:49:53‘, ‘2017-03-25 16:49:53‘), 
(‘100004‘, ‘0‘, ‘食品生鲜‘, ‘1‘, null, ‘2017-03-25 16:50:19‘, ‘2017-03-25 16:50:19‘), 
(‘100005‘, ‘0‘, ‘酒水饮料‘, ‘1‘, null, ‘2017-03-25 16:50:29‘, ‘2017-03-25 16:50:29‘), 
(‘100006‘, ‘100001‘, ‘冰箱‘, ‘1‘, null, ‘2017-03-25 16:52:15‘, ‘2017-03-25 16:52:15‘), 
(‘100007‘, ‘100001‘, ‘电视‘, ‘1‘, null, ‘2017-03-25 16:52:26‘, ‘2017-03-25 16:52:26‘), 
(‘100008‘, ‘100001‘, ‘洗衣机‘, ‘1‘, null, ‘2017-03-25 16:52:39‘, ‘2017-03-25 16:52:39‘), 
(‘100009‘, ‘100001‘, ‘空调‘, ‘1‘, null, ‘2017-03-25 16:52:45‘, ‘2017-03-25 16:52:45‘), 
(‘100010‘, ‘100001‘, ‘电热水器‘, ‘1‘, null, ‘2017-03-25 16:52:54‘, ‘2017-03-25 16:52:54‘), 
(‘100011‘, ‘100002‘, ‘电脑‘, ‘1‘, null, ‘2017-03-25 16:53:18‘, ‘2017-03-25 16:53:18‘), 
(‘100012‘, ‘100002‘, ‘手机‘, ‘1‘, null, ‘2017-03-25 16:53:27‘, ‘2017-03-25 16:53:27‘), 
(‘100013‘, ‘100002‘, ‘平板电脑‘, ‘1‘, null, ‘2017-03-25 16:53:35‘, ‘2017-03-25 16:53:35‘), 
(‘100014‘, ‘100002‘, ‘数码相机‘, ‘1‘, null, ‘2017-03-25 16:53:56‘, ‘2017-03-25 16:53:56‘), 
(‘100015‘, ‘100002‘, ‘3C配件‘, ‘1‘, null, ‘2017-03-25 16:54:07‘, ‘2017-03-25 16:54:07‘), 
(‘100016‘, ‘100003‘, ‘女装‘, ‘1‘, null, ‘2017-03-25 16:54:44‘, ‘2017-03-25 16:54:44‘), 
(‘100017‘, ‘100003‘, ‘帽子‘, ‘1‘, null, ‘2017-03-25 16:54:51‘, ‘2017-03-25 16:54:51‘), 
(‘100018‘, ‘100003‘, ‘旅行箱‘, ‘1‘, null, ‘2017-03-25 16:55:02‘, ‘2017-03-25 16:55:02‘), 
(‘100019‘, ‘100003‘, ‘手提包‘, ‘1‘, null, ‘2017-03-25 16:55:09‘, ‘2017-03-25 16:55:09‘), 
(‘100020‘, ‘100003‘, ‘保暖内衣‘, ‘1‘, null, ‘2017-03-25 16:55:18‘, ‘2017-03-25 16:55:18‘), 
(‘100021‘, ‘100004‘, ‘零食‘, ‘1‘, null, ‘2017-03-25 16:55:30‘, ‘2017-03-25 16:55:30‘), 
(‘100022‘, ‘100004‘, ‘生鲜‘, ‘1‘, null, ‘2017-03-25 16:55:37‘, ‘2017-03-25 16:55:37‘), 
(‘100023‘, ‘100004‘, ‘半成品菜‘, ‘1‘, null, ‘2017-03-25 16:55:47‘, ‘2017-03-25 16:55:47‘), 
(‘100024‘, ‘100004‘, ‘速冻食品‘, ‘1‘, null, ‘2017-03-25 16:55:56‘, ‘2017-03-25 16:55:56‘), 
(‘100025‘, ‘100004‘, ‘进口食品‘, ‘1‘, null, ‘2017-03-25 16:56:06‘, ‘2017-03-25 16:56:06‘), 
(‘100026‘, ‘100005‘, ‘白酒‘, ‘1‘, null, ‘2017-03-25 16:56:22‘, ‘2017-03-25 16:56:22‘), 
(‘100027‘, ‘100005‘, ‘红酒‘, ‘1‘, null, ‘2017-03-25 16:56:30‘, ‘2017-03-25 16:56:30‘), 
(‘100028‘, ‘100005‘, ‘饮料‘, ‘1‘, null, ‘2017-03-25 16:56:37‘, ‘2017-03-25 16:56:37‘), 
(‘100029‘, ‘100005‘, ‘调制鸡尾酒‘, ‘1‘, null, ‘2017-03-25 16:56:45‘, ‘2017-03-25 16:56:45‘), 
(‘100030‘, ‘100005‘, ‘进口洋酒‘, ‘1‘, null, ‘2017-03-25 16:57:05‘, ‘2017-03-25 16:57:05‘);
COMMIT;

 3.产品表:

`price` decimal(20,2) :价格使用 decimal 类型, (20,2):意思是 18位数,小数点后有2位,要避免商业计算丢失精度

 

-- ----------------------------
--  Table structure for `mmall_product`
-- ----------------------------
DROP TABLE IF EXISTS `mmall_product`;
CREATE TABLE `mmall_product` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT ‘商品id‘,
  `category_id` int(11) NOT NULL COMMENT ‘分类id,对应mmall_category表的主键‘,
  `name` varchar(100) NOT NULL COMMENT ‘商品名称‘,
  `subtitle` varchar(200) DEFAULT NULL COMMENT ‘商品副标题‘,
  `main_image` varchar(500) DEFAULT NULL COMMENT ‘产品主图,url相对地址‘,
  `sub_images` text COMMENT ‘图片地址,json格式,扩展用‘,
  `detail` text COMMENT ‘商品详情‘,
  `price` decimal(20,2) NOT NULL COMMENT ‘价格,单位-元保留两位小数‘,
  `stock` int(11) NOT NULL COMMENT ‘库存数量‘,
  `status` int(6) DEFAULT ‘1‘ COMMENT ‘商品状态.1-在售 2-下架 3-删除‘,
  `create_time` datetime DEFAULT NULL COMMENT ‘创建时间‘,
  `update_time` datetime DEFAULT NULL COMMENT ‘更新时间‘,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;

 

4.购物车表:对购物车进行持久化,而不是仅仅储存在session

KEY `user_id_index` (`user_id`) USING BTREE :增加 user_id 的单索引,更方便查询

-- ----------------------------
--  Table structure for `mmall_cart`
-- ----------------------------
DROP TABLE IF EXISTS `mmall_cart`;
CREATE TABLE `mmall_cart` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `product_id` int(11) DEFAULT NULL COMMENT ‘商品id‘,
  `quantity` int(11) DEFAULT NULL COMMENT ‘数量‘,
  `checked` int(11) DEFAULT NULL COMMENT ‘是否选择,1=已勾选,0=未勾选‘,
  `create_time` datetime DEFAULT NULL COMMENT ‘创建时间‘,
  `update_time` datetime DEFAULT NULL COMMENT ‘更新时间‘,
  PRIMARY KEY (`id`),
  KEY `user_id_index` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `mmall_cart`
-- ----------------------------
BEGIN;
INSERT INTO `mmall_cart` VALUES (‘126‘, ‘21‘, ‘26‘, ‘1‘, ‘1‘, ‘2017-04-13 21:27:06‘, ‘2017-04-13 21:27:06‘);
COMMIT;

 5.支付信息表info:

-- ----------------------------
--  Table structure for `mmall_pay_info`
-- ----------------------------
DROP TABLE IF EXISTS `mmall_pay_info`;
CREATE TABLE `mmall_pay_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL COMMENT ‘用户id‘,
  `order_no` bigint(20) DEFAULT NULL COMMENT ‘订单号‘,
  `pay_platform` int(10) DEFAULT NULL COMMENT ‘支付平台:1-支付宝,2-微信‘,
  `platform_number` varchar(200) DEFAULT NULL COMMENT ‘支付宝支付流水号‘,
  `platform_status` varchar(20) DEFAULT NULL COMMENT ‘支付宝支付状态‘,
  `create_time` datetime DEFAULT NULL COMMENT ‘创建时间‘,
  `update_time` datetime DEFAULT NULL COMMENT ‘更新时间‘,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8;

     数据:

-- ----------------------------
--  Records of `mmall_pay_info`
-- ----------------------------
BEGIN;
INSERT INTO `mmall_pay_info` VALUES 
(‘53‘, ‘1‘, ‘1492090946105‘, ‘1‘, ‘2017041321001004300200116250‘, ‘WAIT_BUYER_PAY‘, ‘2017-04-13 21:42:33‘, ‘2017-04-13 21:42:33‘), 
(‘54‘, ‘1‘, ‘1492090946105‘, ‘1‘, ‘2017041321001004300200116250‘, ‘TRADE_SUCCESS‘, ‘2017-04-13 21:42:41‘, ‘2017-04-13 21:42:41‘), 
(‘55‘, ‘1‘, ‘1492091003128‘, ‘1‘, ‘2017041321001004300200116251‘, ‘WAIT_BUYER_PAY‘, ‘2017-04-13 21:43:31‘, ‘2017-04-13 21:43:31‘), 
(‘56‘, ‘1‘, ‘1492091003128‘, ‘1‘, ‘2017041321001004300200116251‘, ‘TRADE_SUCCESS‘, ‘2017-04-13 21:43:38‘, ‘2017-04-13 21:43:38‘), 
(‘57‘, ‘1‘, ‘1492091141269‘, ‘1‘, ‘2017041321001004300200116252‘, ‘WAIT_BUYER_PAY‘, ‘2017-04-13 21:45:59‘, ‘2017-04-13 21:45:59‘), 
(‘58‘, ‘1‘, ‘1492091141269‘, ‘1‘, ‘2017041321001004300200116252‘, ‘TRADE_SUCCESS‘, ‘2017-04-13 21:46:07‘, ‘2017-04-13 21:46:07‘), 
(‘59‘, ‘1‘, ‘1492091110004‘, ‘1‘, ‘2017041321001004300200116396‘, ‘WAIT_BUYER_PAY‘, ‘2017-04-13 21:55:08‘, ‘2017-04-13 21:55:08‘), 
(‘60‘, ‘1‘, ‘1492091110004‘, ‘1‘, ‘2017041321001004300200116396‘, ‘TRADE_SUCCESS‘, ‘2017-04-13 21:55:17‘, ‘2017-04-13 21:55:17‘);
COMMIT;

 

6.订单表order

`shipping_id` int(11) DEFAULT NULL,  :对应订单的地址

-- ----------------------------
--  Table structure for `mmall_order`
-- ----------------------------
DROP TABLE IF EXISTS `mmall_order`;
CREATE TABLE `mmall_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT ‘订单id‘,
  `order_no` bigint(20) DEFAULT NULL COMMENT ‘订单号‘,
  `user_id` int(11) DEFAULT NULL COMMENT ‘用户id‘,
  `shipping_id` int(11) DEFAULT NULL,
  `payment` decimal(20,2) DEFAULT NULL COMMENT ‘实际付款金额,单位是元,保留两位小数‘,
  `payment_type` int(4) DEFAULT NULL COMMENT ‘支付类型,1-在线支付‘,
  `postage` int(10) DEFAULT NULL COMMENT ‘运费,单位是元‘,
  `status` int(10) DEFAULT NULL COMMENT ‘订单状态:0-已取消-10-未付款,20-已付款,40-已发货,50-交易成功,60-交易关闭‘,
  `payment_time` datetime DEFAULT NULL COMMENT ‘支付时间‘,
  `send_time` datetime DEFAULT NULL COMMENT ‘发货时间‘,
  `end_time` datetime DEFAULT NULL COMMENT ‘交易完成时间‘,
  `close_time` datetime DEFAULT NULL COMMENT ‘交易关闭时间‘,
  `create_time` datetime DEFAULT NULL COMMENT ‘创建时间‘,
  `update_time` datetime DEFAULT NULL COMMENT ‘更新时间‘,
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_no_index` (`order_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8;

     数据:

-- ----------------------------
--  Records of `mmall_order`
-- ----------------------------
BEGIN;
INSERT INTO `mmall_order` VALUES 
(‘103‘, ‘1491753014256‘, ‘1‘, ‘25‘, ‘13998.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-09 23:50:14‘, ‘2017-04-09 23:50:14‘),
(‘104‘, ‘1491830695216‘, ‘1‘, ‘26‘, ‘13998.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-10 21:24:55‘, ‘2017-04-10 21:24:55‘),
(‘105‘, ‘1492089528889‘, ‘1‘, ‘29‘, ‘3299.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-13 21:18:48‘, ‘2017-04-13 21:18:48‘),
(‘106‘, ‘1492090946105‘, ‘1‘, ‘29‘, ‘27894.00‘, ‘1‘, ‘0‘, ‘20‘, ‘2017-04-13 21:42:40‘, null, null, null, ‘2017-04-13 21:42:26‘, ‘2017-04-13 21:42:41‘),
(‘107‘, ‘1492091003128‘, ‘1‘, ‘29‘, ‘8597.00‘, ‘1‘, ‘0‘, ‘20‘, ‘2017-04-13 21:43:38‘, null, null, null, ‘2017-04-13 21:43:23‘, ‘2017-04-13 21:43:38‘),
(‘108‘, ‘1492091051313‘, ‘1‘, ‘29‘, ‘1999.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-13 21:44:11‘, ‘2017-04-13 21:44:11‘),
(‘109‘, ‘1492091061513‘, ‘1‘, ‘29‘, ‘6598.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-13 21:44:21‘, ‘2017-04-13 21:44:21‘),
(‘110‘, ‘1492091069563‘, ‘1‘, ‘29‘, ‘3299.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-13 21:44:29‘, ‘2017-04-13 21:44:29‘),
(‘111‘, ‘1492091076073‘, ‘1‘, ‘29‘, ‘4299.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-13 21:44:36‘, ‘2017-04-13 21:44:36‘),
(‘112‘, ‘1492091083720‘, ‘1‘, ‘29‘, ‘3299.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-13 21:44:43‘, ‘2017-04-13 21:44:43‘),
(‘113‘, ‘1492091089794‘, ‘1‘, ‘29‘, ‘6999.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-13 21:44:49‘, ‘2017-04-13 21:44:49‘),
(‘114‘, ‘1492091096400‘, ‘1‘, ‘29‘, ‘6598.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-13 21:44:56‘, ‘2017-04-13 21:44:56‘),
(‘115‘, ‘1492091102371‘, ‘1‘, ‘29‘, ‘3299.00‘, ‘1‘, ‘0‘, ‘10‘, null, null, null, null, ‘2017-04-13 21:45:02‘, ‘2017-04-13 21:45:02‘),
(‘116‘, ‘1492091110004‘, ‘1‘, ‘29‘, ‘8598.00‘, ‘1‘, ‘0‘, ‘40‘, ‘2017-04-13 21:55:16‘, ‘2017-04-13 21:55:31‘, null, null, ‘2017-04-13 21:45:09‘, ‘2017-04-13 21:55:31‘),
(‘117‘, ‘1492091141269‘, ‘1‘, ‘29‘, ‘22894.00‘, ‘1‘, ‘0‘, ‘20‘, ‘2017-04-13 21:46:06‘, null, null, null, ‘2017-04-13 21:45:41‘, ‘2017-04-13 21:46:07‘); COMMIT;

 

7.订单明细表order_item:

`user_id` int(11) DEFAULT NULL, :冗余列,用于加快查询速度

`order_no` bigint(20) DEFAULT NULL,  :用于存放订单号

KEY `order_no_index` (`order_no`) USING BTREE,  :单索引,增加查询速度

KEY `order_no_user_id_index` (`user_id`,`order_no`) USING BTREE :组合索引

-- ----------------------------
--  Table structure for `mmall_order_item`
-- ----------------------------
DROP TABLE IF EXISTS `mmall_order_item`;
CREATE TABLE `mmall_order_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT ‘订单子表id‘,
  `user_id` int(11) DEFAULT NULL,
  `order_no` bigint(20) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL COMMENT ‘商品id‘,
  `product_name` varchar(100) DEFAULT NULL COMMENT ‘商品名称‘,
  `product_image` varchar(500) DEFAULT NULL COMMENT ‘商品图片地址‘,
  `current_unit_price` decimal(20,2) DEFAULT NULL COMMENT ‘生成订单时的商品单价,单位是元,保留两位小数‘,
  `quantity` int(10) DEFAULT NULL COMMENT ‘商品数量‘,
  `total_price` decimal(20,2) DEFAULT NULL COMMENT ‘商品总价,单位是元,保留两位小数‘,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `order_no_index` (`order_no`) USING BTREE,
  KEY `order_no_user_id_index` (`user_id`,`order_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=135 DEFAULT CHARSET=utf8;

     数据:

-- ----------------------------
--  Records of `mmall_order_item`
-- ----------------------------
BEGIN;
INSERT INTO `mmall_order_item` VALUES 
(‘113‘, ‘1‘, ‘1491753014256‘, ‘26‘, ‘Apple iPhone 7 Plus (A1661) 128G 玫瑰金色 移动联通电信4G手机‘, ‘241997c4-9e62-4824-b7f0-7425c3c28917.jpeg‘, ‘6999.00‘, ‘2‘, ‘13998.00‘, ‘2017-04-09 23:50:14‘, ‘2017-04-09 23:50:14‘),
(‘114‘, ‘1‘, ‘1491830695216‘, ‘26‘, ‘Apple iPhone 7 Plus (A1661) 128G 玫瑰金色 移动联通电信4G手机‘, ‘241997c4-9e62-4824-b7f0-7425c3c28917.jpeg‘, ‘6999.00‘, ‘2‘, ‘13998.00‘, ‘2017-04-10 21:24:55‘, ‘2017-04-10 21:24:55‘),
(‘115‘, ‘1‘, ‘1492089528889‘, ‘27‘, ‘Midea/美的 BCD-535WKZM(E)冰箱双开门对开门风冷无霜智能电家用‘, ‘ac3e571d-13ce-4fad-89e8-c92c2eccf536.jpeg‘, ‘3299.00‘, ‘1‘, ‘3299.00‘, ‘2017-04-13 21:18:48‘, ‘2017-04-13 21:18:48‘),
(‘116‘, ‘1‘, ‘1492090946105‘, ‘29‘, ‘Haier/海尔HJ100-1HU1 10公斤滚筒洗衣机全自动带烘干家用大容量 洗烘一体‘, ‘173335a4-5dce-4afd-9f18-a10623724c4e.jpeg‘, ‘4299.00‘, ‘2‘, ‘8598.00‘, ‘2017-04-13 21:42:26‘, ‘2017-04-13 21:42:26‘),
(‘117‘, ‘1‘, ‘1492090946105‘, ‘28‘, ‘4+64G送手环/Huawei/华为 nova 手机P9/P10plus青春‘, ‘0093f5d3-bdb4-4fb0-bec5-5465dfd26363.jpeg‘, ‘1999.00‘, ‘1‘, ‘1999.00‘, ‘2017-04-13 21:42:26‘, ‘2017-04-13 21:42:26‘),
(‘118‘, ‘1‘, ‘1492090946105‘, ‘27‘, ‘Midea/美的 BCD-535WKZM(E)冰箱双开门对开门风冷无霜智能电家用‘, ‘ac3e571d-13ce-4fad-89e8-c92c2eccf536.jpeg‘, ‘3299.00‘, ‘1‘, ‘3299.00‘, ‘2017-04-13 21:42:26‘, ‘2017-04-13 21:42:26‘),
(‘119‘, ‘1‘, ‘1492090946105‘, ‘26‘, ‘Apple iPhone 7 Plus (A1661) 128G 玫瑰金色 移动联通电信4G手机‘, ‘241997c4-9e62-4824-b7f0-7425c3c28917.jpeg‘, ‘6999.00‘, ‘2‘, ‘13998.00‘, ‘2017-04-13 21:42:26‘, ‘2017-04-13 21:42:26‘),
(‘120‘, ‘1‘, ‘1492091003128‘, ‘27‘, ‘Midea/美的 BCD-535WKZM(E)冰箱双开门对开门风冷无霜智能电家用‘, ‘ac3e571d-13ce-4fad-89e8-c92c2eccf536.jpeg‘, ‘3299.00‘, ‘2‘, ‘6598.00‘, ‘2017-04-13 21:43:23‘, ‘2017-04-13 21:43:23‘),
(‘121‘, ‘1‘, ‘1492091003128‘, ‘28‘, ‘4+64G送手环/Huawei/华为 nova 手机P9/P10plus青春‘, ‘0093f5d3-bdb4-4fb0-bec5-5465dfd26363.jpeg‘, ‘1999.00‘, ‘1‘, ‘1999.00‘, ‘2017-04-13 21:43:23‘, ‘2017-04-13 21:43:23‘),
(‘122‘, ‘1‘, ‘1492091051313‘, ‘28‘, ‘4+64G送手环/Huawei/华为 nova 手机P9/P10plus青春‘, ‘0093f5d3-bdb4-4fb0-bec5-5465dfd26363.jpeg‘, ‘1999.00‘, ‘1‘, ‘1999.00‘, ‘2017-04-13 21:44:11‘, ‘2017-04-13 21:44:11‘),
(‘123‘, ‘1‘, ‘1492091061513‘, ‘27‘, ‘Midea/美的 BCD-535WKZM(E)冰箱双开门对开门风冷无霜智能电家用‘, ‘ac3e571d-13ce-4fad-89e8-c92c2eccf536.jpeg‘, ‘3299.00‘, ‘2‘, ‘6598.00‘, ‘2017-04-13 21:44:21‘, ‘2017-04-13 21:44:21‘),
(‘124‘, ‘1‘, ‘1492091069563‘, ‘27‘, ‘Midea/美的 BCD-535WKZM(E)冰箱双开门对开门风冷无霜智能电家用‘, ‘ac3e571d-13ce-4fad-89e8-c92c2eccf536.jpeg‘, ‘3299.00‘, ‘1‘, ‘3299.00‘, ‘2017-04-13 21:44:29‘, ‘2017-04-13 21:44:29‘),
(‘125‘, ‘1‘, ‘1492091076073‘, ‘29‘, ‘Haier/海尔HJ100-1HU1 10公斤滚筒洗衣机全自动带烘干家用大容量 洗烘一体‘, ‘173335a4-5dce-4afd-9f18-a10623724c4e.jpeg‘, ‘4299.00‘, ‘1‘, ‘4299.00‘, ‘2017-04-13 21:44:36‘, ‘2017-04-13 21:44:36‘),
(‘126‘, ‘1‘, ‘1492091083720‘, ‘27‘, ‘Midea/美的 BCD-535WKZM(E)冰箱双开门对开门风冷无霜智能电家用‘, ‘ac3e571d-13ce-4fad-89e8-c92c2eccf536.jpeg‘, ‘3299.00‘, ‘1‘, ‘3299.00‘, ‘2017-04-13 21:44:43‘, ‘2017-04-13 21:44:43‘),
(‘127‘, ‘1‘, ‘1492091089794‘, ‘26‘, ‘Apple iPhone 7 Plus (A1661) 128G 玫瑰金色 移动联通电信4G手机‘, ‘241997c4-9e62-4824-b7f0-7425c3c28917.jpeg‘, ‘6999.00‘, ‘1‘, ‘6999.00‘, ‘2017-04-13 21:44:49‘, ‘2017-04-13 21:44:49‘),
(‘128‘, ‘1‘, ‘1492091096400‘, ‘27‘, ‘Midea/美的 BCD-535WKZM(E)冰箱双开门对开门风冷无霜智能电家用‘, ‘ac3e571d-13ce-4fad-89e8-c92c2eccf536.jpeg‘, ‘3299.00‘, ‘2‘, ‘6598.00‘, ‘2017-04-13 21:44:56‘, ‘2017-04-13 21:44:56‘),
(‘129‘, ‘1‘, ‘1492091102371‘, ‘27‘, ‘Midea/美的 BCD-535WKZM(E)冰箱双开门对开门风冷无霜智能电家用‘, ‘ac3e571d-13ce-4fad-89e8-c92c2eccf536.jpeg‘, ‘3299.00‘, ‘1‘, ‘3299.00‘, ‘2017-04-13 21:45:02‘, ‘2017-04-13 21:45:02‘),
(‘130‘, ‘1‘, ‘1492091110004‘, ‘29‘, ‘Haier/海尔HJ100-1HU1 10公斤滚筒洗衣机全自动带烘干家用大容量 洗烘一体‘, ‘173335a4-5dce-4afd-9f18-a10623724c4e.jpeg‘, ‘4299.00‘, ‘2‘, ‘8598.00‘, ‘2017-04-13 21:45:09‘, ‘2017-04-13 21:45:09‘),
(‘131‘, ‘1‘, ‘1492091141269‘, ‘26‘, ‘Apple iPhone 7 Plus (A1661) 128G 玫瑰金色 移动联通电信4G手机‘, ‘241997c4-9e62-4824-b7f0-7425c3c28917.jpeg‘, ‘6999.00‘, ‘1‘, ‘6999.00‘, ‘2017-04-13 21:45:41‘, ‘2017-04-13 21:45:41‘),
(‘132‘, ‘1‘, ‘1492091141269‘, ‘27‘, ‘Midea/美的 BCD-535WKZM(E)冰箱双开门对开门风冷无霜智能电家用‘, ‘ac3e571d-13ce-4fad-89e8-c92c2eccf536.jpeg‘, ‘3299.00‘, ‘1‘, ‘3299.00‘, ‘2017-04-13 21:45:41‘, ‘2017-04-13 21:45:41‘),
(‘133‘, ‘1‘, ‘1492091141269‘, ‘29‘, ‘Haier/海尔HJ100-1HU1 10公斤滚筒洗衣机全自动带烘干家用大容量 洗烘一体‘, ‘173335a4-5dce-4afd-9f18-a10623724c4e.jpeg‘, ‘4299.00‘, ‘2‘, ‘8598.00‘, ‘2017-04-13 21:45:41‘, ‘2017-04-13 21:45:41‘),
(‘134‘, ‘1‘, ‘1492091141269‘, ‘28‘, ‘4+64G送手环/Huawei/华为 nova 手机P9/P10plus青春‘, ‘0093f5d3-bdb4-4fb0-bec5-5465dfd26363.jpeg‘, ‘1999.00‘, ‘2‘, ‘3998.00‘, ‘2017-04-13 21:45:41‘, ‘2017-04-13 21:45:41‘); COMMIT;

 

8.收货地址shipping:

-- ----------------------------
--  Table structure for `mmall_shipping`
-- ----------------------------
DROP TABLE IF EXISTS `mmall_shipping`;
CREATE TABLE `mmall_shipping` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL COMMENT ‘用户id‘,
  `receiver_name` varchar(20) DEFAULT NULL COMMENT ‘收货姓名‘,
  `receiver_phone` varchar(20) DEFAULT NULL COMMENT ‘收货固定电话‘,
  `receiver_mobile` varchar(20) DEFAULT NULL COMMENT ‘收货移动电话‘,
  `receiver_province` varchar(20) DEFAULT NULL COMMENT ‘省份‘,
  `receiver_city` varchar(20) DEFAULT NULL COMMENT ‘城市‘,
  `receiver_district` varchar(20) DEFAULT NULL COMMENT ‘区/县‘,
  `receiver_address` varchar(200) DEFAULT NULL COMMENT ‘详细地址‘,
  `receiver_zip` varchar(6) DEFAULT NULL COMMENT ‘邮编‘,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;

     数据:

-- ----------------------------
--  Records of `mmall_shipping`
-- ----------------------------
BEGIN;
INSERT INTO `mmall_shipping` VALUES 
(‘4‘, ‘13‘, ‘geely‘, ‘010‘, ‘18688888888‘, ‘北京‘, ‘北京市‘, ‘海淀区‘, ‘中关村‘, ‘100000‘, ‘2017-01-22 14:26:25‘, ‘2017-01-22 14:26:25‘),
(‘7‘, ‘17‘, ‘Rosen‘, ‘13800138000‘, ‘13800138000‘, ‘北京‘, ‘北京‘, null, ‘中关村‘, ‘100000‘, ‘2017-03-29 12:11:01‘, ‘2017-03-29 12:11:01‘),
(‘29‘, ‘1‘, ‘吉利‘, ‘13800138000‘, ‘13800138000‘, ‘北京‘, ‘北京‘, ‘海淀区‘, ‘海淀区中关村‘, ‘100000‘, ‘2017-04-09 18:33:32‘, ‘2017-04-09 18:33:32‘); COMMIT;

 

ssm实战(1)------数据库表结构

标签:问题   add   sts   ppi   record   ota   null   prim   ide   

原文地址:https://www.cnblogs.com/Lemonades/p/11240717.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!