From e3bf964a3dbc2be5c5f688ce235e2a89d85fced1 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Sat, 17 Sep 2022 15:26:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=A7=E8=A1=8C=E6=B5=8B=E8=AF=95=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=90=8E=E5=8F=AF=E8=83=BD=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8A=A5=E5=91=8A=E5=88=9B=E5=BB=BA=E4=BA=BA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016726 --user=宋天阳 [测试跟踪]github #17849执行测试计划后报告创建人显示不正确 https://www.tapd.cn/55049933/s/1244293 --- .../metersphere/track/service/TestPlanApiCaseService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) {