SSM整合案例企业权限管理系统(2):订单操作

一、表结构分析

1.订单表:orders

1.1建表语句

CREATE TABLE orders(
id INT AUTO_INCREMENT PRIMARY KEY,
orderNum VARCHAR(20) NOT NULL UNIQUE,
orderTime TIMESTAMP,
peopleCount INT,
orderDesc VARCHAR(500),
payType INT,
orderStatus INT,
productId INT,
memberId INT,
FOREIGN KEY (productId) REFERENCES product(id),
FOREIGN KEY (memberId) REFERENCES member(id)
)ENGINE=INNODB DEFAULT CHARSET=utf8mb4

1.2测试数据

INSERT INTO ORDERS (ordernum, ordertime, peoplecount, orderdesc, paytype, orderstatus,
productid, memberid) VALUES ('54311', 20180302120000, 2, '没什么', 0, 1, 2,1);
INSERT INTO ORDERS (ordernum, ordertime, peoplecount, orderdesc, paytype, orderstatus,
productid, memberid) VALUES ('54331', 20180302120000, 2, '没什么', 0, 1, 2,2);
INSERT INTO ORDERS (ordernum, ordertime, peoplecount, orderdesc, paytype, orderstatus,
productid, memberid) VALUES ('54351', 20180302120000, 2, '没什么', 0, 1, 1,1);
INSERT INTO ORDERS (ordernum, ordertime, peoplecount, orderdesc, paytype, orderstatus,
productid, memberid) VALUES ('14321', 20180302120000, 2, '没什么', 0, 1, 1,1);
INSERT INTO ORDERS (ordernum, ordertime, peoplecount, orderdesc, paytype, orderstatus,
productid, memberid) VALUES ('34321', 20180302120000, 2, '没什么', 0, 1, 1,1);
INSERT INTO ORDERS (ordernum, ordertime, peoplecount, orderdesc, paytype, orderstatus,
productid, memberid) VALUES ('84321', 20180302120000, 2, '没什么', 0, 1, 2,1);
INSERT INTO ORDERS (ordernum, ordertime, peoplecount, orderdesc, paytype, orderstatus,
productid, memberid) VALUES ('13321', 20180302120000, 2, '没什么', 0, 1, 2,1);
INSERT INTO ORDERS (ordernum, ordertime, peoplecount, orderdesc, paytype, orderstatus,
productid, memberid) VALUES ('42321', 20180302120000, 2, '没什么', 0, 1, 1,2);
INSERT INTO ORDERS (ordernum, ordertime,
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值