Best way to generate order numbers for an online store?

前端 未结 13 2069
野的像风
野的像风 2021-01-31 00:09

Every order in my online store has a user-facing order number. I\'m wondering the best way to generate them. Criteria include:

  • Short
  • Easy to say over the
13条回答
  •  天涯浪人
    2021-01-31 00:19

    As a customer I would be happy with:

    year-month-day/short_uid
    

    for example:

    2009-07-27/KT1E
    

    It gives room for about 33^4 ~ 1mln orders a day.

提交回复
热议问题