Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppIDWith ¶ added in v1.0.4
AppIDWith 生成 APP ID,长度12-20位,受第二参数 length 约束,组成结构如下: |00|111|22222|33333|
| | | | | | | `-------- 当日的秒数(5位) | | `-------------- 随机数补位(2-10位) | `------------------- 当日是一年中的第几日,[000, 366](3位) `---------------------- 年份最后2位(2位)
func TransNoWith ¶
TransNoWith 生成用户订单号,长度16-32位,受第二参数 length 约束,组成结构如下: |00|111|22222|3333|44444|
| | | | | | | | | `--- 当日的秒数(5位) | | | `------- 用户 ID 最后四位,[0001, 9999](4位) | | `-------------- 随机数补位(2-18位) | `------------------- 当日是一年中的第几日,[000, 366](3位) `---------------------- 年份最后2位(2位)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.