|
@@ -45,18 +45,17 @@ public class EntityServiceImpl implements EntityService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Boolean deleteEntity(DeleteEntityVO ids) {
|
|
|
+ public Boolean deleteEntity(List<Long> ids) {
|
|
|
|
|
|
- List<Long> entityIds = ids.getIds();
|
|
|
//查询是否存在删除实体
|
|
|
- boolean allExist = entityIds.stream()
|
|
|
+ boolean allExist = ids.stream()
|
|
|
.allMatch(id -> nodeRepository.findNodeById(id) != null);
|
|
|
if (!allExist) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
// 删除单个实体
|
|
|
- entityIds.forEach(id -> nodeRepository.deleteNode(id));
|
|
|
+ ids.forEach(id -> nodeRepository.deleteNode(id));
|
|
|
|
|
|
return true;
|
|
|
}
|