Add exchange rate#114
Merged
Merged
Conversation
ggmaleva
reviewed
Jul 9, 2026
| .map(paymentExchangeContext -> getDslContext().newRecord( | ||
| PAYMENT_EXCHANGE_CONTEXT, paymentExchangeContext)) | ||
| .map(this::prepareInsertQuery) | ||
| .collect(Collectors.toList()); |
Contributor
There was a problem hiding this comment.
тут можно сразу toList() использовать
| List<PaymentWrapper> processableWrappers = wrappers.stream() | ||
| .filter(paymentWrapper -> Objects.nonNull(paymentWrapper.getPaymentExchangeContext())) | ||
| .collect(Collectors.toList()); | ||
| List<PaymentExchangeContext> paymentExchangeContexts = processableWrappers.stream() |
Contributor
There was a problem hiding this comment.
кажется, что можно без промежуточной переменной, в одном stream все это сделать, просто продолжить stream выше
.map(PaymentWrapper::getPaymentExchangeContext)
.toList()
Contributor
Author
There was a problem hiding this comment.
кажется, что можно без промежуточной переменной, в одном stream все это сделать, просто продолжить stream выше
.map(PaymentWrapper::getPaymentExchangeContext) .toList()
тоже так думал но когда поправил увидел что ниже они обе используются
| InvoiceChange change = InvoiceChange.invoice_payment_change(new InvoicePaymentChange() | ||
| .setId("payment_id") | ||
| .setPayload(InvoicePaymentChangePayload.invoice_payment_exchange_context_changed( | ||
| new InvoicePaymentExchangeContextChanged(new ExchangeContext( |
Contributor
There was a problem hiding this comment.
В двух тестах используешь создание этого объекта, можно вынести в какой-нибудь TestData. Да и в целом построение всех этих объектов можно унести в TestData. Тест читаться легче станет.
| paymentId)); | ||
| } | ||
|
|
||
| private PaymentWrapper buildPaymentExchangeContextWrapper(String invoiceId, |
Contributor
There was a problem hiding this comment.
и это можно в TestData унести
ggmaleva
approved these changes
Jul 9, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.