|
@@ -260,3 +260,19 @@ func BindUserOutboundMobile(mobile, countryCode string, userId int) (err error)
|
|
|
_, err = o.Raw(sql, mobile, countryCode, countryCode, userId).Exec()
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+//已经绑定手机号,没有绑定外呼手机号的的用户,预约外呼的时候,将外呼手机号同步成手机号
|
|
|
+func BindUserOutboundMobileByMobile(mobile, countryCode string, userId int) (err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := `UPDATE wx_user SET outbound_mobile=? ,outbound_country_code = ? WHERE user_id=? `
|
|
|
+ _, err = o.Raw(sql, mobile, countryCode, userId).Exec()
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+//将手机号为11位的用户,区号默认设置为86
|
|
|
+func ChangeUserOutboundMobileByMobile(userId int) (err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := `UPDATE wx_user SET country_code = 86 WHERE user_id=? `
|
|
|
+ _, err = o.Raw(sql, userId).Exec()
|
|
|
+ return
|
|
|
+}
|