fix(测试跟踪): 导入功能用例报错 nodePath 不能为空

This commit is contained in:
chenjianxing 2023-04-23 11:11:19 +08:00 committed by jianxing
parent c66b38c4e0
commit ff40cd438c
1 changed files with 4 additions and 1 deletions

View File

@ -582,8 +582,11 @@ public class TestCaseService {
TestCaseExample.Criteria criteria = example.createCriteria();
criteria.andNameEqualTo(testCase.getName())
.andProjectIdEqualTo(testCase.getProjectId())
.andNodePathEqualTo(testCase.getNodeId())
.andStatusNotEqualTo(CommonConstants.TrashStatus);
if (StringUtils.isNotBlank(testCase.getNodeId())) {
criteria.andNodeIdEqualTo(testCase.getNodeId());
}
if (StringUtils.isNotBlank(testCase.getPriority())) {
criteria.andPriorityEqualTo(testCase.getPriority());
}