fix(测试计划): 修复测试计划模块移动的问题
This commit is contained in:
parent
afc8f54f96
commit
784f37d67f
|
@ -29,6 +29,9 @@ public class ApiDefinitionUtils {
|
||||||
customRequestUrl = customRequestUrl.substring(1);
|
customRequestUrl = customRequestUrl.substring(1);
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(customRequestUrl)) {
|
if (StringUtils.isNotEmpty(customRequestUrl)) {
|
||||||
|
if (customRequestUrl.contains("?")) {
|
||||||
|
customRequestUrl = customRequestUrl.substring(0, customRequestUrl.indexOf("?"));
|
||||||
|
}
|
||||||
String[] customUrlArr = customRequestUrl.split("/");
|
String[] customUrlArr = customRequestUrl.split("/");
|
||||||
|
|
||||||
if (StringUtils.startsWithAny(customRequestUrl.toLowerCase(), "https://", "http://")
|
if (StringUtils.startsWithAny(customRequestUrl.toLowerCase(), "https://", "http://")
|
||||||
|
|
|
@ -167,6 +167,7 @@ public class TestPlanModuleService extends ModuleTreeService {
|
||||||
TestPlanModuleExample example = new TestPlanModuleExample();
|
TestPlanModuleExample example = new TestPlanModuleExample();
|
||||||
// 拖拽后, 父级模块下存在同名模块
|
// 拖拽后, 父级模块下存在同名模块
|
||||||
example.createCriteria().andParentIdEqualTo(nodeSortDTO.getParent().getId()).andNameEqualTo(nodeSortDTO.getNode().getName())
|
example.createCriteria().andParentIdEqualTo(nodeSortDTO.getParent().getId()).andNameEqualTo(nodeSortDTO.getNode().getName())
|
||||||
|
.andProjectIdEqualTo(nodeSortDTO.getNode().getProjectId())
|
||||||
.andIdNotEqualTo(nodeSortDTO.getNode().getId());
|
.andIdNotEqualTo(nodeSortDTO.getNode().getId());
|
||||||
if (testPlanModuleMapper.countByExample(example) > 0) {
|
if (testPlanModuleMapper.countByExample(example) > 0) {
|
||||||
throw new MSException(Translator.get("test_plan_module_already_exists"));
|
throw new MSException(Translator.get("test_plan_module_already_exists"));
|
||||||
|
|
Loading…
Reference in New Issue