fusenapi/utils/id_generator/pickup_track_num.go

14 lines
237 B
Go
Raw Normal View History

2023-06-27 07:26:23 +00:00
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, ".", "")
}