From 2fac0f3dc91651d188c256d4516a130e93d64c2b Mon Sep 17 00:00:00 2001 From: songjun Date: Wed, 18 May 2022 17:41:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E6=95=B0=E6=8D=AE,=E5=A2=9E=E5=8A=A0=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BC=A0=E5=8F=82=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/xzf.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/xzf.sql b/sql/xzf.sql index b6f1d69..ebe68da 100644 --- a/sql/xzf.sql +++ b/sql/xzf.sql @@ -128,7 +128,7 @@ CREATE TABLE `tester_task_interface_relation` ( ) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务接口关系表' ROW_FORMAT = Dynamic; INSERT INTO `tester_task_interface_relation`(`relation_id`, `task_id`, `interface_id`, `description`, `host`, `port`, `depend_relation_ids`, `depend_param`, `get_param`, `body_param`, `login_config_id`, `status`, `create_time`) VALUES (1, 1, 1, '小钻风/在线用户查询', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', now()); INSERT INTO `tester_task_interface_relation`(`relation_id`, `task_id`, `interface_id`, `description`, `host`, `port`, `depend_relation_ids`, `depend_param`, `get_param`, `body_param`, `login_config_id`, `status`, `create_time`) VALUES (2, 1, 2, '小钻风/用户管理查询', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', now()); -INSERT INTO `tester_task_interface_relation`(`relation_id`, `task_id`, `interface_id`, `description`, `host`, `port`, `depend_relation_ids`, `depend_param`, `get_param`, `body_param`, `login_config_id`, `status`, `create_time`) VALUES (3, 1, 3, '小钻风/部门管理查询', NULL, NULL, '2', 'deptName=innate().at(0).map("rows").at(0).map("dept").map("deptName");return deptName', NULL, '{\"deptName\":\"${deptName}\"}', NULL, '0', now()); +INSERT INTO `tester_task_interface_relation`(`relation_id`, `task_id`, `interface_id`, `description`, `host`, `port`, `depend_relation_ids`, `depend_param`, `get_param`, `body_param`, `login_config_id`, `status`, `create_time`) VALUES (3, 1, 3, '小钻风/部门管理查询', NULL, NULL, '2', 'deptName=innate().at(0).map("rows").at(0).map("dept").map("deptName");return deptName currentTime();', NULL, '{\"deptName\":\"${deptName}\", \"time\":\"$[1]\"}', NULL, '0', now()); -- Gitee From a43a352c29347cd3397aa6364fd66939da15cc38 Mon Sep 17 00:00:00 2001 From: songjun Date: Wed, 18 May 2022 18:01:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E5=8F=82=E6=95=B0=E5=90=84=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=90=AB=E4=B9=89=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TesterTaskInterfaceRelationController.java | 5 ++++- .../tester/executor/expression/ExpressionContainer.java | 6 ++---- .../task_interface_relation/task_interface_relation.html | 2 +- 3 files changed, 7 insertions(+), 6 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 11dfa0b..224f00a 100644 --- a/tester/src/main/java/com/ruoyi/tester/controller/TesterTaskInterfaceRelationController.java +++ b/tester/src/main/java/com/ruoyi/tester/controller/TesterTaskInterfaceRelationController.java @@ -52,8 +52,11 @@ public class TesterTaskInterfaceRelationController extends BaseController @RequiresPermissions("tester:task_interface_relation:view") @GetMapping() - public String task_interface_relation() + public String task_interface_relation(ModelMap mmap) { + List expDescList = ExpressionContainer.expressionsDescription(); + String expDesc = expDescList.stream().collect(Collectors.joining("\r\n")); + mmap.put("expDesc", expDesc); return prefix + "/task_interface_relation"; } diff --git a/tester/src/main/java/com/ruoyi/tester/executor/expression/ExpressionContainer.java b/tester/src/main/java/com/ruoyi/tester/executor/expression/ExpressionContainer.java index 1b93337..a6c1814 100644 --- a/tester/src/main/java/com/ruoyi/tester/executor/expression/ExpressionContainer.java +++ b/tester/src/main/java/com/ruoyi/tester/executor/expression/ExpressionContainer.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * @author SongJun @@ -29,10 +30,7 @@ public class ExpressionContainer { } public static List expressionsDescription(){ - List ret = new ArrayList<>(handlerMap.size()); - for (Map.Entry entry : handlerMap.entrySet()) { - ret.add(entry.getValue().getDescription()); - } + List ret = handlerMap.values().stream().map(x -> x.getDescription()).sorted().collect(Collectors.toList()); return ret; } } 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 75ad1e6..a3e1bf8 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 @@ -114,7 +114,7 @@ }, { field: 'dependParam', - title: '依赖参数' + title: '依赖参数' }, { field: 'getParam', -- Gitee