- 重构了dao.GetAuthBind和dao.GetUserBindAuthInfo
- AuthBind的唯一索引调整为"AuthID", "Type", "BindType", "DeletedAt"
This commit is contained in:
@@ -118,9 +118,11 @@ func GetWeixinOpenIDsFromStoreID(storeID int) (retVal []string) {
|
||||
if globals.EnableWXAuth2 {
|
||||
if userIDList, err2 := api2.RoleMan.GetRoleUserList(autils.NewRole(authz.StoreRoleBoss, storeID)); err2 == nil {
|
||||
for _, v := range userIDList {
|
||||
if authInfo, err2 := dao.GetAuthBind(db, v, model.AuthBindTypeAuth, weixin.AuthTypeMP, ""); err2 == nil {
|
||||
retVal = append(retVal, authInfo.AuthID)
|
||||
openIDMap[authInfo.AuthID] = 1
|
||||
if authList, err2 := dao.GetUserBindAuthInfo(db, v, model.AuthBindTypeAuth, []string{weixin.AuthTypeMP}, "", ""); err2 == nil {
|
||||
for _, v := range authList {
|
||||
retVal = append(retVal, v.AuthID)
|
||||
openIDMap[v.AuthID] = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user