diff --git a/src/main/java/com/eactive/eai/authserver/dao/ScopeDAO.java b/src/main/java/com/eactive/eai/authserver/dao/ScopeDAO.java index 83676f6..3cae28a 100644 --- a/src/main/java/com/eactive/eai/authserver/dao/ScopeDAO.java +++ b/src/main/java/com/eactive/eai/authserver/dao/ScopeDAO.java @@ -31,9 +31,15 @@ public class ScopeDAO extends BaseDAO { Map> clientEntitymap = new HashMap<>(); scopeEntities.forEach(scopeEntity -> { - HashSet set = new HashSet<>(); - String scopeId = scopeEntity.getId().getBzwksvckeyname() + scopeEntity.getId().getScopeid(); - clientEntitymap.put(scopeId, set); + String apiId = scopeEntity.getId().getBzwksvckeyname(); + HashSet scopeSet = clientEntitymap.get(apiId); + if (scopeSet == null) { + scopeSet = new HashSet(); + clientEntitymap.put(apiId, scopeSet); + } + String scopeId = scopeEntity.getId().getScopeid(); + clientEntitymap.get(apiId).add(scopeId); +// clientEntitymap.put(scopeId, set); }); return clientEntitymap;