- auth1与auth2以为是兼容
This commit is contained in:
@@ -423,7 +423,7 @@ func Strings2Objs(strAndObjAddPairs ...interface{}) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
func HandleUserWXRemark(db *dao.DaoDB, mobile string) (err error) {
|
||||
func HandleUserWXRemark(db *dao.DaoDB, mobile string, mobileIsUerID bool) (err error) {
|
||||
if db == nil {
|
||||
db = dao.GetDB()
|
||||
}
|
||||
@@ -438,9 +438,16 @@ func HandleUserWXRemark(db *dao.DaoDB, mobile string) (err error) {
|
||||
storeID = wxinfo.JxStoreID
|
||||
}
|
||||
} else {
|
||||
userList, _, err2 := dao.GetUsers(db, model.UserTypeStoreBoss, "", nil, "", mobile, 0, -1)
|
||||
if err = err2; len(userList) > 0 {
|
||||
userID := userList[0].GetID()
|
||||
userID := ""
|
||||
if mobileIsUerID {
|
||||
userID = mobile
|
||||
} else {
|
||||
userList, _, err2 := dao.GetUsers(db, model.UserTypeStoreBoss, "", nil, "", mobile, 0, -1)
|
||||
if err = err2; len(userList) > 0 {
|
||||
userID = userList[0].GetID()
|
||||
}
|
||||
}
|
||||
if userID != "" {
|
||||
authBind, err2 := dao.GetAuthBind(db, userID, weixin.AuthTypeMP, "")
|
||||
if err = err2; err == nil {
|
||||
openID = authBind.AuthID
|
||||
|
||||
Reference in New Issue
Block a user