SpringBoot actual combat e-commerce project mall (18K + STAR) Address: github.com/macrozheng/…

Abstract

This paper mainly analyzes the order return and order return reason setting function table, using the form of database table and function comparison.

The order return

Correlation table structure

Order Return Application Form

It is mainly used to store member return application information. It should be noted that there are four states of order return application form: 0-> to be processed; 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 'Receiving Address List ID',
   product_id           bigint comment 'Returned Product ID',
   order_sn             varchar(64) comment 'Order Number',
   create_time          datetime comment 'Application Time',
   member_username      varchar(64) comment 'Member Username',
   return_amount        decimal(10.2) comment 'Refund amount',
   return_name          varchar(100) comment 'Name of Return Person',
   return_phone         varchar(100) comment 'Refunder phone'.status               int(1) comment 'Application status: 0-> Pending; 1-> In return; 2-> Completed; 3-> Rejected ',
   handle_time          datetime comment 'Processing time',
   product_pic          varchar(500) comment 'Commodity picture',
   product_name         varchar(200) comment 'Trade Name',
   product_brand        varchar(200) comment 'Merchandise Brand',
   product_attr         varchar(500) comment 'Product sales attribute: Color: red; Size: xl. ',
   product_count        int comment 'Quantity returned',
   product_price        decimal(10.2) comment 'Unit price of goods',
   product_real_price   decimal(10.2) comment 'Actual unit Price paid for goods',
   reason               varchar(200) comment 'why',
   description          varchar(500) comment 'description',
   proof_pics           varchar(1000) comment 'Voucher images, separated by commas',
   handle_note          varchar(500) comment 'Handling 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 'Receiving Remarks',
   primary key (id));Copy the code

Company shipping address list

Used to select shipping address when processing 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 - > ',
   receive_status       int(1) comment 'Default shipping address: 0-> No; 1 - > '.name                 varchar(64) comment 'Name of Consignee or Consignor',
   phone                varchar(64) comment 'Consignee telephone',
   province             varchar(64) comment 'Province/Municipality',
   city                 varchar(64) comment 'the city',
   region               varchar(64) comment 'area',
   detail_address       varchar(200) comment 'Full address',
   primary key (id));Copy the code

Management Side Display

  • Return Request List
  • Details about the pending status
  • Details of the status in the return
  • Details of the completed state
  • Details of rejected status

Mobile display

  • Open the after-sales service in my


  • Click Apply for Return to apply for return


  • Submit return application


  • Review the return request record in the application record


  • View return application progress details


Order return reason setting

Order return reason list

It is used to select the reason for returning goods.

create table oms_order_return_reason
(
   id                   bigint not null auto_increment,
   name                 varchar(100) comment 'Type of Return'.sort                 int.status               int(1) comment 'Status: 0-> Disabled; 1 - > enable ',
   create_time          datetime comment 'Add time',
   primary key (id));Copy the code

Management Side Display

  • List of reasons for Return


  • Add reason for return


Mobile display

  • Select the reason for return when applying for return


The public,

Mall project full set of learning tutorials serialized, attention to the public number the first time access.