From 4bfb8b040a7281f2239051234fdafa49da6e186f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 9 Jul 2020 09:50:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95updatestoresskus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 9299ca29b..eb84f6354 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -897,13 +897,11 @@ func UpdateStoresSkus(ctx *jxcontext.Context, causeFlag int, storeIDs []int, sku if err != nil { return "", err } - fmt.Println("test12") isAsync = asyncStoreSkuOpFilter(ctx, isAsync) num = int64(len(skuIDs)) if num > 0 { hint, err = CurVendorSync.SyncStoresSkus(ctx, nil, causeFlag, db, nil, storeIDs, skuIDs, false, isAsync, isContinueWhenError) } - fmt.Println("test22") if num == 0 || !isAsync || hint == "" { hint = utils.Int64ToStr(num) } @@ -1139,6 +1137,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs unitPrice = int(float64(unitPrice) * scaleFactor) for _, v := range allBinds { var num int64 + fmt.Println("test1111111111111111111111111111111111") inSkuBind := inSkuBinsMap[v.RealSkuID] isCanChangePrice := (isUserCanDirectChangePrice || jxutils.TranslateStorePriceType(v.ChangePriceType) != model.StoreChangePriceTypeBossDisabled) // globals.SugarLogger.Debug(utils.Format4Output(inSkuBind, false)) @@ -1239,6 +1238,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs skuBind.Status = tmpStatus setStoreSkuBindStatus(skuBind, model.SyncFlagSaleMask) } + fmt.Println("test2222222222222222222222222222222222222") if skuBindInfo.UnitPrice != 0 && isCanChangePrice { // 这里是否需要加此条件限制 price := jxutils.CaculateSkuPrice(unitPrice, v.SpecQuality, v.SpecUnit, v.SkuNameUnit) jxPrice := jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), price) @@ -1282,6 +1282,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs err = AddEventDetail(db, ctx, model.OperateUpdate, v.RealSkuID, model.ThingTypeSku, storeID, BuildDiffData(mapBefore), BuildDiffData(mapAfter)) } } + fmt.Println("test33333333333333333333333333333333") if len(updateFieldMap) > 0 { updateFieldMap[model.FieldJdSyncStatus] = 1 updateFieldMap[model.FieldEbaiSyncStatus] = 1