diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanApiCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanApiCaseService.java index 397b19e316..bbe673abeb 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanApiCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanApiCaseService.java @@ -90,13 +90,13 @@ public class TestPlanApiCaseService { public void buildUserInfo(List apiTestCases) { List userIds = new ArrayList(); - userIds.addAll(apiTestCases.stream().map(TestPlanApiCaseDTO::getCreateUser).collect(Collectors.toList())); + userIds.addAll(apiTestCases.stream().map(TestPlanApiCaseDTO::getCreateUserId).collect(Collectors.toList())); userIds.addAll(apiTestCases.stream().map(TestPlanApiCaseDTO::getUpdateUser).collect(Collectors.toList())); userIds.addAll(apiTestCases.stream().map(TestPlanApiCaseDTO::getUserId).collect(Collectors.toList())); if (!org.apache.commons.collections.CollectionUtils.isEmpty(userIds)) { Map userMap = ServiceUtils.getUserNameMap(userIds); apiTestCases.forEach(caseResult -> { - caseResult.setCreatorName(userMap.get(caseResult.getCreateUser())); + caseResult.setCreatorName(userMap.get(caseResult.getCreateUserId())); caseResult.setUpdateName(userMap.get(caseResult.getUpdateUser())); caseResult.setPrincipalName(userMap.get(caseResult.getUserId())); }); @@ -135,7 +135,7 @@ public class TestPlanApiCaseService { } public int deleteByCaseId(String caseId) { - return this.deleteByCaseIds(Arrays.asList(caseId)); + return this.deleteByCaseIds(Arrays.asList(caseId)); } public int deleteByCaseIds(List caseIds) {