- 新增,修改门店时,自动创建门店用户

This commit is contained in:
gazebo
2019-07-23 17:13:30 +08:00
parent e13a2d2427
commit 8ab0443293
3 changed files with 24 additions and 1 deletions

View File

@@ -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
}