fix(接口测试): 修复场景导入自定义id与回收站冲突问题
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001018278 --user=郭雨琦
This commit is contained in:
parent
6a7e7c5386
commit
38364e48c5
|
@ -324,7 +324,7 @@ public class ApiScenarioService {
|
|||
String id = request.getId();
|
||||
ApiScenarioWithBLOBs apiScenarioWithBLOBs = apiScenarioMapper.selectByPrimaryKey(id);
|
||||
ApiScenarioExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andCustomNumEqualTo(request.getCustomNum()).andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(id);
|
||||
criteria.andCustomNumEqualTo(request.getCustomNum()).andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(id).andStatusNotEqualTo(ApiTestDataStatus.TRASH.getValue());
|
||||
if (apiScenarioWithBLOBs != null && StringUtils.isNotBlank(apiScenarioWithBLOBs.getRefId())) {
|
||||
criteria.andRefIdNotEqualTo(apiScenarioWithBLOBs.getRefId());
|
||||
}
|
||||
|
@ -1256,6 +1256,7 @@ public class ApiScenarioService {
|
|||
if (BooleanUtils.isTrue(openCustomNum)) {
|
||||
ApiScenarioExample example = new ApiScenarioExample();
|
||||
ApiScenarioExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andStatusNotEqualTo(ApiTestDataStatus.TRASH.getValue());
|
||||
if (CollectionUtils.isEmpty(sameList)) {
|
||||
criteria.andCustomNumEqualTo(scenarioWithBLOBs.getCustomNum()).andProjectIdEqualTo(scenarioWithBLOBs.getProjectId());
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue