This commit is contained in:
parent
acedbcda92
commit
0a4d7996e3
1 changed files with 0 additions and 6 deletions
|
|
@ -34,9 +34,6 @@ public enum GatewayEksClientCodeValidationRule implements IValidationRule<ImdgVa
|
||||||
public Optional<EnumMessage> validate(ImdgValidationContext<TkrAccount> context) {
|
public Optional<EnumMessage> validate(ImdgValidationContext<TkrAccount> context) {
|
||||||
TkrAccount validatedObject = context.getValidatedObject();
|
TkrAccount validatedObject = context.getValidatedObject();
|
||||||
|
|
||||||
Collection<MoneyAccountMsgRequest> msgs = validatedObject.getMoneyAccounts().stream()
|
|
||||||
.filter(acc -> !StringUtils.hasText(acc.getAccount()) && StringUtils.hasText(acc.getEks_account()))
|
|
||||||
.toList();
|
|
||||||
for (MoneyAccountMsgRequest msg : validatedObject.getMoneyAccounts()) {
|
for (MoneyAccountMsgRequest msg : validatedObject.getMoneyAccounts()) {
|
||||||
if (!StringUtils.hasText(msg.getAccount()) && !StringUtils.hasText(msg.getEks_account())) {
|
if (!StringUtils.hasText(msg.getAccount()) && !StringUtils.hasText(msg.getEks_account())) {
|
||||||
return of(AccountError.RequiredFieldEmpty, "account+eks_account");
|
return of(AccountError.RequiredFieldEmpty, "account+eks_account");
|
||||||
|
|
@ -45,9 +42,6 @@ public enum GatewayEksClientCodeValidationRule implements IValidationRule<ImdgVa
|
||||||
return of(AccountError.WrongFieldValue, "status");
|
return of(AccountError.WrongFieldValue, "status");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!msgs.isEmpty()) {
|
|
||||||
return of(AccountError.RequiredFieldEmpty, "account+eks_account");
|
|
||||||
}
|
|
||||||
return empty();
|
return empty();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue