account-service AccountValidationConfig поправил, см. ТЗ X - Блокировка корреспондентского счета

This commit is contained in:
AKurakin 2023-05-24 13:49:01 +03:00
parent 699587c8d4
commit 412d15ec3a

View file

@ -116,8 +116,8 @@ public class AccountValidationConfig {
AccountError.RequiredFieldEmpty, AccountError.RequiredFieldEmpty,
AccountError.AccountNotFound, AccountError.AccountNotFound,
account -> { account -> {
String statusFromRequest = correspondentAccountUpdateRequest.getStatus(); // проверка на заблокированность счёта
if (statusFromRequest != null && !statusFromRequest.equalsIgnoreCase(account.getStatus())) if (!AccountStatus.ACTIVE.getKey().equalsIgnoreCase(account.getStatus()))
return AccountError.WrongFieldValue; return AccountError.WrongFieldValue;
return null; return null;
}), }),