更新商品水印和前缀修改

This commit is contained in:
苏尹岚
2020-07-10 14:11:41 +08:00
parent 44b431b120
commit f530c3ceb4

View File

@@ -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