E-commerce order number generation rules

The generation of order numbers in e-commerce is generally to generate order numbers for a certain day in advance (estimated quantity, for example, there were 100W orders yesterday, 100W orders were generated today + certain redundancy), and they are placed on caches such as memcache or redis, or they can be placed In MQ, as the order number pool. If you want to use it, just consume the one in the order number pool, which is absolutely unique.
How it is generated depends on your business logic. Generally, if you want to have no repetition at all, you will generate a sequence of 0~100W, and then shuffle it.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326560926&siteId=291194637