From bb157cd60f87432c390eaca2dd936a7c8a798435 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, 29 May 2020 10:24:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=AE=A1=E6=A0=B8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 7321e0f6a..b26de0ddf 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -4537,7 +4537,21 @@ func StoreSkuPriceAudit(ctx *jxcontext.Context, storeIDs, nameIDs []int, status UnitPrice: storeAudits[0].UnitPrice, }, } - _, err = UpdateStoresSkus(ctx, 0, []int{storeID}, skuBindInfos, false, isAsync, isContinueWhenError) + var num int64 + db := dao.GetDB() + skuIDs, err := updateStoresSkusWithoutSync(ctx, db, storeIDs, skuBindInfos, false) + if err != nil { + return "", err + } + isAsync = asyncStoreSkuOpFilter(ctx, isAsync) + num = int64(len(skuIDs)) + if num > 0 { + hint, err = CurVendorSync.SyncStoresSkus(ctx, nil, 0, db, nil, storeIDs, skuIDs, false, isAsync, isContinueWhenError) + } + if num == 0 || !isAsync || hint == "" { + hint = utils.Int64ToStr(num) + } + // _, err = UpdateStoresSkus(ctx, 0, []int{storeID}, skuBindInfos, false, isAsync, isContinueWhenError) } else if status == model.StoreAuditStatusRejected { storeAudits[0].UserID = ctx.GetUserID() storeAudits[0].Status = model.StoreAuditStatusRejected