From 73a5b283b1561484f294ddadd71deb2000d616c5 Mon Sep 17 00:00:00 2001 From: Alessio Cialini Date: Thu, 5 Sep 2024 14:15:38 +0200 Subject: [PATCH] [PPANTT-106] feat: updated Stazioni with new filter in stazioni repository --- .../apiconfig/starter/repository/StazioniRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/it/gov/pagopa/apiconfig/starter/repository/StazioniRepository.java b/src/main/java/it/gov/pagopa/apiconfig/starter/repository/StazioniRepository.java index 81c4a92..623620e 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/starter/repository/StazioniRepository.java +++ b/src/main/java/it/gov/pagopa/apiconfig/starter/repository/StazioniRepository.java @@ -53,7 +53,7 @@ Page findAllByFilters( + " upper(:codiceIntermediario), '%')) " + " AND (cast(cast(:createDateBefore as text) as timestamp) IS NULL OR s.createDate < cast(cast(:createDateBefore as text) as timestamp)) " + " AND (cast(cast(:createDateAfter as text) as timestamp) IS NULL OR s.createDate > cast(cast(:createDateAfter as text) as timestamp)) " - + " AND ((:connectionType IS NULL OR :connectionType = 'NONE) " + + " AND ((:connectionType IS NULL OR :connectionType = 'NONE') " + " OR (:connectionType = 'SYNC' AND servizio LIKE '%gpd%')" + " OR (:connectionType = 'ASYNC' AND (servizio IS NULL or servizio NOT LIKE '%gpd%')))") Page findAllByFilters( @@ -75,7 +75,7 @@ Page findAllByFilters( + " concat('%', upper(:codiceIntermediario), '%')) " + " AND (cast(cast(:createDateBefore as text) as timestamp) IS NULL OR s.createDate < cast(cast(:createDateBefore as text) as timestamp)) " + " AND (cast(cast(:createDateAfter as text) as timestamp) IS NULL OR s.createDate > cast(cast(:createDateAfter as text) as timestamp)) " - + " AND ((:connectionType IS NULL OR :connectionType = 'NONE) " + + " AND ((:connectionType IS NULL OR :connectionType = 'NONE') " + " OR (:connectionType = 'SYNC' AND servizio LIKE '%gpd%')" + " OR (:connectionType = 'ASYNC' AND (servizio IS NULL or servizio NOT LIKE '%gpd%')))" )