php - Taobao order splitting table design
过去多啦不再A梦
过去多啦不再A梦 2017-05-25 15:08:21
0
2
2232

Our mall currently uses two tables, the ORDER table and the ORDER_DETAIL table. The ORDER table only saves user information, addresses, total prices, etc. The specific product information is stored in the DETAIL store, but now it is divided into two tables for different merchants. After the order is completed, how to design the database table structure based on the existing split?

过去多啦不再A梦
过去多啦不再A梦

reply all(2)
过去多啦不再A梦

Can you consider the following two points:

1.可以新增一张订单表
2.沿用一张订单表,新增商家id字段和订单类型字段
PHPzhong

You may also need to consider shipping, returns and refunds, reconciliation information, and display a total order number to the buyer (which contains the merchant’s product information)

1. Keep the historical data unchanged, design a parent-child relationship in the ORDER table, for example, the original order number is automatically order_no, now add an order_p_no (0 is an order, a value indicates that this is a child order), user information Redundant storage, total price information is calculated and stored based on the corresponding product

2.DETAIL table still corresponds to order_no in ORDER table

Similar to the idea on the first floor

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template