From a35b3809ea973911fb38f483d25017986499b74b Mon Sep 17 00:00:00 2001 From: Alessio Cialini Date: Thu, 5 Sep 2024 14:18:51 +0200 Subject: [PATCH] [PPANTT-106] feat: updated Stazioni with new filter in stazioni repository --- .../apiconfig/starter/repository/StazioniRepository.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 623620e..a292cca 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 @@ -51,8 +51,8 @@ Page findAllByFilters( + " null or upper(s.idStazione) like concat('%', upper(:idStazione), '%')) and" + " (:codiceIntermediario is null or upper(i.codiceIntermediario) like 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 (cast(cast(:createDateBefore as text) as timestamp) IS NULL OR s.dataCreazione < cast(cast(:createDateBefore as text) as timestamp)) " + + " AND (cast(cast(:createDateAfter as text) as timestamp) IS NULL OR s.dataCreazione > cast(cast(:createDateAfter as text) as timestamp)) " + " 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%')))") @@ -73,8 +73,8 @@ Page findAllByFilters( + " (:idStazione is null or upper(s.idStazione) like concat('%', upper(:idStazione)," + " '%')) and (:codiceIntermediario is null or upper(i.codiceIntermediario) like " + " 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 (cast(cast(:createDateBefore as text) as timestamp) IS NULL OR s.dataCreazione < cast(cast(:createDateBefore as text) as timestamp)) " + + " AND (cast(cast(:createDateAfter as text) as timestamp) IS NULL OR s.dataCreazione > cast(cast(:createDateAfter as text) as timestamp)) " + " 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%')))"