revert(接口测试): 回退接口场景自定义id与回收站冲突问题

--user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001018278
This commit is contained in:
guoyuqi 2022-10-27 14:47:48 +08:00 committed by xiaomeinvG
parent 6f5724b996
commit 8b97305b85
1 changed files with 1 additions and 2 deletions

View File

@ -326,7 +326,7 @@ public class ApiScenarioService {
String id = request.getId(); String id = request.getId();
ApiScenarioWithBLOBs apiScenarioWithBLOBs = apiScenarioMapper.selectByPrimaryKey(id); ApiScenarioWithBLOBs apiScenarioWithBLOBs = apiScenarioMapper.selectByPrimaryKey(id);
ApiScenarioExample.Criteria criteria = example.createCriteria(); ApiScenarioExample.Criteria criteria = example.createCriteria();
criteria.andCustomNumEqualTo(request.getCustomNum()).andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(id).andStatusNotEqualTo(ApiTestDataStatus.TRASH.getValue()); criteria.andCustomNumEqualTo(request.getCustomNum()).andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(id);
if (apiScenarioWithBLOBs != null && StringUtils.isNotBlank(apiScenarioWithBLOBs.getRefId())) { if (apiScenarioWithBLOBs != null && StringUtils.isNotBlank(apiScenarioWithBLOBs.getRefId())) {
criteria.andRefIdNotEqualTo(apiScenarioWithBLOBs.getRefId()); criteria.andRefIdNotEqualTo(apiScenarioWithBLOBs.getRefId());
} }
@ -1262,7 +1262,6 @@ public class ApiScenarioService {
if (BooleanUtils.isTrue(openCustomNum)) { if (BooleanUtils.isTrue(openCustomNum)) {
ApiScenarioExample example = new ApiScenarioExample(); ApiScenarioExample example = new ApiScenarioExample();
ApiScenarioExample.Criteria criteria = example.createCriteria(); ApiScenarioExample.Criteria criteria = example.createCriteria();
criteria.andStatusNotEqualTo(ApiTestDataStatus.TRASH.getValue());
if (CollectionUtils.isEmpty(sameList)) { if (CollectionUtils.isEmpty(sameList)) {
criteria.andCustomNumEqualTo(scenarioWithBLOBs.getCustomNum()).andProjectIdEqualTo(scenarioWithBLOBs.getProjectId()); criteria.andCustomNumEqualTo(scenarioWithBLOBs.getCustomNum()).andProjectIdEqualTo(scenarioWithBLOBs.getProjectId());
} else { } else {