fix(测试跟踪): 关联接口用例SQL报错问题

--bug=1018198 --user=宋昌昌 【测试跟踪】测试用例-关联测试-关联接口用例报sql错 https://www.tapd.cn/55049933/s/1263423
This commit is contained in:
song-cc-rock 2022-10-17 10:50:38 +08:00 committed by f2c-ci-robot[bot]
parent 65036684b8
commit cc7ae74c7f
2 changed files with 3 additions and 4 deletions

View File

@ -1024,7 +1024,8 @@ public class ApiTestCaseService {
public List<ApiTestCase> getApiCaseByIds(List<String> apiCaseIds) { public List<ApiTestCase> getApiCaseByIds(List<String> apiCaseIds) {
if (CollectionUtils.isNotEmpty(apiCaseIds)) { if (CollectionUtils.isNotEmpty(apiCaseIds)) {
ApiTestCaseExample example = new ApiTestCaseExample(); ApiTestCaseExample example = new ApiTestCaseExample();
example.createCriteria().andIdIn(apiCaseIds).andStatusNotEqualTo(CommonConstants.TrashStatus); example.createCriteria().andIdIn(apiCaseIds);
example.or().andStatusNotEqualTo(CommonConstants.TrashStatus).andStatusIsNull();
return apiTestCaseMapper.selectByExample(example); return apiTestCaseMapper.selectByExample(example);
} }
return new ArrayList<>(); return new ArrayList<>();

View File

@ -2172,9 +2172,7 @@ public class ApiScenarioService {
public List<ApiScenario> getScenarioCaseByIds(List<String> ids) { public List<ApiScenario> getScenarioCaseByIds(List<String> ids) {
if (CollectionUtils.isNotEmpty(ids)) { if (CollectionUtils.isNotEmpty(ids)) {
ApiScenarioExample example = new ApiScenarioExample(); ApiScenarioExample example = new ApiScenarioExample();
example.createCriteria() example.createCriteria().andIdIn(ids).andStatusNotEqualTo(CommonConstants.TrashStatus);
.andIdIn(ids)
.andStatusNotEqualTo(CommonConstants.TrashStatus);
return apiScenarioMapper.selectByExample(example); return apiScenarioMapper.selectByExample(example);
} }
return new ArrayList<>(); return new ArrayList<>();