From 88be143fbae7e4470482275b91e51a3a17bc3398 Mon Sep 17 00:00:00 2001 From: shanji <18996038927@163.com> Date: Sat, 27 Jan 2024 14:52:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=80=E6=9C=89=E9=87=87=E8=B4=AD=E5=95=86?= =?UTF-8?q?=E8=81=9A=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/AggregationPurchaserController.cs | 9 +++++++++ .../Aggregion/AggregionPurchaserBusiness.cs | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/BBWYB.Server.API/Controllers/AggregationPurchaserController.cs b/BBWYB.Server.API/Controllers/AggregationPurchaserController.cs index 9eb8adf..d8fe1ad 100644 --- a/BBWYB.Server.API/Controllers/AggregationPurchaserController.cs +++ b/BBWYB.Server.API/Controllers/AggregationPurchaserController.cs @@ -31,5 +31,14 @@ namespace BBWYB.Server.API.Controllers { aggregionPurchaserBusiness.AggregionByPurchaserIdList(purchaserIdList); } + + /// + /// 聚合所有采购商 + /// + [HttpPost] + public void AggregionAllPurchaser() + { + aggregionPurchaserBusiness.AggregionAllPurchaser(); + } } } diff --git a/BBWYB.Server.Business/Aggregion/AggregionPurchaserBusiness.cs b/BBWYB.Server.Business/Aggregion/AggregionPurchaserBusiness.cs index 58f12c0..718b9ec 100644 --- a/BBWYB.Server.Business/Aggregion/AggregionPurchaserBusiness.cs +++ b/BBWYB.Server.Business/Aggregion/AggregionPurchaserBusiness.cs @@ -35,6 +35,11 @@ namespace BBWYB.Server.Business Task.Factory.StartNew(() => AggregionByGroup(purchaserIdList), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.AggregationPurchaserTaskScheduler); } + public void AggregionAllPurchaser() + { + var purchaserIdList = fsql.Select().ToList(p => p.Id); + Task.Factory.StartNew(() => AggregionByGroup(purchaserIdList), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.AggregationPurchaserTaskScheduler); + } private void AggregionByGroup(IList purchaserIdList) {