fix after review
This commit is contained in:
parent
8d893d74ca
commit
70e73b68ae
7 changed files with 3 additions and 8 deletions
|
|
@ -140,7 +140,7 @@ public class AccountValidationConfig {
|
||||||
AccountError.WrongFieldValue),
|
AccountError.WrongFieldValue),
|
||||||
DictionaryPresentRule.instance("accountType",
|
DictionaryPresentRule.instance("accountType",
|
||||||
CorrespondentAccountUpdateRequest::getAccountType,
|
CorrespondentAccountUpdateRequest::getAccountType,
|
||||||
IMDGDistributedNames.Map_ServiceStatusDictionary,
|
IMDGDistributedNames.Map_AccountTypeDictionary,
|
||||||
ServiceStatusDictionary.class,
|
ServiceStatusDictionary.class,
|
||||||
AccountError.RequiredFieldEmpty,
|
AccountError.RequiredFieldEmpty,
|
||||||
AccountError.WrongFieldValue,
|
AccountError.WrongFieldValue,
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,6 @@ public class TradingClearingRegistryValidationConfig {
|
||||||
if (depoAccount == null) return AccountError.AccountNotFound;
|
if (depoAccount == null) return AccountError.AccountNotFound;
|
||||||
return null;
|
return null;
|
||||||
}),
|
}),
|
||||||
// todo на будущее: нужна ли эта проверка, если при добавлении регистра статус заполняется автоматически
|
|
||||||
// на основе полей moneyAccountId и depoAccountId, то же касается TradingClearingRegistryNewRequest, нужно ли там поле status
|
|
||||||
DictionaryPresentRule.instance("status",
|
DictionaryPresentRule.instance("status",
|
||||||
TradingClearingRegistryNewRequest::getStatus,
|
TradingClearingRegistryNewRequest::getStatus,
|
||||||
IMDGDistributedNames.Map_ServiceStatusDictionary,
|
IMDGDistributedNames.Map_ServiceStatusDictionary,
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,6 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
|
||||||
bankAccount.getId(),
|
bankAccount.getId(),
|
||||||
account.getId());
|
account.getId());
|
||||||
} else {
|
} else {
|
||||||
// todo выяснить, что возвращать из метода в этой ситуации
|
|
||||||
log.debug("failed block, bank account id {}, new account id {}",
|
log.debug("failed block, bank account id {}, new account id {}",
|
||||||
bankAccount.getId(),
|
bankAccount.getId(),
|
||||||
account.getId());
|
account.getId());
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,6 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
|
||||||
kafkaSender.sendRequestToQueue(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_AUTO_NEW, request);
|
kafkaSender.sendRequestToQueue(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_AUTO_NEW, request);
|
||||||
log.debug("successfully processed, new clearing account id {}, account id {}", clearingAccountId, accountId);
|
log.debug("successfully processed, new clearing account id {}, account id {}", clearingAccountId, accountId);
|
||||||
} else {
|
} else {
|
||||||
// todo выяснить, что возвращать из метода в этой ситуации
|
|
||||||
log.debug("failed insert, new clearing account id {}, new account id {} (if id = -1 then insert is failed)",
|
log.debug("failed insert, new clearing account id {}, new account id {} (if id = -1 then insert is failed)",
|
||||||
clearingAccountId,
|
clearingAccountId,
|
||||||
accountId);
|
accountId);
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,6 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
|
||||||
kafkaSender.sendRequestToQueue(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_AUTO_NEW, request);
|
kafkaSender.sendRequestToQueue(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_AUTO_NEW, request);
|
||||||
log.debug("successfully processed, new depo account id {}, account id {}", depoAccountId, accountId);
|
log.debug("successfully processed, new depo account id {}, account id {}", depoAccountId, accountId);
|
||||||
} else {
|
} else {
|
||||||
// todo выяснить, что возвращать из метода в этой ситуации
|
|
||||||
log.debug("failed insert, new depo account id {}, new account id {} (if id = -1 then insert is failed)",
|
log.debug("failed insert, new depo account id {}, new account id {} (if id = -1 then insert is failed)",
|
||||||
depoAccountId,
|
depoAccountId,
|
||||||
accountId);
|
accountId);
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,6 @@ public class InformationAccountService extends QueueConsumer implements Initiali
|
||||||
informationAccountId,
|
informationAccountId,
|
||||||
accountId);
|
accountId);
|
||||||
} else {
|
} else {
|
||||||
// todo выяснить, что возвращать из метода в этой ситуации
|
|
||||||
log.debug("failed insert, new information account id {}, new account id {} (if id = -1 then insert is failed)",
|
log.debug("failed insert, new information account id {}, new account id {} (if id = -1 then insert is failed)",
|
||||||
informationAccountId,
|
informationAccountId,
|
||||||
accountId);
|
accountId);
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
||||||
Account accountMain = accountImdg.getSingleObjectByID(accountId);
|
Account accountMain = accountImdg.getSingleObjectByID(accountId);
|
||||||
|
|
||||||
|
|
||||||
// TODO: WELCOME TO HELL
|
// TODO
|
||||||
// Проверка выглядит очень сложно и запутанно, потому что репортеры сами не до конца понимают, какая она должна быть.
|
// Проверка выглядит очень сложно и запутанно, потому что репортеры сами не до конца понимают, какая она должна быть.
|
||||||
// Пока что она соответствует ТЗ, но возможно будет правиться, поэтому расписана без выноса кода в методы и
|
// Пока что она соответствует ТЗ, но возможно будет правиться, поэтому расписана без выноса кода в методы и
|
||||||
// прочих методов сокращения кода. В дальнейшем, после тестирования и окончательного выяснения вида проверки,
|
// прочих методов сокращения кода. В дальнейшем, после тестирования и окончательного выяснения вида проверки,
|
||||||
|
|
@ -154,6 +154,7 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
||||||
req.getCompanyId(),
|
req.getCompanyId(),
|
||||||
registry.getId())
|
registry.getId())
|
||||||
);
|
);
|
||||||
|
log.error("process failed: {}", errMsg);
|
||||||
return new RequestInfoUpdate()
|
return new RequestInfoUpdate()
|
||||||
.setMessage(errMsg)
|
.setMessage(errMsg)
|
||||||
.setStatus(Status.Error)
|
.setStatus(Status.Error)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue