From 23833a6004a46f853a788292a5c468425f5f64f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 17 Jul 2020 09:47:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E5=93=81=E5=89=8D?= =?UTF-8?q?=E7=BC=80=E8=AE=A9=E4=BB=96=E4=BB=AC=E8=87=AA=E5=B7=B1=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E6=8A=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sku.go | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index 8b6c27df6..516dcb737 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -2556,7 +2556,7 @@ func UpdateSkuExinfoMap(ctx *jxcontext.Context, nameIDs []int, imgWaterMark stri fromTimeP time.Time toTimeP time.Time db = dao.GetDB() - skuIDs []int + // skuIDs []int ) if fromTime != "" { fromTimeP = utils.Time2Date(utils.Str2Time(fromTime)) @@ -2605,6 +2605,8 @@ func UpdateSkuExinfoMap(ctx *jxcontext.Context, nameIDs []int, imgWaterMark stri for _, v := range skuIDs { OnUpdateThing(ctx, db, nil, int64(v), model.ThingTypeSku) } + } else { + SetStoreSkuSyncStatus2(db, nil, []int{vendorID}, skuIDs, model.SyncFlagModifiedMask) } } } @@ -2613,21 +2615,21 @@ func UpdateSkuExinfoMap(ctx *jxcontext.Context, nameIDs []int, imgWaterMark stri } taskParallel := tasksch.NewParallelTask("UpdateSkuExinfoMap", tasksch.NewParallelConfig().SetParallelCount(parallelCount), ctx, taskFunc, nameIDs) tasksch.HandleTask(taskParallel, nil, true).Run() - result, err2 := task.GetResult(0) - err = err2 - if len(result) > 0 { - for _, v := range result { - skuIDs = append(skuIDs, int(utils.Interface2Int64WithDefault(v, 0))) - } - } + _, err = task.GetResult(0) + // err = err2 + // if len(result) > 0 { + // for _, v := range result { + // skuIDs = append(skuIDs, int(utils.Interface2Int64WithDefault(v, 0))) + // } + // } case 1: - if len(skuIDs) > 0 { - if partner.IsMultiStore(vendorID) { - CurVendorSync.SyncSkus(ctx, db, nil, skuIDs, isAsync, isContinueWhenError, ctx.GetUserName()) - } else { - CurVendorSync.SyncStoresSkus2(ctx, nil, 0, db, []int{vendorID}, nil, false, skuIDs, nil, model.SyncFlagModifiedMask, isAsync, isContinueWhenError) - } - } + // if len(skuIDs) > 0 { + // if partner.IsMultiStore(vendorID) { + // CurVendorSync.SyncSkus(ctx, db, nil, skuIDs, isAsync, isContinueWhenError, ctx.GetUserName()) + // } else { + // CurVendorSync.SyncStoresSkus2(ctx, nil, 0, db, []int{vendorID}, nil, false, skuIDs, nil, model.SyncFlagModifiedMask, isAsync, isContinueWhenError) + // } + // } } return result, err }