Last atttribute change only for affected file
This commit is contained in:
parent
81d4970c7c
commit
4b6e959ce3
@ -162,7 +162,7 @@ public class FileStatusPersistenceService {
|
||||
|
||||
var fileAttributeEntities = convertFileAttributes(dossierId, file, fileAttributes);
|
||||
fileAttributesRepository.saveAllAndFlush(fileAttributeEntities);
|
||||
fileRepository.updateLastAttributeChangeDate(OffsetDateTime.now().truncatedTo(ChronoUnit.MILLIS));
|
||||
fileRepository.updateLastAttributeChangeDate(fileId, OffsetDateTime.now().truncatedTo(ChronoUnit.MILLIS));
|
||||
|
||||
}, () -> {
|
||||
throw new NotFoundException("Unknown file=" + fileId);
|
||||
|
||||
@ -145,8 +145,8 @@ public interface FileRepository extends JpaRepository<FileEntity, String> {
|
||||
List<FileEntity> getAllRelevantStatusesForReanalysisScheduler();
|
||||
|
||||
@Modifying(clearAutomatically = true)
|
||||
@Query("update FileEntity f set f.lastFileAttributeChange = :date, f.lastUpdated = :date")
|
||||
void updateLastAttributeChangeDate(OffsetDateTime date);
|
||||
@Query("update FileEntity f set f.lastFileAttributeChange = :date, f.lastUpdated = :date where f.id = :fileId")
|
||||
void updateLastAttributeChangeDate(String fileId, OffsetDateTime date);
|
||||
|
||||
@Query("select f from FileEntity f where f.deleted is not null and f.hardDeletedTime is null and f.dossierId in :dossierIds")
|
||||
List<FileEntity> getSoftDeletedFiles(List<String> dossierIds);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user