Commit 924fa3d7 authored by shiziyuan9527's avatar shiziyuan9527 Committed by 刘瑞斌
Browse files

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

parent 7342aac5
Showing with 3 additions and 1 deletion
+3 -1
...@@ -294,7 +294,9 @@ public class ApiAutomationService { ...@@ -294,7 +294,9 @@ public class ApiAutomationService {
private void checkCustomNumExist(SaveApiScenarioRequest request) { private void checkCustomNumExist(SaveApiScenarioRequest request) {
ApiScenarioExample example = new ApiScenarioExample(); ApiScenarioExample example = new ApiScenarioExample();
example.createCriteria().andCustomNumEqualTo(request.getCustomNum()) example.createCriteria()
.andCustomNumEqualTo(request.getCustomNum())
.andProjectIdEqualTo(request.getProjectId())
.andIdNotEqualTo(request.getId()); .andIdNotEqualTo(request.getId());
List<ApiScenario> list = apiScenarioMapper.selectByExample(example); List<ApiScenario> list = apiScenarioMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment