-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
...-service/src/main/java/fi/vm/sade/eperusteet/ylops/domain/PerusteenHistoriaTapahtuma.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package fi.vm.sade.eperusteet.ylops.domain; | ||
|
||
import fi.vm.sade.eperusteet.ylops.domain.teksti.LokalisoituTeksti; | ||
import fi.vm.sade.eperusteet.ylops.dto.navigation.NavigationType; | ||
import fi.vm.sade.eperusteet.ylops.service.util.SecurityUtil; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.Date; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
public class PerusteenHistoriaTapahtuma implements HistoriaTapahtuma{ | ||
|
||
private Long perusteId; | ||
|
||
public PerusteenHistoriaTapahtuma(Long perusteId) { | ||
this.perusteId = perusteId; | ||
} | ||
|
||
@Override | ||
public Date getLuotu() { | ||
return new Date(); | ||
} | ||
|
||
@Override | ||
public Date getMuokattu() { | ||
return new Date(); | ||
} | ||
|
||
@Override | ||
public String getLuoja() { | ||
return SecurityUtil.getAuthenticatedPrincipal().getName(); | ||
} | ||
|
||
@Override | ||
public String getMuokkaaja() { | ||
return SecurityUtil.getAuthenticatedPrincipal().getName(); | ||
} | ||
|
||
@Override | ||
public Long getId() { | ||
return perusteId; | ||
} | ||
|
||
@Override | ||
public LokalisoituTeksti getNimi() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public NavigationType getNavigationType() { | ||
return NavigationType.peruste; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...s-service/src/main/resources/db/migration/V1_20241112094600__peruste_tapahtuma_update.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
UPDATE opetussuunnitelman_muokkaustieto | ||
SET kohde_id = pc.peruste_id, | ||
kohde = 'peruste' | ||
FROM opetussuunnitelma o | ||
inner join peruste_cache pc ON o.cached_peruste = pc.id | ||
WHERE o.id = opetussuunnitelman_muokkaustieto.opetussuunnitelma_id | ||
AND lisatieto = 'tapahtuma-opetussuunnitelma-peruste-paivitys'; |