Skip to content

Commit

Permalink
Refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
EmanueleValentini1 committed Nov 14, 2023
1 parent 78cd0ae commit 43c035d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public Uni<List<BpmnBankConfig>> findByAcquirerIdAndFunctionType(String acquirer
return list("select b from BpmnBankConfig b where b.bpmnBankConfigPK.acquirerId = :acquirerId and b.functionType= :functionType", params);
}

public Uni<List<BpmnBankConfig>> findByTriadAndFunctionType(String acquirerId, String branchId, String terminalId, String functionType) {
public Uni<List<BpmnBankConfig>> findByConfigAndFunctionType(String acquirerId, String branchId, String terminalId, String functionType) {
Map<String, Object> params = new HashMap<>();
params.put("acquirerId", acquirerId);
params.put("branchId", branchId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -42,7 +40,7 @@ public Uni<Long> deleteByAcquirerIdAndFunctionType(String acquirerId, String fun
}

public Uni<Optional<BpmnBankConfig>> 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);
Expand Down

0 comments on commit 43c035d

Please sign in to comment.