fix(测试用例): 关联接口用例勾选协议,模块树数量未更新

--bug=1044475 --user=王旭 【功能用例】用例详情-关联接口用例-取消勾选全部协议后-列表仍展示全部数据 https://www.tapd.cn/55049933/s/1565247
This commit is contained in:
WangXu10 2024-08-19 16:57:10 +08:00 committed by Craftsman
parent bb22db22ab
commit b006a07959
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@ import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -46,6 +47,9 @@ public class AssociateApiProvider implements BaseAssociateApiProvider, BaseAssoc
@Override @Override
public Map<String, Long> moduleCount(String sourceType, String sourceName, String apiCaseColumnName, TestCasePageProviderRequest request, boolean deleted) { public Map<String, Long> moduleCount(String sourceType, String sourceName, String apiCaseColumnName, TestCasePageProviderRequest request, boolean deleted) {
if (CollectionUtils.isEmpty(request.getProtocols())) {
return Collections.emptyMap();
}
request.setModuleIds(null); request.setModuleIds(null);
//查找根据moduleIds查找模块下的接口数量 查非delete状态的 //查找根据moduleIds查找模块下的接口数量 查非delete状态的
List<ModuleCountDTO> moduleCountDTOList = extApiTestCaseMapper.countModuleIdByProviderRequest(sourceType, sourceName, apiCaseColumnName, request, deleted); List<ModuleCountDTO> moduleCountDTOList = extApiTestCaseMapper.countModuleIdByProviderRequest(sourceType, sourceName, apiCaseColumnName, request, deleted);