fix(接口测试): 修复接口测试查询不到案例的缺陷 (#4770)

修复接口测试查询不到案例的缺陷

Co-authored-by: song-tianyang <tianyang.song@fit2cloud.com>
This commit is contained in:
metersphere-bot 2021-07-16 17:43:51 +08:00 committed by GitHub
parent 8d64d5ec5d
commit 808fff12bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -93,13 +93,12 @@ public class ApiTestCaseService {
public List<ApiTestCaseResult> list(ApiTestCaseRequest request) {
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
if (request.getModuleIds() == null) {
if (request.getModuleIds() == null && request.getModuleId() != null) {
List<String> moduleIds = new ArrayList<>();
moduleIds.add(request.getModuleId());
request.setModuleIds(moduleIds);
}
List<ApiTestCaseResult> returnList = extApiTestCaseMapper.list(request);
for (ApiTestCaseResult res : returnList) {
if (StringUtils.equalsIgnoreCase(res.getApiMethod(), "esb")) {
esbApiParamService.handleApiEsbParams(res);