fix(接口自动化): 修复导入场景后,重新保存原场景,引用的场景会显示已删除问题
This commit is contained in:
parent
fec36d8dc7
commit
c5e41119c3
|
@ -2,8 +2,7 @@ package io.metersphere.api.service;
|
||||||
|
|
||||||
import io.metersphere.api.dto.automation.TcpTreeTableDataStruct;
|
import io.metersphere.api.dto.automation.TcpTreeTableDataStruct;
|
||||||
import io.metersphere.api.dto.automation.parse.TcpTreeTableDataParser;
|
import io.metersphere.api.dto.automation.parse.TcpTreeTableDataParser;
|
||||||
import io.metersphere.api.dto.definition.*;
|
import io.metersphere.api.dto.definition.SaveApiDefinitionRequest;
|
||||||
import io.metersphere.api.dto.definition.request.MsScenario;
|
|
||||||
import io.metersphere.api.dto.definition.request.MsTestElement;
|
import io.metersphere.api.dto.definition.request.MsTestElement;
|
||||||
import io.metersphere.api.dto.definition.request.sampler.MsTCPSampler;
|
import io.metersphere.api.dto.definition.request.sampler.MsTCPSampler;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -11,7 +10,6 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author song.tianyang
|
* @author song.tianyang
|
||||||
|
@ -66,8 +64,6 @@ public class TcpApiParamService {
|
||||||
if(testElement != null){
|
if(testElement != null){
|
||||||
if(testElement instanceof MsTCPSampler){
|
if(testElement instanceof MsTCPSampler){
|
||||||
this.handleTcpRequest(testElement);
|
this.handleTcpRequest(testElement);
|
||||||
}else if (testElement instanceof MsScenario) {
|
|
||||||
testElement.setId(UUID.randomUUID().toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(testElement.getHashTree() != null){
|
if(testElement.getHashTree() != null){
|
||||||
|
|
Loading…
Reference in New Issue