feat: add wechat pay

This commit is contained in:
Rogee
2025-01-14 14:42:08 +08:00
parent 52c17b63bb
commit 9cd7659d14
32 changed files with 1431 additions and 110 deletions

View File

@@ -0,0 +1,15 @@
package utils
import (
"fmt"
"math/rand"
"strings"
"time"
)
// GenerateOrderSerial generate order serial
func GenerateOrderSerial(prefix string) string {
timestamp := time.Now().Format("20060102150405")
randomSuffix := rand.Intn(10000)
return fmt.Sprintf("%s%s%04d", strings.ToUpper(prefix), timestamp, randomSuffix)
}