fix(接口定义): 修复模块移动缺陷
This commit is contained in:
parent
a1eac0996f
commit
5b60ac942c
|
@ -2,6 +2,7 @@ package io.metersphere.service;
|
||||||
|
|
||||||
import io.metersphere.commons.utils.BeanUtils;
|
import io.metersphere.commons.utils.BeanUtils;
|
||||||
import io.metersphere.track.dto.TreeNodeDTO;
|
import io.metersphere.track.dto.TreeNodeDTO;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -123,7 +124,7 @@ public class NodeTreeService<T extends TreeNodeDTO> {
|
||||||
* @param pathMap 记录节点路径对应的nodeId
|
* @param pathMap 记录节点路径对应的nodeId
|
||||||
*/
|
*/
|
||||||
protected void createNodeByPathIterator(Iterator<String> pathIterator, String path, T treeNode,
|
protected void createNodeByPathIterator(Iterator<String> pathIterator, String path, T treeNode,
|
||||||
Map<String, String> pathMap, String projectId, Integer level) {
|
Map<String, String> pathMap, String projectId, Integer level) {
|
||||||
|
|
||||||
List<T> children = treeNode.getChildren();
|
List<T> children = treeNode.getChildren();
|
||||||
|
|
||||||
|
@ -161,8 +162,8 @@ public class NodeTreeService<T extends TreeNodeDTO> {
|
||||||
* @param pNode 父节点
|
* @param pNode 父节点
|
||||||
*/
|
*/
|
||||||
protected void createNodeByPath(Iterator<String> pathIterator, String nodeName,
|
protected void createNodeByPath(Iterator<String> pathIterator, String nodeName,
|
||||||
T pNode, String projectId, Integer level,
|
T pNode, String projectId, Integer level,
|
||||||
String rootPath, Map<String, String> pathMap) {
|
String rootPath, Map<String, String> pathMap) {
|
||||||
|
|
||||||
StringBuilder path = new StringBuilder(rootPath);
|
StringBuilder path = new StringBuilder(rootPath);
|
||||||
|
|
||||||
|
@ -203,6 +204,8 @@ public class NodeTreeService<T extends TreeNodeDTO> {
|
||||||
*/
|
*/
|
||||||
public void sort(List<String> ids) {
|
public void sort(List<String> ids) {
|
||||||
// 获取相邻节点 id
|
// 获取相邻节点 id
|
||||||
|
if (CollectionUtils.isEmpty(ids))
|
||||||
|
return;
|
||||||
String before = ids.get(0);
|
String before = ids.get(0);
|
||||||
String id = ids.get(1);
|
String id = ids.get(1);
|
||||||
String after = ids.get(2);
|
String after = ids.get(2);
|
||||||
|
|
Loading…
Reference in New Issue