From e71177b02620fe378a8204d16f334c0979d49e2d Mon Sep 17 00:00:00 2001 From: hongwei Date: Mon, 5 Dec 2022 16:19:23 +0100 Subject: [PATCH] refactor/added the bankId to CustomerAccountLink Model --- .../SwaggerDefinitionsJSON.scala | 2 + .../main/scala/code/api/util/NewStyle.scala | 4 +- .../scala/code/api/v5_0_0/APIMethods500.scala | 2 +- .../code/api/v5_0_0/JSONFactory5.0.0.scala | 3 ++ .../scala/code/bankconnectors/Connector.scala | 2 +- .../bankconnectors/LocalMappedConnector.scala | 14 +----- .../CustomerAccountLink.scala | 15 +++---- .../MappedCustomerAccountLink.scala | 43 ++++++++++--------- .../RemotedataCustomerAccountLinks.scala | 16 +++---- .../RemotedataCustomerAccountLinksActor.scala | 22 ++++------ 10 files changed, 56 insertions(+), 67 deletions(-) diff --git a/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala b/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala index 043b50439..cd0a5c7fa 100644 --- a/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala +++ b/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala @@ -5192,6 +5192,7 @@ object SwaggerDefinitionsJSON { val createCustomerAccountLinkJson = CreateCustomerAccountLinkJson( customer_id = customerIdExample.value, + bank_id = bankIdExample.value, account_id = accountIdExample.value, relationship_type= relationshipTypeExample.value ) @@ -5202,6 +5203,7 @@ object SwaggerDefinitionsJSON { val customerAccountLinkJson = CustomerAccountLinkJson( customer_account_link_id = customerAccountLinkIdExample.value, customer_id = customerIdExample.value, + bank_id = bankIdExample.value, account_id = accountIdExample.value, relationship_type= relationshipTypeExample.value ) diff --git a/obp-api/src/main/scala/code/api/util/NewStyle.scala b/obp-api/src/main/scala/code/api/util/NewStyle.scala index 27c7c8f28..94bb4ae76 100644 --- a/obp-api/src/main/scala/code/api/util/NewStyle.scala +++ b/obp-api/src/main/scala/code/api/util/NewStyle.scala @@ -3787,8 +3787,8 @@ object NewStyle extends MdcLoggable{ } } - def createCustomerAccountLink(customerId: String, accountId: String, relationshipType: String, callContext: Option[CallContext]): OBPReturnType[CustomerAccountLinkTrait] = - Connector.connector.vend.createCustomerAccountLink(customerId: String, accountId: String, relationshipType: String, callContext: Option[CallContext]) map { + def createCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String, callContext: Option[CallContext]): OBPReturnType[CustomerAccountLinkTrait] = + Connector.connector.vend.createCustomerAccountLink(customerId: String, bankId, accountId: String, relationshipType: String, callContext: Option[CallContext]) map { i => (unboxFullOrFail(i._1, callContext, CreateCustomerAccountLinkError), i._2) } diff --git a/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala b/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala index 5e567bf6b..63c271442 100644 --- a/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala +++ b/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala @@ -1848,7 +1848,7 @@ trait APIMethods500 { _ <- booleanToFuture(AccountAlreadyExistsForCustomer, 400, callContext) { customerAccountLinkExists.isEmpty } - (customerAccountLink, callContext) <- NewStyle.function.createCustomerAccountLink(postedData.customer_id, postedData.account_id, postedData.relationship_type, callContext) + (customerAccountLink, callContext) <- NewStyle.function.createCustomerAccountLink(postedData.customer_id, postedData.bank_id, postedData.account_id, postedData.relationship_type, callContext) } yield { (JSONFactory500.createCustomerAccountLinkJson(customerAccountLink), HttpCode.`201`(callContext)) } diff --git a/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala b/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala index 2be74bdf9..d7529e844 100644 --- a/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala +++ b/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala @@ -351,6 +351,7 @@ case class UpdatePhysicalCardJsonV500( case class CreateCustomerAccountLinkJson( customer_id: String, + bank_id: String, account_id: String, relationship_type: String ) @@ -362,6 +363,7 @@ case class UpdateCustomerAccountLinkJson( case class CustomerAccountLinkJson( customer_account_link_id: String, customer_id: String, + bank_id: String, account_id: String, relationship_type: String ) @@ -737,6 +739,7 @@ object JSONFactory500 { CustomerAccountLinkJson( customerAccountLink.customerAccountLinkId, customerAccountLink.customerId, + customerAccountLink.bankId, customerAccountLink.accountId, customerAccountLink.relationshipType ) diff --git a/obp-api/src/main/scala/code/bankconnectors/Connector.scala b/obp-api/src/main/scala/code/bankconnectors/Connector.scala index 0b301ad39..fec31615c 100644 --- a/obp-api/src/main/scala/code/bankconnectors/Connector.scala +++ b/obp-api/src/main/scala/code/bankconnectors/Connector.scala @@ -2609,7 +2609,7 @@ trait Connector extends MdcLoggable { def deleteCustomerAccountLinkById(customerAccountLinkId: String, callContext: Option[CallContext]): OBPReturnType[Box[Boolean]] = Future{(Failure(setUnimplementedError), callContext)} - def createCustomerAccountLink(customerId: String, accountId: String, relationshipType: String, callContext: Option[CallContext]): OBPReturnType[Box[CustomerAccountLinkTrait]] = Future{(Failure(setUnimplementedError), callContext)} + def createCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String, callContext: Option[CallContext]): OBPReturnType[Box[CustomerAccountLinkTrait]] = Future{(Failure(setUnimplementedError), callContext)} def updateCustomerAccountLinkById(customerAccountLinkId: String, relationshipType: String, callContext: Option[CallContext]): OBPReturnType[Box[CustomerAccountLinkTrait]] = Future{(Failure(setUnimplementedError), callContext)} diff --git a/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala b/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala index 6ee9ae6df..5a1ccceb2 100644 --- a/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala +++ b/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala @@ -5718,24 +5718,14 @@ object LocalMappedConnector extends Connector with MdcLoggable { Future{(Full("Success"), callContext)} } - override def getCustomerAccountLink(customerId: String, accountId: String, callContext: Option[CallContext]): OBPReturnType[Box[CustomerAccountLinkTrait]] = Future{ - (CustomerAccountLinkTrait.customerAccountLink.vend.getCustomerAccountLink(customerId, accountId), callContext) - } - override def getCustomerAccountLinksByCustomerId(customerId: String, callContext: Option[CallContext]) = Future{ (CustomerAccountLinkTrait.customerAccountLink.vend.getCustomerAccountLinksByCustomerId(customerId),callContext) } - - override def getCustomerAccountLinksByAccountId(accountId: String, callContext: Option[CallContext]): OBPReturnType[Box[List[CustomerAccountLinkTrait]]] = Future{ - (CustomerAccountLinkTrait.customerAccountLink.vend.getCustomerAccountLinksByAccountId(accountId),callContext) - } - override def getCustomerAccountLinkById(customerAccountLinkId: String, callContext: Option[CallContext]) = Future{ (CustomerAccountLinkTrait.customerAccountLink.vend.getCustomerAccountLinkById(customerAccountLinkId),callContext) } - override def deleteCustomerAccountLinkById(customerAccountLinkId: String, callContext: Option[CallContext]) = CustomerAccountLinkTrait.customerAccountLink.vend.deleteCustomerAccountLinkById(customerAccountLinkId).map {(_, callContext)} @@ -5743,8 +5733,8 @@ object LocalMappedConnector extends Connector with MdcLoggable { (CustomerAccountLinkTrait.customerAccountLink.vend.updateCustomerAccountLinkById(customerAccountLinkId, relationshipType),callContext) } - override def createCustomerAccountLink(customerId: String, accountId: String, relationshipType: String, callContext: Option[CallContext]): OBPReturnType[Box[CustomerAccountLinkTrait]] = Future{ - CustomerAccountLinkTrait.customerAccountLink.vend.createCustomerAccountLink(customerId: String, accountId: String, relationshipType: String) map { ( _, callContext) } + override def createCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String, callContext: Option[CallContext]): OBPReturnType[Box[CustomerAccountLinkTrait]] = Future{ + CustomerAccountLinkTrait.customerAccountLink.vend.createCustomerAccountLink(customerId: String, bankId, accountId: String, relationshipType: String) map { ( _, callContext) } } } diff --git a/obp-api/src/main/scala/code/customeraccountlinks/CustomerAccountLink.scala b/obp-api/src/main/scala/code/customeraccountlinks/CustomerAccountLink.scala index 5d162bbdf..e2ed7c422 100644 --- a/obp-api/src/main/scala/code/customeraccountlinks/CustomerAccountLink.scala +++ b/obp-api/src/main/scala/code/customeraccountlinks/CustomerAccountLink.scala @@ -21,12 +21,11 @@ object CustomerAccountLinkTrait extends SimpleInjector { } trait CustomerAccountLinkProvider { - def createCustomerAccountLink(customerId: String, accountId: String, relationshipType: String): Box[CustomerAccountLinkTrait] - def getOrCreateCustomerAccountLink(customerId: String, accountId: String, relationshipType: String): Box[CustomerAccountLinkTrait] + def createCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String): Box[CustomerAccountLinkTrait] + def getOrCreateCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String): Box[CustomerAccountLinkTrait] def getCustomerAccountLinkByCustomerId(customerId: String): Box[CustomerAccountLinkTrait] def getCustomerAccountLinksByCustomerId(customerId: String): Box[List[CustomerAccountLinkTrait]] - def getCustomerAccountLinksByAccountId(accountId: String): Box[List[CustomerAccountLinkTrait]] - def getCustomerAccountLink(customerId: String, accountId: String): Box[CustomerAccountLinkTrait] + def getCustomerAccountLinksByAccountId(bankId: String, accountId: String): Box[List[CustomerAccountLinkTrait]] def getCustomerAccountLinkById(customerAccountLinkId: String): Box[CustomerAccountLinkTrait] def updateCustomerAccountLinkById(customerAccountLinkId: String, relationshipType: String): Box[CustomerAccountLinkTrait] def getCustomerAccountLinks: Box[List[CustomerAccountLinkTrait]] @@ -35,14 +34,13 @@ trait CustomerAccountLinkProvider { } class RemotedataCustomerAccountLinkProviderCaseClass { - case class createCustomerAccountLink(customerId: String, accountId: String, relationshipType: String) - case class getOrCreateCustomerAccountLink(customerId: String, accountId: String, relationshipType: String) + case class createCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String) + case class getOrCreateCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String) case class getCustomerAccountLinkByCustomerId(customerId: String) case class getCustomerAccountLinksByCustomerId(customerId: String) - case class getCustomerAccountLinksByAccountId(accountId: String) + case class getCustomerAccountLinksByAccountId(bankId: String, accountId: String) case class getCustomerAccountLinkById(customerAccountLinkId: String) case class updateCustomerAccountLinkById(customerAccountLinkId: String, relationshipType: String) - case class getCustomerAccountLink(customerId: String, accountId: String) case class getCustomerAccountLinks() case class bulkDeleteCustomerAccountLinks() case class deleteCustomerAccountLinkById(customerAccountLinkId: String) @@ -53,6 +51,7 @@ object RemotedataCustomerAccountLinkProviderCaseClass extends RemotedataCustomer trait CustomerAccountLinkTrait { def customerAccountLinkId: String def customerId: String + def bankId: String def accountId: String def relationshipType: String } \ No newline at end of file diff --git a/obp-api/src/main/scala/code/customeraccountlinks/MappedCustomerAccountLink.scala b/obp-api/src/main/scala/code/customeraccountlinks/MappedCustomerAccountLink.scala index 181ce4efa..a72e35fb9 100644 --- a/obp-api/src/main/scala/code/customeraccountlinks/MappedCustomerAccountLink.scala +++ b/obp-api/src/main/scala/code/customeraccountlinks/MappedCustomerAccountLink.scala @@ -10,20 +10,26 @@ import com.openbankproject.commons.ExecutionContext.Implicits.global import net.liftweb.util.Helpers.tryo object MappedCustomerAccountLinkProvider extends CustomerAccountLinkProvider { - def createCustomerAccountLink(customerId: String, accountId: String, relationshipType: String): Box[CustomerAccountLinkTrait] = { + override def createCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String): Box[CustomerAccountLinkTrait] = { tryo { CustomerAccountLink.create .CustomerId(customerId) + .BankId(bankId) .AccountId(accountId) .RelationshipType(relationshipType) .saveMe() } } - def getOrCreateCustomerAccountLink(customerId: String, accountId: String, relationshipType: String): Box[CustomerAccountLinkTrait] = { - getCustomerAccountLink(accountId, customerId) match { + override def getOrCreateCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String): Box[CustomerAccountLinkTrait] = { + CustomerAccountLink.find( + By(CustomerAccountLink.CustomerId, customerId), + By(CustomerAccountLink.BankId, bankId), + By(CustomerAccountLink.AccountId, accountId) + ) match { case Empty => val createCustomerAccountLink = CustomerAccountLink.create .CustomerId(customerId) + .BankId(bankId) .AccountId(accountId) .RelationshipType(relationshipType) .saveMe() @@ -32,39 +38,34 @@ object MappedCustomerAccountLinkProvider extends CustomerAccountLinkProvider { } } - def getCustomerAccountLinkByCustomerId(customerId: String): Box[CustomerAccountLinkTrait] = { + override def getCustomerAccountLinkByCustomerId(customerId: String): Box[CustomerAccountLinkTrait] = { CustomerAccountLink.find( By(CustomerAccountLink.CustomerId, customerId)) } - - def getCustomerAccountLinksByCustomerId(customerId: String): Box[List[CustomerAccountLinkTrait]] = { + + override def getCustomerAccountLinksByCustomerId(customerId: String): Box[List[CustomerAccountLinkTrait]] = { tryo { CustomerAccountLink.findAll( By(CustomerAccountLink.CustomerId, customerId)) } } - def getCustomerAccountLinksByAccountId(accountId: String): Box[List[CustomerAccountLinkTrait]] = { + + override def getCustomerAccountLinksByAccountId(bankId: String, accountId: String): Box[List[CustomerAccountLinkTrait]] = { tryo { CustomerAccountLink.findAll( - By(CustomerAccountLink.AccountId, accountId)).sortWith(_.id.get < _.id.get) + By(CustomerAccountLink.BankId, bankId), + By(CustomerAccountLink.AccountId, accountId)) } } - def getCustomerAccountLink(customerId: String, accountId : String): Box[CustomerAccountLinkTrait] = { - CustomerAccountLink.find( - By(CustomerAccountLink.CustomerId, customerId), - By(CustomerAccountLink.AccountId, accountId) - ) - } - - def getCustomerAccountLinkById(customerAccountLinkId: String): Box[CustomerAccountLinkTrait] = { + override def getCustomerAccountLinkById(customerAccountLinkId: String): Box[CustomerAccountLinkTrait] = { CustomerAccountLink.find( By(CustomerAccountLink.CustomerAccountLinkId, customerAccountLinkId) ) } - def updateCustomerAccountLinkById(customerAccountLinkId: String, relationshipType: String): Box[CustomerAccountLinkTrait] = { + override def updateCustomerAccountLinkById(customerAccountLinkId: String, relationshipType: String): Box[CustomerAccountLinkTrait] = { CustomerAccountLink.find(By(CustomerAccountLink.CustomerAccountLinkId, customerAccountLinkId)) match { case Full(t) => Full(t.RelationshipType(relationshipType).saveMe()) case Empty => Empty ?~! ErrorMessages.CustomerAccountLinkNotFound @@ -72,15 +73,15 @@ object MappedCustomerAccountLinkProvider extends CustomerAccountLinkProvider { } } - def getCustomerAccountLinks: Box[List[CustomerAccountLinkTrait]] = { + override def getCustomerAccountLinks: Box[List[CustomerAccountLinkTrait]] = { tryo {CustomerAccountLink.findAll()} } - def bulkDeleteCustomerAccountLinks(): Boolean = { + override def bulkDeleteCustomerAccountLinks(): Boolean = { CustomerAccountLink.bulkDelete_!!() } - def deleteCustomerAccountLinkById(customerAccountLinkId: String): Future[Box[Boolean]] = { + override def deleteCustomerAccountLinkById(customerAccountLinkId: String): Future[Box[Boolean]] = { Future { CustomerAccountLink.find(By(CustomerAccountLink.CustomerAccountLinkId, customerAccountLinkId)) match { case Full(t) => Full(t.delete_!) @@ -97,11 +98,13 @@ class CustomerAccountLink extends CustomerAccountLinkTrait with LongKeyedMapper[ object CustomerAccountLinkId extends MappedUUID(this) object CustomerId extends UUIDString(this) + object BankId extends MappedString(this, 255) object AccountId extends UUIDString(this) object RelationshipType extends MappedString(this, 255) override def customerAccountLinkId: String = CustomerAccountLinkId.get override def customerId: String = CustomerId.get // id.toString + override def bankId: String = BankId.get // id.toString override def accountId: String = AccountId.get override def relationshipType: String = RelationshipType.get } diff --git a/obp-api/src/main/scala/code/remotedata/RemotedataCustomerAccountLinks.scala b/obp-api/src/main/scala/code/remotedata/RemotedataCustomerAccountLinks.scala index ecaff6f83..685f11be3 100644 --- a/obp-api/src/main/scala/code/remotedata/RemotedataCustomerAccountLinks.scala +++ b/obp-api/src/main/scala/code/remotedata/RemotedataCustomerAccountLinks.scala @@ -11,12 +11,12 @@ object RemotedataCustomerAccountLinks extends ObpActorInit with CustomerAccountL val cc = RemotedataCustomerAccountLinkProviderCaseClass - def createCustomerAccountLink(customerId: String, accountId: String, relationshipType: String) : Box[CustomerAccountLinkTrait] = getValueFromFuture( - (actor ? cc.createCustomerAccountLink(accountId, customerId, relationshipType)).mapTo[Box[CustomerAccountLinkTrait]] + def createCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String) : Box[CustomerAccountLinkTrait] = getValueFromFuture( + (actor ? cc.createCustomerAccountLink(customerId, bankId: String, accountId: String, relationshipType)).mapTo[Box[CustomerAccountLinkTrait]] ) - def getOrCreateCustomerAccountLink(customerId: String, accountId: String, relationshipType: String) : Box[CustomerAccountLinkTrait] = getValueFromFuture( - (actor ? cc.getOrCreateCustomerAccountLink(accountId, customerId, relationshipType)).mapTo[Box[CustomerAccountLinkTrait]] + def getOrCreateCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType: String) : Box[CustomerAccountLinkTrait] = getValueFromFuture( + (actor ? cc.getOrCreateCustomerAccountLink(customerId, bankId, accountId, relationshipType)).mapTo[Box[CustomerAccountLinkTrait]] ) def getCustomerAccountLinkByCustomerId(customerId: String): Box[CustomerAccountLinkTrait] = getValueFromFuture( @@ -26,8 +26,8 @@ object RemotedataCustomerAccountLinks extends ObpActorInit with CustomerAccountL (actor ? cc.getCustomerAccountLinksByCustomerId(customerId)).mapTo[Box[List[CustomerAccountLinkTrait]]] ) - def getCustomerAccountLinksByAccountId(accountId: String): Box[List[CustomerAccountLinkTrait]] = getValueFromFuture( - (actor ? cc.getCustomerAccountLinksByAccountId(accountId)).mapTo[Box[List[CustomerAccountLinkTrait]]] + def getCustomerAccountLinksByAccountId(bankId: String, accountId: String): Box[List[CustomerAccountLinkTrait]] = getValueFromFuture( + (actor ? cc.getCustomerAccountLinksByAccountId(bankId, accountId)).mapTo[Box[List[CustomerAccountLinkTrait]]] ) def getCustomerAccountLinkById(customerAccountLinkId: String): Box[CustomerAccountLinkTrait] = getValueFromFuture( @@ -38,10 +38,6 @@ object RemotedataCustomerAccountLinks extends ObpActorInit with CustomerAccountL (actor ? cc.updateCustomerAccountLinkById(customerAccountLinkId: String, relationshipType: String)).mapTo[Box[CustomerAccountLinkTrait]] ) - def getCustomerAccountLink(customerId: String, accountId: String): Box[CustomerAccountLinkTrait] = getValueFromFuture( - (actor ? cc.getCustomerAccountLink(accountId, customerId)).mapTo[Box[CustomerAccountLinkTrait]] - ) - def getCustomerAccountLinks: Box[List[CustomerAccountLinkTrait]] = getValueFromFuture( (actor ? cc.getCustomerAccountLinks()).mapTo[Box[List[CustomerAccountLinkTrait]]] ) diff --git a/obp-api/src/main/scala/code/remotedata/RemotedataCustomerAccountLinksActor.scala b/obp-api/src/main/scala/code/remotedata/RemotedataCustomerAccountLinksActor.scala index 99359567e..8231448c7 100644 --- a/obp-api/src/main/scala/code/remotedata/RemotedataCustomerAccountLinksActor.scala +++ b/obp-api/src/main/scala/code/remotedata/RemotedataCustomerAccountLinksActor.scala @@ -14,13 +14,13 @@ class RemotedataCustomerAccountLinksActor extends Actor with ObpActorHelper with def receive: PartialFunction[Any, Unit] = { - case cc.createCustomerAccountLink(customerId: String, accountId: String, relationshipType) => - logger.debug(s"createCustomerAccountLink($accountId, $relationshipType)") - sender ! (mapper.createCustomerAccountLink(accountId, customerId, relationshipType)) + case cc.createCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType) => + logger.debug(s"createCustomerAccountLink($customerId, $bankId, $accountId, $relationshipType)") + sender ! (mapper.createCustomerAccountLink(accountId, bankId: String, customerId, relationshipType)) - case cc.getOrCreateCustomerAccountLink(customerId: String, accountId: String, relationshipType) => - logger.debug(s"getOrCreateCustomerAccountLink($accountId, $relationshipType)") - sender ! (mapper.getOrCreateCustomerAccountLink(accountId, customerId, relationshipType)) + case cc.getOrCreateCustomerAccountLink(customerId: String, bankId: String, accountId: String, relationshipType) => + logger.debug(s"getOrCreateCustomerAccountLink($customerId, $bankId, $accountId, $relationshipType)") + sender ! (mapper.getOrCreateCustomerAccountLink(accountId, bankId, customerId, relationshipType)) case cc.getCustomerAccountLinkByCustomerId(customerId: String) => logger.debug(s"getCustomerAccountLinkByCustomerId($customerId)") @@ -30,9 +30,9 @@ class RemotedataCustomerAccountLinksActor extends Actor with ObpActorHelper with logger.debug(s"getCustomerAccountLinksByCustomerId($customerId)") sender ! (mapper.getCustomerAccountLinksByCustomerId(customerId)) - case cc.getCustomerAccountLinksByAccountId(accountId: String) => - logger.debug(s"getCustomerAccountLinksByAccountId($accountId)") - sender ! (mapper.getCustomerAccountLinksByAccountId(accountId)) + case cc.getCustomerAccountLinksByAccountId(bankId: String, accountId: String) => + logger.debug(s"getCustomerAccountLinksByAccountId($bankId, $accountId)") + sender ! (mapper.getCustomerAccountLinksByAccountId(bankId, accountId)) case cc.getCustomerAccountLinkById(customerAccountLinkId: String)=> logger.debug(s"getCustomerAccountLinkById($customerAccountLinkId)") @@ -42,10 +42,6 @@ class RemotedataCustomerAccountLinksActor extends Actor with ObpActorHelper with logger.debug(s"updateCustomerAccountLinkById($customerAccountLinkId, $relationshipType)") sender ! (mapper.updateCustomerAccountLinkById(customerAccountLinkId, relationshipType)) - case cc.getCustomerAccountLink(customerId: String, accountId: String) => - logger.debug(s"getCustomerAccountLink($accountId, $customerId)") - sender ! (mapper.getCustomerAccountLink(accountId, customerId)) - case cc.getCustomerAccountLinks() => logger.debug(s"getCustomerAccountLinks()") sender ! (mapper.getCustomerAccountLinks)