Order Module Database Table Resolution

Keywords: MySQL Mobile SpringBoot github Database

SpringBoot e-commerce project mall (20k+star) address: https://github.com/macrozheng/mall

abstract

This paper mainly parses the function related tables of order return and the reason of order return, using the form of database table and function comparison.

Order Return

Related table structure

Order Return Request Form

Mainly used to store member return application information, it is important to note that the four states of order return application form: 0->pending processing; 1->in return; 2->completed; 3->rejected.

create table oms_order_return_apply
(
   id                   bigint not null auto_increment,
   order_id             bigint comment 'Order id',
   company_address_id   bigint comment 'Receipt Address Table id',
   product_id           bigint comment 'Return Goods id',
   order_sn             varchar(64) comment 'Order Number',
   create_time          datetime comment 'Time of application',
   member_username      varchar(64) comment 'UserName',
   return_amount        decimal(10,2) comment 'refund amount',
   return_name          varchar(100) comment 'Return name',
   return_phone         varchar(100) comment 'Return Call',
   status               int(1) comment 'Application status: 0->To be processed; 1->Return in progress; 2->Completed; 3->Rejected',
   handle_time          datetime comment 'processing time',
   product_pic          varchar(500) comment 'Merchandise Picture',
   product_name         varchar(200) comment 'Commodity Name',
   product_brand        varchar(200) comment 'Commodity Brand',
   product_attr         varchar(500) comment 'Sales attributes: color: red; size: xl;',
   product_count        int comment 'Return quantity',
   product_price        decimal(10,2) comment 'item pricing',
   product_real_price   decimal(10,2) comment 'Commodity Actual Payment Unit Price',
   reason               varchar(200) comment 'Reason',
   description          varchar(500) comment 'describe',
   proof_pics           varchar(1000) comment 'Picture of vouchers, separated by commas',
   handle_note          varchar(500) comment 'Processing Notes',
   handle_man           varchar(100) comment 'Handler',
   receive_man          varchar(100) comment 'Consignee',
   receive_time         datetime comment 'Time of receipt',
   receive_note         varchar(500) comment 'Remarks on receipt',
   primary key (id)
);

Company Receipt Address Table

Select the receiving address when processing the return request.

create table oms_company_address
(
   id                   bigint not null auto_increment,
   address_name         varchar(200) comment 'Address Name',
   send_status          int(1) comment 'Default shipping address:0->No; 1->yes',
   receive_status       int(1) comment 'Default shipping address:0->No; 1->yes',
   name                 varchar(64) comment 'Shipper Name',
   phone                varchar(64) comment 'Phone',
   province             varchar(64) comment 'province/Municipality directly under the Central Government',
   city                 varchar(64) comment 'city',
   region               varchar(64) comment 'area',
   detail_address       varchar(200) comment 'Detailed address',
   primary key (id)
);

Management side presentation

  • Return Request List

  • Details of pending status


  • Details of status in return


  • Details of Completed Status


  • Details of rejected status


Mobile Display

  • Open after-sales service in me

  • Click Apply for Return to apply for return

  • Submit return application

  • View return application record in application record

  • View return application progress details

Order Return Reason Setup

Order Return Reason Table

Select the reason for return when members return.

create table oms_order_return_reason
(
   id                   bigint not null auto_increment,
   name                 varchar(100) comment 'Return type',
   sort                 int,
   status               int(1) comment 'Status: 0->Not enabled; 1->Enable',
   create_time          datetime comment 'Add Time',
   primary key (id)
);

Management side presentation

  • Return Reasons List

  • Add Return Reason

Mobile Display

  • Select the reason for return when applying for return

Public Number

mall project In the full series of learning tutorials, focus on the first time public number is available.

Posted by brooky on Mon, 16 Sep 2019 19:38:32 -0700