对政策匹配进行优化

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
@@ -4,6 +4,7 @@ import (
. "code.hoteas.com/golang/hotime"
. "code.hoteas.com/golang/hotime/common"
"errors"
"strings"
"time"
"unicode/utf8"
)
@@ -46,6 +47,29 @@ func getCode() string {
return res
}
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
}
//认证公共方案
func auth(that *Context, phone, companyName, userName string) error {