add management interface

This commit is contained in:
Gordon
2021-09-22 20:10:38 +08:00
parent 68eaa51ebe
commit 66c1b19696
23 changed files with 1434 additions and 507 deletions
+9
View File
@@ -8,6 +8,7 @@ package utils
import (
"encoding/json"
"math/rand"
"strconv"
)
@@ -53,3 +54,11 @@ func JsonStringToStruct(s string, args interface{}) error {
err := json.Unmarshal([]byte(s), args)
return err
}
func GetMsgID(sendID string) string {
t := int64ToString(GetCurrentTimestampByNano())
return Md5(t + sendID + int64ToString(rand.Int63n(GetCurrentTimestampByNano())))
}
func int64ToString(i int64) string {
return strconv.FormatInt(i, 10)
}