Java fresh e-commerce platform - fresh e-commerce distribution order solution (Applet / APP)

Java fresh e-commerce platform - fresh e-commerce distribution order solution (Applet / APP)

 

Note: in the daily fresh e-commerce platform, fresh distribution is an unavailable link. According to the actual business scenario, fresh distribution has two dimensions to consider

1. Time dimension.

Note: the time dimension refers to when customers usually need it, that is, when to deliver it. If it's the pre warehouse mode, it needs to be delivered at 29 points. If it's the mode of buying today and delivering tomorrow, it needs to be set

Uniform delivery of time.

 

2. Line dimension

Note: in theory, for the business scenario of today's purchase and tomorrow's unified distribution, it is necessary to consider the route and vehicle delivery volume. Theoretically, the load of a vehicle is limited. When the vehicle load is sufficient, the route planning of the merchant should be done to the nearest

The best, especially in this epidemic period, must be distribution based on the community dimension, which requires the assembly of distribution orders, line allocation and personnel arrangement.

 

3. Basic business model

Description:

 

 

There are two branches of business order, one is system allocation and the other is manual allocation

In the actual business scenario, we found that,

1.1. If this person has bought the scene and the address has not changed, the fixed route and distribution personnel will be selected by default (one distribution personnel can select multiple routes)

1.2. If this person hasn't bought it, then according to the actual situation, the system can't identify which line it belongs to, so it needs to be assigned manually

           

4. System database design

             1.

CREATE TABLE `driver_line` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `line_name` varchar(255) DEFAULT NULL COMMENT 'Line name',
  `line_driver` int(11) DEFAULT NULL COMMENT 'Line driver',
  `add_time` datetime DEFAULT NULL COMMENT 'Creation time',
  `update_time` datetime DEFAULT NULL COMMENT 'Modification time',
  `is_deleted` tinyint(1) DEFAULT '0' COMMENT '0 is enabled by default, 1 is deleted',
  PRIMARY KEY (`id`),
  UNIQUE KEY `t_line_id_uindex` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='Distribution line';

      

CREATE TABLE `driver` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto add ID',
  `user_name` varchar(50) DEFAULT NULL COMMENT 'user name    ',
  `pwd` varchar(50) DEFAULT NULL COMMENT 'password',
  `driver_name` varchar(100) DEFAULT NULL COMMENT 'Driver name',
  `driver_telephone` varchar(64) DEFAULT NULL COMMENT 'cell-phone number',
  `remarks` varchar(255) DEFAULT NULL COMMENT 'remarks',
  `type` int(11) DEFAULT '0' COMMENT 'Type: 0: full time 1: part time ',
  `add_time` datetime DEFAULT NULL COMMENT 'Add time',
  `update_time` datetime DEFAULT NULL COMMENT 'Modification time',
  `is_deleted` int(11) DEFAULT '0' COMMENT 'Delete identity: 0 is available default 1 delete',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='driver';

     

CREATE TABLE `sorter_deliver_order` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `sorter_order_id` varchar(32) DEFAULT NULL COMMENT 'sorting  ID',
  `order_sn` varchar(32) DEFAULT NULL COMMENT 'order number',
  `user_id` int(11) DEFAULT NULL COMMENT 'customer ID',
  `storehouse_id` int(11) DEFAULT NULL COMMENT 'Warehouse ID',
  `total_price` decimal(10,2) DEFAULT '0.00' COMMENT 'Total shipment amount',
  `status` int(11) DEFAULT '0' COMMENT 'Shipment status, 0 is not shipped, 1 is shipped',
  `operator_user_id` int(11) DEFAULT NULL COMMENT 'Operator',
  `create_time` datetime DEFAULT NULL COMMENT 'Creation time',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COMMENT='Customer order delivery';
CREATE TABLE `sorter_deliver_order_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `sorter_deliver_order` int(11) DEFAULT NULL COMMENT 'Main table ID',
  `goods_id` int(11) DEFAULT NULL COMMENT 'commodity ID',
  `goods_name` varchar(255) DEFAULT NULL COMMENT 'Commodity name',
  `goods_unit` varchar(20) DEFAULT NULL COMMENT 'Company',
  `goods_number` int(11) DEFAULT NULL COMMENT 'Commodity quantity (scheduled quantity)',
  `actual_number` int(11) DEFAULT NULL COMMENT 'Actual quantity',
  `order_price` decimal(10,2) DEFAULT NULL COMMENT 'Order unit price',
  `deliver_price` decimal(10,2) DEFAULT NULL COMMENT 'Delivery price',
  `create_time` datetime DEFAULT NULL COMMENT 'Creation time',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=126 DEFAULT CHARSET=utf8mb4 COMMENT='Delivery delivery';

 

4. How to write code and architecture?

Note: one micro service can be provided for distribution. As fresh e-commerce may be designed to separate multiple modules, based on my own experience, I suggest that procurement be handled as a single service to facilitate business expansion.

5. Review and summary

   

Summary: the purpose of making Internet applications, whether fresh small programs or apps, is to retain and activate users, form their purchasing power, improve their satisfaction, and finally reach a deal. Of course, this article is just a piece of advice. I hope this article can give you some thoughts and suggestions.

 

 QQ:137071249

Learning together QQ group: 793305035

Tags: Java Database

Posted on Sun, 31 May 2020 07:43:40 -0700 by bhi0308