spring boot 微信点餐 (一)模块及架构介绍
1、项目架构
2系统演进
3、两大微服务架构
4、项目表结构关系
5、建表语句(基于oracel)
-- Create table
create table PRODUCT_INFO
(
product_id VARCHAR2(32) not null,
product_name VARCHAR2(64) not null,
product_price NUMBER(10,2),
product_stock NUMBER(10),
product_description VARCHAR2(64),
product_icon VARCHAR2(512),
catagory_type NUMBER(10),
create_time TIMESTAMP(6) default sysdate,
update_time TIMESTAMP(6)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255;
-- Add comments to the columns
comment on column PRODUCT_INFO.product_name
is '商品名称';
comment on column PRODUCT_INFO.product_price
is '商品单价';
comment on column PRODUCT_INFO.product_stock
is '库存';
comment on column PRODUCT_INFO.product_description
is '描述';
comment on column PRODUCT_INFO.product_icon
is '小图';
comment on column PRODUCT_INFO.catagory_type
is '编号类目';
comment on column PRODUCT_INFO.create_time
is '创建时间';
comment on column PRODUCT_INFO.update_time
is '更新时间';
-- Create/Recreate primary, unique and foreign key constraints
alter table PRODUCT_INFO
add constraint PK_ID primary key (PRODUCT_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255;
-- Create table
create table PRODUCT_CATAGORY
(
catagory_id NUMBER not null,
catagory_name NVARCHAR2(64),
catagory_type NUMBER,
create_time TIMESTAMP(6),
update_time TIMESTAMP(6)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255;
-- Add comments to the table
comment on table PRODUCT_CATAGORY
is '类目表';
-- Add comments to the columns
comment on column PRODUCT_CATAGORY.catagory_name
is 'l类目名称';
comment on column PRODUCT_CATAGORY.catagory_type
is '类目编号';
comment on column PRODUCT_CATAGORY.create_time
is '创建时间';
comment on column PRODUCT_CATAGORY.update_time
is '修改时间';
-- Create/Recreate primary, unique and foreign key constraints
alter table PRODUCT_CATAGORY
add constraint PC_ID primary key (CATAGORY_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255;
-- Create table
create table ORDER_MASTER
(
order_id NVARCHAR2(32) not null,
buyer_name NVARCHAR2(32),
buyer_phone NVARCHAR2(32),
buyer_address NVARCHAR2(128),
buyer_openid NVARCHAR2(64) not null,
order_amount NUMBER(10,2),
order_status CHAR(2) default '0',
pay_status CHAR(2) default '0',
create_time TIMESTAMP(6) default sysdate,
update_time TIMESTAMP(6)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255;
-- Add comments to the columns
comment on column ORDER_MASTER.buyer_name
is '买家名字
';
comment on column ORDER_MASTER.buyer_phone
is '买家电话';
comment on column ORDER_MASTER.buyer_address
is '买家地址';
comment on column ORDER_MASTER.buyer_openid
is '买家微信openid
';
comment on column ORDER_MASTER.order_amount
is '订单总金额';
comment on column ORDER_MASTER.order_status
is '订单订单状态(‘0’新下单)
';
comment on column ORDER_MASTER.pay_status
is '支付状态(‘0’未支付)
';
-- Create/Recreate primary, unique and foreign key constraints
alter table ORDER_MASTER
add constraint OM_ID primary key (ORDER_ID, BUYER_OPENID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255;