Browse Source

Remove `Quantity`

pull/184/head
Jadyn 4 years ago
parent
commit
5c030de5c7
  1. 2
      plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Orders/CreateFlashSaleOrderEventHandler.cs
  2. 1
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanAppService.cs
  3. 2
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/CreateFlashSaleOrderEto.cs
  4. 2
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleReduceInventoryEto.cs
  5. 3
      plugins/FlashSales/src/EasyAbp.EShop.Products.Plugins.FlashSales.Application/EasyAbp/EShop/Products/Products/FlashSaleReduceInventoryEventHandler.cs

2
plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Orders/CreateFlashSaleOrderEventHandler.cs

@ -52,7 +52,7 @@ public class CreateFlashSaleOrderEventHandler : IDistributedEventHandler<CreateF
{
ProductId = eventData.Plan.ProductId,
ProductSkuId = eventData.Plan.ProductSkuId,
Quantity = eventData.Quantity
Quantity = 1
}
}
};

1
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanAppService.cs

@ -252,7 +252,6 @@ public class FlashSalePlanAppService :
StoreId = plan.StoreId,
CreateTime = now,
CustomerRemark = input.CustomerRemark,
Quantity = 1,//should configure
Plan = planEto,
HashToken = hashToken
};

2
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/CreateFlashSaleOrderEto.cs

@ -21,8 +21,6 @@ public class CreateFlashSaleOrderEto : ExtensibleObject, IMultiTenant
public string CustomerRemark { get; set; }
public int Quantity { get; set; }
public FlashSaleProductEto Product { get; set; }
public FlashSaleProductDetailEto ProductDetail { get; set; }

2
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleReduceInventoryEto.cs

@ -21,8 +21,6 @@ public class FlashSaleReduceInventoryEto : ExtensibleObject, IMultiTenant
public string CustomerRemark { get; set; }
public int Quantity { get; set; }
public FlashSalePlanEto Plan { get; set; }
public string HashToken { get; set; }

3
plugins/FlashSales/src/EasyAbp.EShop.Products.Plugins.FlashSales.Application/EasyAbp/EShop/Products/Products/FlashSaleReduceInventoryEventHandler.cs

@ -65,7 +65,7 @@ public class FlashSaleReduceInventoryEventHandler : IDistributedEventHandler<Fla
return;
}
if (!await ProductManager.TryReduceInventoryAsync(product, productSku, eventData.Quantity, true))
if (!await ProductManager.TryReduceInventoryAsync(product, productSku, 1, true))
{
await DistributedEventBus.PublishAsync(new CreateFlashSaleOrderCompleteEto()
{
@ -98,7 +98,6 @@ public class FlashSaleReduceInventoryEventHandler : IDistributedEventHandler<Fla
StoreId = eventData.StoreId,
CreateTime = eventData.CreateTime,
CustomerRemark = eventData.CustomerRemark,
Quantity = eventData.Quantity,
Product = productEto,
ProductDetail = productDetailEto,
Plan = eventData.Plan

Loading…
Cancel
Save