feat: Implement bulk update for product prices and stock, and add low stock products query and toggle product status functionality
This commit is contained in:
@@ -56,13 +56,18 @@ public class GetLowStockProductsQueryHandler : IRequestHandler<GetLowStockProduc
|
||||
"Found {Count} low stock products (threshold: {Threshold}, page: {Page})",
|
||||
totalCount, request.Threshold, request.PageIndex);
|
||||
|
||||
var totalPages = (int)Math.Ceiling(totalCount / (double)request.PageSize);
|
||||
|
||||
return new GetLowStockProductsResponseDto
|
||||
{
|
||||
MetaData = new MetaData
|
||||
{
|
||||
CurrentPage = request.PageIndex,
|
||||
TotalPage = totalPages,
|
||||
PageSize = request.PageSize,
|
||||
TotalCount = totalCount
|
||||
TotalCount = totalCount,
|
||||
HasNext = request.PageIndex < totalPages,
|
||||
HasPrevious = request.PageIndex > 1
|
||||
},
|
||||
Products = products
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user