This commit is contained in:
parent
e52b42973d
commit
70aa7b9748
2 changed files with 5 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ public enum GatewayClientCodeValidationRule implements IValidationRule<ImdgValid
|
|||
|
||||
Imdg<Company> companyImdg = context.obtainMap(IMDGDistributedNames.Map_Company, Company.class);
|
||||
Company company = companyImdg.getFirstObjectByFieldValues(
|
||||
Map.of("trading_code", String.valueOf(tradingCode))
|
||||
Map.of("tradingCode", String.valueOf(tradingCode))
|
||||
);
|
||||
if (company == null) {
|
||||
return of(AccountError.COMPANY_NOT_FOUND_GTW, "trading_code");
|
||||
|
|
@ -62,6 +62,9 @@ public enum GatewayClientCodeValidationRule implements IValidationRule<ImdgValid
|
|||
for (MoneyAccountMsgRequest moneyAccountMsg : accountList) {
|
||||
ImdgPredicateBuilder predicateBuilder = imdg.predicateBuilder();
|
||||
ImdgPredicate currencyPredicate;
|
||||
if (!StringUtils.hasText(moneyAccountMsg.getAccount())){
|
||||
return of(AccountError.RequiredFieldEmpty, "account");
|
||||
}
|
||||
ImdgPredicate accountPredicate = predicateBuilder.equals("account", moneyAccountMsg.getAccount());
|
||||
if (moneyAccountMsg.getCurrCode().equals(CurrencyCode.RUB.getKey())) {
|
||||
currencyPredicate = predicateBuilder.or(
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public class TkrService {
|
|||
}
|
||||
|
||||
public void processedTkrRequest(TkrRequest tkrRequest) {
|
||||
if (!tkrRequest.getErrors().isEmpty()) {
|
||||
if (tkrRequest.getErrors() != null && !tkrRequest.getErrors().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
List<TkrAccount> tkrAccountsForCheck = tkrRequest.getInfoAccount()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue