Explorar o código

白名单发送手机号空格去除

xingzai %!s(int64=3) %!d(string=hai) anos
pai
achega
c2c78294a3
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      services/user.go

+ 2 - 0
services/user.go

@@ -613,6 +613,7 @@ func SendEmailUserWhiteListChange(cont context.Context) (err error) {
 	if mobileStr == "" {
 		mobileStr = "1"
 	}
+	mobileStr = strings.Replace(mobileStr, " ", "", -1)
 	//手机号新增
 	fieldStr = ` u.mobile,u.country_code,u.real_name,c.company_name,u.company_id,cp.seller_name,cp.status,`
 	condition = `  AND cp.status IN ( '正式', '试用' ) AND u.mobile IN (` + mobileStr + `) `
@@ -626,6 +627,7 @@ func SendEmailUserWhiteListChange(cont context.Context) (err error) {
 	if outboundMobileStr == "" {
 		outboundMobileStr = "1"
 	}
+	outboundMobileStr = strings.Replace(outboundMobileStr, " ", "", -1)
 	fieldStr = ` u.outbound_mobile as mobile,u.outbound_country_code as country_code,u.real_name,c.company_name,u.company_id,cp.status,`
 	condition = `  AND cp.status IN ( '正式', '试用' ) AND u.outbound_mobile IN (` + outboundMobileStr + `) `
 	listOutboundMobile, err := models.GetFormalUserWhiteList(fieldStr, condition)