RED-8702: Explore document databases to store entityLog

* partial fix for wrong service call
This commit is contained in:
maverickstuder 2024-03-27 15:12:27 +01:00
parent a4988002cd
commit c3fa3af805
2 changed files with 5 additions and 3 deletions

View File

@ -85,8 +85,10 @@ public class EntityChangeLogService {
List<EntityLogEntry> removedEntries = previousEntityLogEntries.stream()
.filter(entry -> !existingIds.contains(entry.getId()))
.toList();
removedEntries.forEach(entry -> entry.getChanges().add(new Change(analysisNumber, ChangeType.REMOVED, now)));
removedEntries.forEach(entry -> entry.setState(EntryState.REMOVED));
removedEntries.stream()
.filter(entry -> !entry.getState().equals(EntryState.REMOVED))
.peek(entry -> entry.getChanges().add(new Change(analysisNumber, ChangeType.REMOVED, now)))
.forEach(entry -> entry.setState(EntryState.REMOVED));
//entityLogMongoService.updateEntityLogEntries(dossierId, fileId, removedEntries);
newEntityLogEntries.addAll(removedEntries);
return removedEntries;

View File

@ -212,7 +212,7 @@ public class RedactionStorageService {
public List<EntityLogEntry> findEntriesWithIds(String dossierId, String fileId, Collection<String> entryIds) {
return entityLogMongoService.findAllEntityLogEntriesWithContainingNodeIdsWithEntryIdsIn(dossierId, fileId, entryIds);
return entityLogMongoService.findAllEntityLogEntriesWithEntryIdsIn(dossierId, fileId, entryIds);
}