refactor(测试计划): 优化未选协议时模块树count统计

This commit is contained in:
WangXu10 2024-06-25 11:47:26 +08:00 committed by 刘瑞斌
parent 0245c9215e
commit ceea82c233
1 changed files with 3 additions and 0 deletions

View File

@ -321,6 +321,9 @@ public class TestPlanApiCaseService extends TestPlanResourceService {
public Map<String, Long> moduleCount(TestPlanApiCaseModuleRequest request) { public Map<String, Long> moduleCount(TestPlanApiCaseModuleRequest request) {
if (CollectionUtils.isEmpty(request.getProtocols())) {
return Collections.emptyMap();
}
switch (request.getTreeType()) { switch (request.getTreeType()) {
case TreeTypeEnums.MODULE: case TreeTypeEnums.MODULE:
return getModuleCount(request); return getModuleCount(request);