Add alipay provider.

This commit is contained in:
Yang Luo
2022-03-06 22:46:02 +08:00
parent 0e40a1d922
commit bf5d4eea48
17 changed files with 296 additions and 9 deletions

View File

@ -23,6 +23,7 @@ import (
"os"
"strconv"
"strings"
"time"
"unicode"
"github.com/google/uuid"
@ -88,6 +89,17 @@ func GenerateId() string {
return uuid.NewString()
}
func GenerateTimeId() string {
timestamp := time.Now().Unix()
tm := time.Unix(timestamp, 0)
t := tm.Format("20060102_150405")
random := uuid.NewString()[0:7]
res := fmt.Sprintf("%s_%s", t, random)
return res
}
func GetId(name string) string {
return fmt.Sprintf("admin/%s", name)
}