1. Before verifying stock Add to Cart
2. Verify that you modify the number of shopping cart
3. Verify that when submitting an order
How to verify when submitting an order:
Click Add to Cart, when the number of items added to redis, the number of items at this time is certainly not to modify, for comparison with the data in the cache when clicking the settlement, if the comparison is consistent, you submit the order and remove the cache
If not, it forwards the page to fail, or to tell the user that the baby has failed.