用户角色设置
This commit is contained in:
@@ -158,6 +158,7 @@ func UpdateUserRole(ctx *jxcontext.Context, userIDs []string, roleIDs []int) (er
|
||||
for _, v := range userRoles {
|
||||
userRoleMap[v.UserID] = append(userRoleMap[v.UserID], v.RoleID)
|
||||
}
|
||||
}
|
||||
for _, userID := range userIDs {
|
||||
nowRoleIDs := userRoleMap[userID]
|
||||
for _, nowRoleID := range nowRoleIDs {
|
||||
@@ -204,6 +205,5 @@ func UpdateUserRole(ctx *jxcontext.Context, userIDs []string, roleIDs []int) (er
|
||||
}
|
||||
}
|
||||
dao.Commit(db)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user