feat:优化项目信息
This commit is contained in:
13
lib/order.go
Normal file
13
lib/order.go
Normal file
@ -0,0 +1,13 @@
|
||||
package lib
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
// OrderNo 订单号
|
||||
func OrderNo() string {
|
||||
now := time.Now()
|
||||
return fmt.Sprintf("%s%d%05d", now.Format("20060102"), now.Unix(), rand.Intn(100000))
|
||||
}
|
Reference in New Issue
Block a user