- 梳理真实手机号相关的流程,ConsigneeMobile为真实手机号时ConsigneeMobile2也有值(之前不是这样的)

This commit is contained in:
gazebo
2019-03-28 15:54:21 +08:00
parent 24af4bc330
commit 4897c87bc1
7 changed files with 27 additions and 35 deletions

View File

@@ -220,11 +220,12 @@ func Int2OneZero(value int) int {
// 判断电话号码是否是假的,比如有****号
func IsMobileFake(mobile string) bool {
return utils.Str2Int64WithDefault(FormalizeMobile(mobile), 0) == 0
return len(mobile) > 13 || mobile == ""
}
func FormalizeMobile(mobile string) string {
return strings.Replace(strings.Replace(mobile, "-", "", -1), ",", "", -1)
mobile = TrimDecorationChar(mobile)
return strings.Replace(strings.Replace(mobile, "-", ",", -1), "_", ",", -1)
}
func IsLegalStoreID(id int) bool {