Продолжение
This commit is contained in:
parent
acdae9d645
commit
8bb9a0fb5b
@ -21,6 +21,7 @@ namespace AbstractLawFirmBusinessLogic.BusinessLogic
|
||||
private readonly IShopStorage _shopStorage;
|
||||
private readonly IShopLogic _shopLogic;
|
||||
private readonly IDocumentStorage _documentStorage;
|
||||
|
||||
public OrderLogic(ILogger<OrderLogic> logger, IOrderStorage orderStorage, IShopLogic shopLogic, IDocumentStorage documentStorage, IShopStorage shopStorage)
|
||||
{
|
||||
_logger = logger;
|
||||
@ -87,6 +88,7 @@ namespace AbstractLawFirmBusinessLogic.BusinessLogic
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
model.Status = status;
|
||||
if (model.Status == OrderStatus.Выдан) model.DateImplement = DateTime.Now;
|
||||
_orderStorage.Update(model);
|
||||
@ -138,6 +140,7 @@ true)
|
||||
throw new ArgumentNullException("Количество элементов в заказе должно быть больше 0", nameof(model.Count));
|
||||
}
|
||||
_logger.LogInformation("Order. Sum:{ Cost}. Id: { Id}", model.Sum, model.Id);
|
||||
}
|
||||
public bool CheckThenSupplyMany(IDocumentModel document, int count)
|
||||
{
|
||||
if (count <= 0)
|
||||
@ -199,6 +202,6 @@ true)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user