- 新增,修改门店时,自动创建门店用户
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
|
||||
var (
|
||||
storeNamePat = regexp.MustCompile(`([^(\[(【)\])】\-\s]*)[(\[(【\-\s]+([^(\[(【)\])】\-]*)[)\])】]*`)
|
||||
mobilePat = regexp.MustCompile(`^1\d{10}$`)
|
||||
)
|
||||
|
||||
// 合并得到最终的门店状态
|
||||
@@ -344,6 +345,10 @@ func FormalizeMobile(mobile string) string {
|
||||
return strings.Replace(strings.Replace(mobile, "-", ",", -1), "_", ",", -1)
|
||||
}
|
||||
|
||||
func IsStringLikeMobile(mobile string) bool {
|
||||
return mobilePat.FindStringIndex(mobile) != nil
|
||||
}
|
||||
|
||||
func IsLegalStoreID(id int) bool {
|
||||
return id >= 100000 && id < 200000
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user