From 246b67f3e282818d0750cd23903d6d97b0e414b9 Mon Sep 17 00:00:00 2001 From: songjun Date: Wed, 18 Oct 2023 17:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...TesterTaskInterfaceRelationController.java | 4 +++- .../TesterTaskInterfaceRelationOut.java | 19 ++++++++++++++++++- .../task_interface_relation.html | 4 ++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/tester/src/main/java/com/ruoyi/tester/controller/TesterTaskInterfaceRelationController.java b/tester/src/main/java/com/ruoyi/tester/controller/TesterTaskInterfaceRelationController.java index e4aeb1e..2d62421 100644 --- a/tester/src/main/java/com/ruoyi/tester/controller/TesterTaskInterfaceRelationController.java +++ b/tester/src/main/java/com/ruoyi/tester/controller/TesterTaskInterfaceRelationController.java @@ -76,6 +76,8 @@ public class TesterTaskInterfaceRelationController extends BaseController Map taskMap = taskList.stream().collect(Collectors.toMap(TesterTask::getTaskId, Function.identity())); List interfaceList = interfaceService.selectTesterInterfaceList(new TesterInterface()); Map interfaceMap = interfaceList.stream().collect(Collectors.toMap(TesterInterface::getInterfaceId, Function.identity())); + List loginConfigList = testerLoginConfigService.selectAll(); + Map loginMap = loginConfigList.stream().collect(Collectors.toMap(TesterLoginConfig::getLoginConfigId, Function.identity())); startPage(); List list = testerTaskInterfaceRelationService.selectTesterTaskInterfaceRelationList(testerTaskInterfaceRelation); @@ -96,7 +98,7 @@ public class TesterTaskInterfaceRelationController extends BaseController List depends = testerTaskInterfaceRelationService.selectInRelationIds(dependRelationIdSet); Map dependMap = depends.stream().collect(Collectors.toMap(TesterTaskInterfaceRelation::getRelationId, Function.identity())); - List ret = list.stream().map(x -> new TesterTaskInterfaceRelationOut(x, taskMap, interfaceMap, dependMap)).collect(Collectors.toList()); + List ret = list.stream().map(x -> new TesterTaskInterfaceRelationOut(x, taskMap, interfaceMap, dependMap, loginMap)).collect(Collectors.toList()); dataTable.setRows(ret); return dataTable; } diff --git a/tester/src/main/java/com/ruoyi/tester/domain/TesterTaskInterfaceRelationOut.java b/tester/src/main/java/com/ruoyi/tester/domain/TesterTaskInterfaceRelationOut.java index c8800f4..0419fe3 100644 --- a/tester/src/main/java/com/ruoyi/tester/domain/TesterTaskInterfaceRelationOut.java +++ b/tester/src/main/java/com/ruoyi/tester/domain/TesterTaskInterfaceRelationOut.java @@ -54,11 +54,17 @@ public class TesterTaskInterfaceRelationOut { /** 登录配置id */ private Long loginConfigId; + //登录配置描述 + private String loginConfigDesc; /** 状态(0正常 1停用) */ private String status; - public TesterTaskInterfaceRelationOut(TesterTaskInterfaceRelation item, Map taskMap, Map interfaceMap, Map dependMap) { + public TesterTaskInterfaceRelationOut(TesterTaskInterfaceRelation item, + Map taskMap, + Map interfaceMap, + Map dependMap, + Map loginMap) { this.relationId = item.getRelationId(); this.taskId = item.getTaskId(); if (taskMap.containsKey(taskId)) { @@ -78,6 +84,9 @@ public class TesterTaskInterfaceRelationOut { this.bodyParam = item.getBodyParam(); this.pathParam = item.getPathParam(); this.loginConfigId = item.getLoginConfigId(); + if (loginMap.containsKey(loginConfigId)) { + this.loginConfigDesc = loginMap.get(loginConfigId).getDesc(); + } this.status = item.getStatus(); if (StringUtils.hasLength(this.dependRelationIds)) { @@ -226,6 +235,14 @@ public class TesterTaskInterfaceRelationOut { this.loginConfigId = loginConfigId; } + public String getLoginConfigDesc() { + return loginConfigDesc; + } + + public void setLoginConfigDesc(String loginConfigDesc) { + this.loginConfigDesc = loginConfigDesc; + } + public String getStatus() { return status; } diff --git a/tester/src/main/resources/templates/tester/task_interface_relation/task_interface_relation.html b/tester/src/main/resources/templates/tester/task_interface_relation/task_interface_relation.html index c4b3fe8..8361668 100644 --- a/tester/src/main/resources/templates/tester/task_interface_relation/task_interface_relation.html +++ b/tester/src/main/resources/templates/tester/task_interface_relation/task_interface_relation.html @@ -112,6 +112,10 @@ field: 'dependRelationDesc', title: '依赖关系' }, + { + field: 'loginConfigDesc', + title: '登录配置' + }, // { // field: 'dependParam', // title: '依赖参数' -- Gitee