From e6231fc07ec5cbd1fd662c895625ccfd47447680 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 9 Nov 2020 10:53:13 +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=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E6=A8=A1=E5=9D=97=E6=A0=91=E5=B1=95=E5=BC=80=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/track/service/TestCaseNodeService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java index bda8df1325..6594536019 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java @@ -191,17 +191,19 @@ public class TestCaseNodeService { * 获取当前计划下 * 有关联数据的节点 * - * @param planId - * @return + * @param planId plan id + * @return List */ public List getNodeByPlanId(String planId) { List list = new ArrayList<>(); List projectIds = testPlanProjectService.getProjectIdsByPlanId(planId); projectIds.forEach(id -> { - String name = projectMapper.selectByPrimaryKey(id).getName(); + Project project = projectMapper.selectByPrimaryKey(id); + String name = project.getName(); List nodeList = getNodeDTO(id, planId); TestCaseNodeDTO testCaseNodeDTO = new TestCaseNodeDTO(); + testCaseNodeDTO.setId(project.getId()); testCaseNodeDTO.setName(name); testCaseNodeDTO.setLabel(name); testCaseNodeDTO.setChildren(nodeList);