mahao 1 year ago
parent
commit
48fefb910d
  1. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -268,7 +268,7 @@ public class PriceListAppService : SettleAccountApplicationBase<PriceList>
throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPrice.BeginTime:yyyy-MM-dd}至{existPrice.EndTime:yyyy-MM-dd}】存在交集", "400"); throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPrice.BeginTime:yyyy-MM-dd}至{existPrice.EndTime:yyyy-MM-dd}】存在交集", "400");
} }
} }
_settleAccountDbContext.Set<PriceList>().Update(entity); await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false);
var dto = ObjectMapper.Map<PriceList, PriceListDto>(entity); var dto = ObjectMapper.Map<PriceList, PriceListDto>(entity);
return dto; return dto;
} }

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs

@ -226,7 +226,7 @@ public class PriceListAppServiceBJ : SettleAccountApplicationBase<PriceListBJ>
throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPriceBj.BeginDate:yyyy-MM-dd}至{existPriceBj.EndDate:yyyy-MM-dd}】存在交集", "400"); throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPriceBj.BeginDate:yyyy-MM-dd}至{existPriceBj.EndDate:yyyy-MM-dd}】存在交集", "400");
} }
} }
_settleAccountDbContext.Set<PriceListBJ>().Update(entity); await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false);
var dto = ObjectMapper.Map<PriceListBJ, PriceListBJDto>(entity); var dto = ObjectMapper.Map<PriceListBJ, PriceListBJDto>(entity);
return dto; return dto;
} }

Loading…
Cancel
Save