Browse Source

所有采购商聚合

liangku_skuoptimazation
shanji 1 year ago
parent
commit
88be143fba
  1. 9
      BBWYB.Server.API/Controllers/AggregationPurchaserController.cs
  2. 5
      BBWYB.Server.Business/Aggregion/AggregionPurchaserBusiness.cs

9
BBWYB.Server.API/Controllers/AggregationPurchaserController.cs

@ -31,5 +31,14 @@ namespace BBWYB.Server.API.Controllers
{
aggregionPurchaserBusiness.AggregionByPurchaserIdList(purchaserIdList);
}
/// <summary>
/// 聚合所有采购商
/// </summary>
[HttpPost]
public void AggregionAllPurchaser()
{
aggregionPurchaserBusiness.AggregionAllPurchaser();
}
}
}

5
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<Purchaser>().ToList(p => p.Id);
Task.Factory.StartNew(() => AggregionByGroup(purchaserIdList), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.AggregationPurchaserTaskScheduler);
}
private void AggregionByGroup(IList<string> purchaserIdList)
{

Loading…
Cancel
Save