From d29b281c8ecf0a3c3e7f433286acdcdc0a5c09f3 Mon Sep 17 00:00:00 2001 From: Jadyn Date: Mon, 11 Jul 2022 19:12:47 +0800 Subject: [PATCH] Add `[UnitOfWork]` to HandleEventAsync --- ...RollBackInventoryCreateFlashSaleOrderCompleteEventHandler.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/RollBackInventoryCreateFlashSaleOrderCompleteEventHandler.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/RollBackInventoryCreateFlashSaleOrderCompleteEventHandler.cs index 766f5a11..295b3baf 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/RollBackInventoryCreateFlashSaleOrderCompleteEventHandler.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/RollBackInventoryCreateFlashSaleOrderCompleteEventHandler.cs @@ -7,6 +7,7 @@ using Microsoft.Extensions.Caching.Distributed; using Microsoft.Extensions.Logging; using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus.Distributed; +using Volo.Abp.Uow; namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; @@ -30,6 +31,7 @@ public class RollBackInventoryCreateFlashSaleOrderCompleteEventHandler : IDistri ProductAppService = productAppService; } + [UnitOfWork(true)] public virtual async Task HandleEventAsync(CreateFlashSaleOrderCompleteEto eventData) { if (eventData.Success)