fix(接口测试): 修复添加接口,回收站内有相同url的提示重复的缺陷

--bug=1037289 --user=王孝刚 【接口测试】接口定义-新建接口-回收站内有相同url的也提示重复了
https://www.tapd.cn/55049933/s/1477576
This commit is contained in:
wxg0103 2024-03-19 15:41:56 +08:00 committed by 刘瑞斌
parent 002e44f680
commit 8cfa6c3499
1 changed files with 4 additions and 2 deletions

View File

@ -519,7 +519,8 @@ public class ApiDefinitionService extends MoveNodeService {
.andPathEqualTo(apiDefinition.getPath())
.andMethodEqualTo(apiDefinition.getMethod())
.andProtocolEqualTo(apiDefinition.getProtocol())
.andProjectIdEqualTo(apiDefinition.getProjectId());
.andProjectIdEqualTo(apiDefinition.getProjectId())
.andDeletedEqualTo(false);
if (CollectionUtils.isNotEmpty(apiDefinitionMapper.selectByExample(example))) {
throw new MSException(ApiResultCode.API_DEFINITION_EXIST);
}
@ -539,7 +540,8 @@ public class ApiDefinitionService extends MoveNodeService {
.andIdNotEqualTo(originApiDefinition.getId())
.andProtocolEqualTo(originApiDefinition.getProtocol())
.andProjectIdEqualTo(originApiDefinition.getProjectId())
.andRefIdNotEqualTo(originApiDefinition.getRefId());
.andRefIdNotEqualTo(originApiDefinition.getRefId())
.andDeletedEqualTo(false);
if (apiDefinitionMapper.countByExample(example) > 0) {
throw new MSException(ApiResultCode.API_DEFINITION_EXIST);
}