对政策匹配进行优化

This commit is contained in:
hoteas
2022-05-09 15:07:01 +08:00
parent dec56b75d2
commit abecca89c5
8 changed files with 768 additions and 47 deletions
+24
View File
@@ -3,6 +3,7 @@ package provider
import (
. "code.hoteas.com/golang/hotime"
. "code.hoteas.com/golang/hotime/common"
"strings"
"time"
"unicode/utf8"
)
@@ -20,6 +21,29 @@ var Project = Proj{
"wechat": Wechat,
}
func strToArray(str string) Slice {
s := Slice{}
olds := strings.Split(str, ",")
for _, v := range olds {
if v != "" {
s = append(s, v)
}
}
return s
}
func arrayToStr(ars Slice) string {
s := ","
if ars == nil {
return s
}
for k, _ := range ars {
s = s + ars.GetString(k) + ","
}
return s
}
//生成随机码的6位md5
func getSn() string {
x := Rand(8)