creted and modified by and
This commit is contained in:
parent
02f7f674ce
commit
f6feef1942
|
@ -345,6 +345,8 @@ public class DatabaseUtils {
|
||||||
@Transactional
|
@Transactional
|
||||||
public String fixConflict(final List<String> similarIds, final String user) {
|
public String fixConflict(final List<String> similarIds, final String user) {
|
||||||
|
|
||||||
|
final OffsetDateTime now = OffsetDateTime.now();
|
||||||
|
|
||||||
final List<OrganizationView> views =
|
final List<OrganizationView> views =
|
||||||
similarIds.stream().map(organizationViewRepository::findById).filter(Optional::isPresent).map(Optional::get).collect(Collectors.toList());
|
similarIds.stream().map(organizationViewRepository::findById).filter(Optional::isPresent).map(Optional::get).collect(Collectors.toList());
|
||||||
|
|
||||||
|
@ -385,8 +387,10 @@ public class DatabaseUtils {
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
openaireDuplicateRepository.saveAll(newDuplicates);
|
openaireDuplicateRepository.saveAll(newDuplicates);
|
||||||
|
newDuplicates.forEach(d -> {
|
||||||
final OffsetDateTime now = OffsetDateTime.now();
|
openaireDuplicateRepository.updateCreatedByIfMissing(d.getLocalId(), d.getOaOriginalId(), user);
|
||||||
|
openaireDuplicateRepository.updateModificationDate(d.getLocalId(), d.getOaOriginalId(), user, now);
|
||||||
|
});
|
||||||
|
|
||||||
for (final String similarId : similarIds) {
|
for (final String similarId : similarIds) {
|
||||||
openaireConflictRepository.updateMultipleStatusAndResetGroup(similarId, SimilarityType.is_different.toString(), user, now);
|
openaireConflictRepository.updateMultipleStatusAndResetGroup(similarId, SimilarityType.is_different.toString(), user, now);
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
public class SimpleTest {
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue