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.AccountNotFound,
account -> {
String statusFromRequest = correspondentAccountUpdateRequest.getStatus();
if (statusFromRequest != null && !statusFromRequest.equalsIgnoreCase(account.getStatus()))
// проверка на заблокированность счёта
if (!AccountStatus.ACTIVE.getKey().equalsIgnoreCase(account.getStatus()))
return AccountError.WrongFieldValue;
return null;
}),