Browse Source

产品同步

yijia
shanji 2 years ago
parent
commit
31a564d1bd
  1. 6
      BBWYB.Server.Business/Sync/ProductSyncBusiness.cs

6
BBWYB.Server.Business/Sync/ProductSyncBusiness.cs

@ -29,8 +29,8 @@ namespace BBWYB.Server.Business.Sync
/// </summary>
public void SyncAllShopAllProduct()
{
//var shopList = venderBusiness.GetShopList(platform: Enums.Platform.拳探);
var shopList = venderBusiness.GetShopList(shopId: 9);
var shopList = venderBusiness.GetShopList(platform: Enums.Platform.);
//var shopList = venderBusiness.GetShopList(shopId: 9);
foreach (var shop in shopList)
{
Task.Factory.StartNew(() => SyncProduct(shop, true), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.SyncProductTaskScheduler);
@ -78,6 +78,8 @@ namespace BBWYB.Server.Business.Sync
while (true)
{
Console.WriteLine($"{shop.ShopName} 获取第{request.PageIndex}页产品");
var pListRes = productBusiness.GetProductList(request);
if (pListRes == null || pListRes.Items == null || pListRes.Items.Count == 0)
break;

Loading…
Cancel
Save