Skip to content

Commit

Permalink
WIP JPA rewrite. Testing abstract service.
Browse files Browse the repository at this point in the history
  • Loading branch information
flexable777 committed Feb 14, 2024
1 parent ace74fa commit 7439cd9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/no/nav/klage/service/AnkeService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import java.util.*
@Service
@Transactional
class AnkeService(
klankeRepository: KlankeRepository,
private val klankeRepository: KlankeRepository,
private val ankeRepository: AnkeRepository,
private val klageAnkeMetrics: KlageAnkeMetrics,
private val vedleggMetrics: VedleggMetrics,
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/no/nav/klage/service/CommonService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.time.LocalDateTime
import java.util.*

abstract class CommonService(
val klankeRepository: KlankeRepository,
private val klankeRepository: KlankeRepository,
val validationService: ValidationService,
val kafkaInternalEventService: KafkaInternalEventService,
) {
Expand Down
7 changes: 5 additions & 2 deletions src/main/kotlin/no/nav/klage/service/KlageService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ import java.util.*
@Service
@Transactional
class KlageService(
klankeRepository: KlankeRepository,
private val klageRepository: KlageRepository,
private val klageAnkeMetrics: KlageAnkeMetrics,
private val vedleggMetrics: VedleggMetrics,
private val kafkaProducer: AivenKafkaProducer,
private val fileClient: FileClient,
private val klageDittnavPdfgenService: KlageDittnavPdfgenService,
private val klankeRepository: KlankeRepository,
validationService: ValidationService,
kafkaInternalEventService: KafkaInternalEventService,
private val klageDittnavPdfgenService: KlageDittnavPdfgenService,
) : CommonService(
klankeRepository = klankeRepository,
validationService = validationService,
Expand Down Expand Up @@ -279,6 +279,9 @@ class KlageService(
}

fun getKlageDraftsByFnr(bruker: Bruker): List<Klage> {
//dev test
klankeRepository.findAll().first()

return klageRepository.findByFoedselsnummerAndStatus(
fnr = bruker.folkeregisteridentifikator.identifikasjonsnummer,
status = KlageAnkeStatus.DRAFT
Expand Down

0 comments on commit 7439cd9

Please sign in to comment.