maker

package
v1.1.0-alpha.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TransNo

func TransNo(uid uint) string

TransNo 生成用户订单号,长度16-32位,组成结构如下: |00|111|22222|33333|44444|

|  |    |     |     |
|  |    |     |     `-- 当日的秒数(5位)
|  |    |      `------- 用户 ID 最后五位,[0001, 9999](4位)
|  |    `-------------- 随机数补位(2-18位)
|  `------------------- 当日是一年中的第几日,[000, 366](3位)
 `---------------------- 年份最后2位(2位)

Deprecated

func TransNoWith

func TransNoWith(uid, length uint) string

TransNoWith 生成用户订单号,长度16-32位,组成结构如下: |00|111|22222|33333|44444|

|  |    |     |     |
|  |    |     |     `-- 当日的秒数(5位)
|  |    |      `------- 用户 ID 最后五位,[0001, 9999](4位)
|  |    `-------------- 随机数补位(2-18位)
|  `------------------- 当日是一年中的第几日,[000, 366](3位)
 `---------------------- 年份最后2位(2位)

Deprecated

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL