|
|
@@ -54,12 +54,6 @@ public class KeycloakServiceImpl implements KeycloakService {
|
|
|
log.info("users map cache clear:{}",LocalDateTime.now() );
|
|
|
}
|
|
|
|
|
|
- @Scheduled(cron = "* 0/10 * * * ?")
|
|
|
- public void expiredCache(){
|
|
|
- // 每隔10小时,清除缓存数据初始化一次
|
|
|
- this.clearUserMapCache();
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* get users in role (xuzhou environment)
|
|
|
* @param role role
|
|
|
@@ -459,6 +453,7 @@ public class KeycloakServiceImpl implements KeycloakService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Cacheable(value = "msr:user:openIds", key = "#role")
|
|
|
public List<String> queryWechatByRole(String role) {
|
|
|
List<String> openIds = Lists.newArrayList();
|
|
|
realmResource.roles().get(role).getRoleUserMembers().forEach(user->{
|