Debiting operation.
This commit is contained in:
parent
55147dbf29
commit
d0ec922743
@ -1,4 +1,5 @@
|
||||
using BankYouBankruptContracts.BindingModels;
|
||||
using BankYouBankruptBusinessLogic.BusinessLogics;
|
||||
using BankYouBankruptContracts.BindingModels;
|
||||
using BankYouBankruptContracts.BusinessLogicsContracts;
|
||||
using BankYouBankruptContracts.SearchModels;
|
||||
using BankYouBankruptContracts.ViewModels;
|
||||
@ -140,6 +141,11 @@ namespace BankYouBankruptRestApi.Controllers
|
||||
try
|
||||
{
|
||||
_cashLogic.Create(CashWithdrawal);
|
||||
|
||||
_accountLogic.ChangeBalance(new AccountSearchModel
|
||||
{
|
||||
Id = CashWithdrawal.AccountId
|
||||
}, CashWithdrawal.Sum * -1);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ namespace BankYouBankruptRestApi.Controllers
|
||||
try
|
||||
{
|
||||
_debitingLogic.Create(model);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания запроса на снятие наличных");
|
||||
|
Loading…
Reference in New Issue
Block a user