diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java index 88313e608f..7e2522542d 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -93,13 +93,12 @@ public class ApiTestCaseService { public List list(ApiTestCaseRequest request) { request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); - if (request.getModuleIds() == null) { + if (request.getModuleIds() == null && request.getModuleId() != null) { List moduleIds = new ArrayList<>(); moduleIds.add(request.getModuleId()); request.setModuleIds(moduleIds); } List returnList = extApiTestCaseMapper.list(request); - for (ApiTestCaseResult res : returnList) { if (StringUtils.equalsIgnoreCase(res.getApiMethod(), "esb")) { esbApiParamService.handleApiEsbParams(res);