fix: 脑图无法删除用例

This commit is contained in:
chenjianxing 2021-07-30 10:40:13 +08:00 committed by jianxing
parent fe484a425d
commit 8ffa57619b
1 changed files with 29 additions and 31 deletions

View File

@ -1319,10 +1319,7 @@ public class TestCaseService {
public void minderEdit(TestCaseMinderEditRequest request) { public void minderEdit(TestCaseMinderEditRequest request) {
List<TestCaseWithBLOBs> data = request.getData(); List<TestCaseWithBLOBs> data = request.getData();
if (CollectionUtils.isEmpty(data)) { if (CollectionUtils.isNotEmpty(data)) {
return;
}
List<String> editIds = data.stream() List<String> editIds = data.stream()
.filter(t -> StringUtils.isNotBlank(t.getId()) && t.getId().length() > 20) .filter(t -> StringUtils.isNotBlank(t.getId()) && t.getId().length() > 20)
.map(TestCaseWithBLOBs::getId).collect(Collectors.toList()); .map(TestCaseWithBLOBs::getId).collect(Collectors.toList());
@ -1353,6 +1350,7 @@ public class TestCaseService {
editTestCase(item); editTestCase(item);
} }
}); });
}
List<String> ids = request.getIds(); List<String> ids = request.getIds();
if (CollectionUtils.isNotEmpty(ids)) { if (CollectionUtils.isNotEmpty(ids)) {
TestCaseBatchRequest deleteRequest = new TestCaseBatchRequest(); TestCaseBatchRequest deleteRequest = new TestCaseBatchRequest();