diff --git a/src/main/java/it/gov/pagopa/atmlayer/service/model/repository/BpmnBankConfigRepository.java b/src/main/java/it/gov/pagopa/atmlayer/service/model/repository/BpmnBankConfigRepository.java index c819499d..3cff5fa4 100644 --- a/src/main/java/it/gov/pagopa/atmlayer/service/model/repository/BpmnBankConfigRepository.java +++ b/src/main/java/it/gov/pagopa/atmlayer/service/model/repository/BpmnBankConfigRepository.java @@ -28,7 +28,7 @@ public Uni> findByAcquirerIdAndFunctionType(String acquirer return list("select b from BpmnBankConfig b where b.bpmnBankConfigPK.acquirerId = :acquirerId and b.functionType= :functionType", params); } - public Uni> findByTriadAndFunctionType(String acquirerId, String branchId, String terminalId, String functionType) { + public Uni> findByConfigAndFunctionType(String acquirerId, String branchId, String terminalId, String functionType) { Map params = new HashMap<>(); params.put("acquirerId", acquirerId); params.put("branchId", branchId); diff --git a/src/main/java/it/gov/pagopa/atmlayer/service/model/service/impl/BpmnBankConfigService.java b/src/main/java/it/gov/pagopa/atmlayer/service/model/service/impl/BpmnBankConfigService.java index bd9302fe..42559535 100644 --- a/src/main/java/it/gov/pagopa/atmlayer/service/model/service/impl/BpmnBankConfigService.java +++ b/src/main/java/it/gov/pagopa/atmlayer/service/model/service/impl/BpmnBankConfigService.java @@ -13,8 +13,6 @@ import jakarta.inject.Inject; import jakarta.ws.rs.core.Response; -import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; @@ -42,7 +40,7 @@ public Uni deleteByAcquirerIdAndFunctionType(String acquirerId, String fun } public Uni> findByConfigurationsAndFunction(String acquirerId, String branchId, String terminalId, String functionType) { - return this.bankConfigRepository.findByTriadAndFunctionType(acquirerId, branchId, terminalId, functionType) + return this.bankConfigRepository.findByConfigAndFunctionType(acquirerId, branchId, terminalId, functionType) .onItem().transformToUni(Unchecked.function(x -> { if (!x.isEmpty() && x.size() > 1) { throw new AtmLayerException("Multiple BPMN found for a single configuration.", Response.Status.INTERNAL_SERVER_ERROR, AppErrorCodeEnum.ATMLM_500);