fix(UI 自动化): idea 插件导入修复同一个层级有相同模块导入错位置的问题

--bug=1014111 --user=张大海 接口导入有同名模块时未导到指定模块 https://www.tapd.cn/55049933/s/1182562
This commit is contained in:
zhangdahai112 2022-06-15 14:43:49 +08:00 committed by zhangdahai112
parent 9e01bed7ee
commit 766029c340
1 changed files with 4 additions and 0 deletions

View File

@ -307,6 +307,10 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
if (StringUtils.isNotEmpty(node.getProtocol())) {
criteria.andProtocolEqualTo(node.getProtocol());
}
//同一个模块下不能有相同名字的子模块
if(StringUtils.isNotBlank(node.getParentId())){
criteria.andParentIdEqualTo(node.getParentId());
}
return apiModuleMapper.selectByExample(example);
}