fix(接口定义): 修复开源版本不能执行接口测试的缺陷

This commit is contained in:
wxg0103 2023-07-06 12:41:21 +08:00 committed by fit2-zhao
parent ac1bd098a4
commit 6432dcad50
1 changed files with 6 additions and 2 deletions

View File

@ -94,9 +94,13 @@ public class ApiPoolDebugService {
List<TestResourcePoolDTO> poolList = systemParameterService.getTestResourcePool();
QuotaService baseQuotaService = CommonBeanFactory.getBean(QuotaService.class);
Set<String> poolSets = baseQuotaService.getQuotaResourcePools();
Set<String> poolSets = null;
if (baseQuotaService != null) {
poolSets = baseQuotaService.getQuotaResourcePools();
}
if (CollectionUtils.isNotEmpty(poolSets)) {
poolList = poolList.stream().filter(pool -> poolSets.contains(pool.getId())).collect(Collectors.toList());
Set<String> finalPoolSets = poolSets;
poolList = poolList.stream().filter(pool -> finalPoolSets.contains(pool.getId())).collect(Collectors.toList());
}
if (CollectionUtils.isEmpty(poolList)) {