From 48fefb910dda691b198a6b592c272f28d5377ea9 Mon Sep 17 00:00:00 2001 From: mahao Date: Fri, 15 Sep 2023 12:15:24 +0800 Subject: [PATCH] up --- .../Entities/Prices/PriceListAppService.cs | 2 +- .../Entities/Prices/PriceListAppServiceBJ.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs index 37101f16..5930002b 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs @@ -268,7 +268,7 @@ public class PriceListAppService : SettleAccountApplicationBase throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPrice.BeginTime:yyyy-MM-dd}至{existPrice.EndTime:yyyy-MM-dd}】存在交集", "400"); } } - _settleAccountDbContext.Set().Update(entity); + await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false); var dto = ObjectMapper.Map(entity); return dto; } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs index 3e378daf..d274e04e 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs @@ -226,7 +226,7 @@ public class PriceListAppServiceBJ : SettleAccountApplicationBase throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPriceBj.BeginDate:yyyy-MM-dd}至{existPriceBj.EndDate:yyyy-MM-dd}】存在交集", "400"); } } - _settleAccountDbContext.Set().Update(entity); + await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false); var dto = ObjectMapper.Map(entity); return dto; }