minor refactoring

This commit is contained in:
dashevchenko 2024-08-26 10:55:41 +03:00
parent 6f833a3b18
commit c9b46f2e02
3 changed files with 4 additions and 4 deletions

View File

@ -42,5 +42,5 @@ public interface OAuth2ClientDao extends Dao<OAuth2Client> {
void deleteByTenantId(UUID tenantId); void deleteByTenantId(UUID tenantId);
List<OAuth2Client> findByIds(TenantId tenantId, List<OAuth2ClientId> oAuth2ClientIds); List<OAuth2Client> findByIds(UUID tenantId, List<OAuth2ClientId> oAuth2ClientIds);
} }

View File

@ -123,7 +123,7 @@ public class OAuth2ClientServiceImpl extends AbstractEntityService implements OA
@Override @Override
public List<OAuth2ClientInfo> findOAuth2ClientInfosByIds(TenantId tenantId, List<OAuth2ClientId> oAuth2ClientIds) { public List<OAuth2ClientInfo> findOAuth2ClientInfosByIds(TenantId tenantId, List<OAuth2ClientId> oAuth2ClientIds) {
log.trace("Executing findQueueStatsByIds, tenantId [{}], oAuth2ClientIds [{}]", tenantId, oAuth2ClientIds); log.trace("Executing findQueueStatsByIds, tenantId [{}], oAuth2ClientIds [{}]", tenantId, oAuth2ClientIds);
return oauth2ClientDao.findByIds(tenantId, oAuth2ClientIds) return oauth2ClientDao.findByIds(tenantId.getId(), oAuth2ClientIds)
.stream() .stream()
.map(OAuth2ClientInfo::new) .map(OAuth2ClientInfo::new)
.collect(Collectors.toList()); .collect(Collectors.toList());

View File

@ -90,8 +90,8 @@ public class JpaOAuth2ClientDao extends JpaAbstractDao<OAuth2ClientEntity, OAuth
} }
@Override @Override
public List<OAuth2Client> findByIds(TenantId tenantId, List<OAuth2ClientId> oAuth2ClientIds) { public List<OAuth2Client> findByIds(UUID tenantId, List<OAuth2ClientId> oAuth2ClientIds) {
return DaoUtil.convertDataList(repository.findByTenantIdAndIdIn(tenantId.getId(), toUUIDs(oAuth2ClientIds))); return DaoUtil.convertDataList(repository.findByTenantIdAndIdIn(tenantId, toUUIDs(oAuth2ClientIds)));
} }
@Override @Override