aaa
This commit is contained in:
@@ -163,6 +163,7 @@ func UpdateUserRole(ctx *jxcontext.Context, userIDs []string, roleIDs []int) (er
|
||||
userRoleMap[v.UserID] = append(userRoleMap[v.UserID], v.RoleID)
|
||||
}
|
||||
}
|
||||
fmt.Println("userRoleMap", userRoleMap)
|
||||
for _, userID := range userIDs {
|
||||
nowRoleIDs := userRoleMap[userID]
|
||||
for _, nowRoleID := range nowRoleIDs {
|
||||
@@ -171,6 +172,7 @@ func UpdateUserRole(ctx *jxcontext.Context, userIDs []string, roleIDs []int) (er
|
||||
}
|
||||
nowRoleIDMap[nowRoleID] = 1
|
||||
}
|
||||
fmt.Println("nowRoleIDMap", nowRoleIDMap)
|
||||
for _, roleID := range roleIDMap {
|
||||
if nowRoleIDMap[roleID] == 0 {
|
||||
addUserRoleMap[userID] = append(addUserRoleMap[userID], roleID)
|
||||
|
||||
Reference in New Issue
Block a user