- auth1与auth2以为是兼容
This commit is contained in:
@@ -82,7 +82,10 @@ func UnbindMobile(ctx *jxcontext.Context, mobile string) (num int64, err error)
|
||||
}, map[string]interface{}{
|
||||
"Tel": mobile,
|
||||
})
|
||||
jxutils.HandleUserWXRemark(db, mobile)
|
||||
if err == nil {
|
||||
jxutils.HandleUserWXRemark(db, mobile, false)
|
||||
TransferLegacyWeixins(mobile)
|
||||
}
|
||||
return num, err
|
||||
}
|
||||
|
||||
@@ -115,7 +118,10 @@ func BindMobile2Store(ctx *jxcontext.Context, mobile string, storeID int) (num i
|
||||
}
|
||||
}
|
||||
}
|
||||
jxutils.HandleUserWXRemark(db, mobile)
|
||||
if err == nil {
|
||||
jxutils.HandleUserWXRemark(db, mobile, false)
|
||||
TransferLegacyWeixins(mobile)
|
||||
}
|
||||
return num, err
|
||||
}
|
||||
|
||||
@@ -147,16 +153,24 @@ func AddMobile2Mobile(ctx *jxcontext.Context, parentMobile, mobile string) (num
|
||||
err = fmt.Errorf("%s本身是成员", parentMobile)
|
||||
}
|
||||
}
|
||||
jxutils.HandleUserWXRemark(db, mobile)
|
||||
if err == nil {
|
||||
jxutils.HandleUserWXRemark(db, mobile, false)
|
||||
TransferLegacyWeixins(mobile)
|
||||
}
|
||||
return num, err
|
||||
}
|
||||
|
||||
func ChangeMobile(ctx *jxcontext.Context, curMobile, expectedMobile string) (num int64, err error) {
|
||||
return dao.UpdateEntityByKV(nil, &legacymodel.WeiXins{}, map[string]interface{}{
|
||||
num, err = dao.UpdateEntityByKV(nil, &legacymodel.WeiXins{}, map[string]interface{}{
|
||||
"Tel": expectedMobile,
|
||||
}, map[string]interface{}{
|
||||
"Tel": curMobile,
|
||||
})
|
||||
if err == nil {
|
||||
TransferLegacyWeixins(curMobile)
|
||||
TransferLegacyWeixins(expectedMobile)
|
||||
}
|
||||
return num, err
|
||||
}
|
||||
|
||||
func verifyMobileIsBlank(db *dao.DaoDB, mobile string) (user *legacymodel.WeiXins, err error) {
|
||||
|
||||
Reference in New Issue
Block a user