|
|
@@ -457,4 +457,16 @@ public class KeycloakServiceImpl implements KeycloakService {
|
|
|
return PageResponse.of(userRepresentations ,0 ,0,0);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<String> queryWechatByRole(String role) {
|
|
|
+ List<String> openIds = Lists.newArrayList();
|
|
|
+ realmResource.roles().get(role).getRoleUserMembers().forEach(user->{
|
|
|
+ Map<String, List<String>> attributes = user.getAttributes();
|
|
|
+ if (attributes != null && attributes.get("wechat") != null) {
|
|
|
+ openIds.addAll(attributes.get("wechat"));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return openIds;
|
|
|
+ }
|
|
|
}
|