fix(场景自动化): 自定义ID检查问题

This commit is contained in:
shiziyuan9527 2021-06-22 16:05:28 +08:00 committed by 刘瑞斌
parent f698493396
commit 8ba4b352f5
1 changed files with 3 additions and 1 deletions

View File

@ -298,7 +298,9 @@ public class ApiAutomationService {
private void checkCustomNumExist(SaveApiScenarioRequest request) {
ApiScenarioExample example = new ApiScenarioExample();
example.createCriteria().andCustomNumEqualTo(request.getCustomNum())
example.createCriteria()
.andCustomNumEqualTo(request.getCustomNum())
.andProjectIdEqualTo(request.getProjectId())
.andIdNotEqualTo(request.getId());
List<ApiScenario> list = apiScenarioMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(list)) {