diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index c0344b3eb..e8b579d1c 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -2582,14 +2582,12 @@ func UpdateSkuExinfoMap(ctx *jxcontext.Context, nameIDs []int, imgWaterMark stri if len(skuList) > 0 { for _, v := range skuList { skuIDs = append(skuIDs, v.ID) + retVal = []int{v.ID} } if partner.IsMultiStore(vendorID) { for _, v := range skuIDs { OnUpdateThing(ctx, db, nil, int64(v), model.ThingTypeSku) } - 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) } } } @@ -2600,7 +2598,19 @@ func UpdateSkuExinfoMap(ctx *jxcontext.Context, nameIDs []int, imgWaterMark stri if isAsync { hint = task.GetID() } else { - _, err = task.GetResult(0) + var skuIDs []int + result, err2 := task.GetResult(0) + err = err2 + if len(result) > 0 { + for _, v := range result { + skuIDs = append(skuIDs, int(utils.Interface2Int64WithDefault(v, 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) + } + } hint = "1" } return hint, err