This commit is contained in:
laodaming
2023-06-27 15:26:23 +08:00
parent 3a2fb3bc5d
commit 9050b4ab0e
3 changed files with 18 additions and 23 deletions

View File

@@ -0,0 +1,13 @@
package id_generator
import (
"fmt"
"math/rand"
"strings"
"time"
)
func GenPickUpTrackNum() string {
a := fmt.Sprintf("%s%.8d", time.Now().Format("20060102150405.000"), rand.Intn(1000000))
return strings.ReplaceAll(a, ".", "")
}