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%')))" )