About some logic shopping cart and inventory

  • Lock stock when generating orders should be better than the cart lock stock Add to Cart line did not produce the actual purchase behavior;
  • Add to Cart, verify inventory is over;
  • Pre-orders, verify inventory is over;
  • When you create an order, verify inventory is over; at the same time deductions stock! If the inventory shortage, to remind the user, or can not be settled!
  • Not pay more than a certain time, cancel orders, inventory and restoration! If paid, will not return in stock!
  • Photographed minus inventories, unpaid orders after trading closed, commodity stocks resume immediately; after payment of inventory reduction, refund payment orders lead to closure of inventory are not automatically restored.

Guess you like

Origin www.cnblogs.com/jiqing9006/p/12621327.html