From 766029c3408b5578876bda8a101a992afeb3421b Mon Sep 17 00:00:00 2001 From: zhangdahai112 Date: Wed, 15 Jun 2022 14:43:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(UI=20=E8=87=AA=E5=8A=A8=E5=8C=96):=20idea?= =?UTF-8?q?=20=E6=8F=92=E4=BB=B6=E5=AF=BC=E5=85=A5=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E4=B8=AA=E5=B1=82=E7=BA=A7=E6=9C=89=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=E6=A8=A1=E5=9D=97=E5=AF=BC=E5=85=A5=E9=94=99=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1014111 --user=张大海 接口导入有同名模块时未导到指定模块 https://www.tapd.cn/55049933/s/1182562 --- .../java/io/metersphere/api/service/ApiModuleService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java index fa22a7b340..dcd9369c8d 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java @@ -307,6 +307,10 @@ public class ApiModuleService extends NodeTreeService { if (StringUtils.isNotEmpty(node.getProtocol())) { criteria.andProtocolEqualTo(node.getProtocol()); } + //同一个模块下不能有相同名字的子模块 + if(StringUtils.isNotBlank(node.getParentId())){ + criteria.andParentIdEqualTo(node.getParentId()); + } return apiModuleMapper.selectByExample(example); }