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

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

View File

@ -294,7 +294,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)) {