diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.xml
index e597b753cc..e2f8482b61 100644
--- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.xml
+++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtModuleNodeMapper.xml
@@ -195,7 +195,7 @@
diff --git a/backend/src/main/java/io/metersphere/service/BaseModuleService.java b/backend/src/main/java/io/metersphere/service/BaseModuleService.java
index 2629884b07..cfc5929aeb 100644
--- a/backend/src/main/java/io/metersphere/service/BaseModuleService.java
+++ b/backend/src/main/java/io/metersphere/service/BaseModuleService.java
@@ -73,15 +73,15 @@ public class BaseModuleService extends NodeTreeService {
return module.getId();
}
- public String getModulePath(ModuleNode module){
+ public String getModulePath(ModuleNode module) {
Integer level = module.getLevel();
- if( level == null || level <= 1){
- return String.format("/%s",module.getName());
+ if (level == null || level <= 1) {
+ return String.format("/%s", module.getName());
}
//获取父级信息
- if(StringUtils.isNotBlank(module.getParentId())){
+ if (StringUtils.isNotBlank(module.getParentId())) {
ModuleNode parent = extModuleNodeMapper.selectByPrimaryKey(tableName, module.getParentId());
- return parent.getModulePath() + "/" + module.getName();
+ return parent.getModulePath() + "/" + module.getName();
}
return null;
}
@@ -166,7 +166,7 @@ public class BaseModuleService extends NodeTreeService {
}
protected void buildNodeCount(String projectId, List moduleNodes, Function>> getModuleCountFunc,
- QueryNodeRequest request) {
+ QueryNodeRequest request) {
if (request == null) {
request = new QueryNodeRequest();
}
@@ -365,7 +365,7 @@ public class BaseModuleService extends NodeTreeService {
moduleNode.setId(UUID.randomUUID().toString());
double pos = getNextLevelPos(projectId, level, pId);
moduleNode.setPos(pos);
- extModuleNodeMapper.insert(tableName, moduleNode);
+ extModuleNodeMapper.insertWithModulePath(tableName, moduleNode);
return moduleNode.getId();
}
@@ -429,10 +429,9 @@ public class BaseModuleService extends NodeTreeService {
moduleNode.setId(rootNode.getId());
moduleNode.setLevel(level);
moduleNode.setParentId(pId);
- if(level <= 1 && StringUtils.isBlank(parentPath)){
+ if (level <= 1 && StringUtils.isBlank(parentPath)) {
moduleNode.setModulePath("/" + rootNode.getName());
- }
- else {
+ } else {
moduleNode.setModulePath(parentPath + "/" + rootNode.getName());
}
updateNodes.add(moduleNode);
@@ -612,7 +611,7 @@ public class BaseModuleService extends NodeTreeService {
return extModuleNodeMapper.selectByExample(tableName, example);
}
- public List selectByModulePath(ModuleNode node){
+ public List selectByModulePath(ModuleNode node) {
return extModuleNodeMapper.selectByModulePath(tableName, node.getModulePath(), node.getProjectId());
}
}
diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack
index 806edbbea6..9b3c05ac31 160000
--- a/backend/src/main/java/io/metersphere/xpack
+++ b/backend/src/main/java/io/metersphere/xpack
@@ -1 +1 @@
-Subproject commit 806edbbea6b2b3fffbb18b8fb83f4d293a1eed34
+Subproject commit 9b3c05ac310942814b28e2433339e3303a5366e4
diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack
index d357c326a7..1a5c65b84f 160000
--- a/frontend/src/business/components/xpack
+++ b/frontend/src/business/components/xpack
@@ -1 +1 @@
-Subproject commit d357c326a70088b0827ba1ced1d9cc035866170d
+Subproject commit 1a5c65b84fb0c3cdce17b2671e6d80dc4e420337