Created
March 12, 2017 13:21
-
-
Save hongwei1/6d72900f6490e49f7fadabccca992a46 to your computer and use it in GitHub Desktop.
do not know what is it doing ??
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def updateUserAccountViews( user: ResourceUser ) = { | |
val accounts = getBanks.flatMap { bank => { | |
val bankId = bank.bankId.value | |
logger.debug(s"ObpJvm updateUserAccountViews for user.email ${user.email} user.name ${user.name} at bank ${bankId}") | |
val parameters = new JHashMap | |
parameters.put("userId", user.name) | |
parameters.put("bankId", bankId) | |
val response = jvmNorth.get("getAccounts", Transport.Target.accounts, parameters) | |
// todo response.error().isPresent | |
response.data().map(d => new AccountReader(d)).map(a => ObpJvmInboundAccount( | |
a.accountId, | |
a.bankId, | |
a.label, | |
a.number, | |
a.`type`, | |
ObpJvmInboundBalance(a.balanceCurrency, a.balanceAmount), | |
a.iban, | |
user.name :: Nil, | |
generate_public_view = true, | |
generate_accountants_view = true, | |
generate_auditors_view = true | |
)).toList | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment