+ AuthBind中添加BindType

- 合并函数GetAuthBindsByAuthID2
- User中的mobile与email改为可为null
This commit is contained in:
gazebo
2019-09-03 15:35:54 +08:00
parent 73c5656be2
commit dad8adc4bf
10 changed files with 58 additions and 49 deletions

View File

@@ -118,7 +118,7 @@ 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, weixin.AuthTypeMP, ""); err2 == nil {
if authInfo, err2 := dao.GetAuthBind(db, v, model.AuthBindTypeAuth, weixin.AuthTypeMP, ""); err2 == nil {
retVal = append(retVal, authInfo.AuthID)
openIDMap[authInfo.AuthID] = 1
}