From f548726ae3f714a5cae31319c763935170d0d5bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 21 Dec 2022 16:54:36 +0800 Subject: [PATCH] 1 --- business/partner/purchase/tiktok_store/store_sku2.go | 3 ++- business/partner/purchase/tiktok_store/store_sku2_utils.go | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/business/partner/purchase/tiktok_store/store_sku2.go b/business/partner/purchase/tiktok_store/store_sku2.go index 465313b0d..f44adbc7d 100644 --- a/business/partner/purchase/tiktok_store/store_sku2.go +++ b/business/partner/purchase/tiktok_store/store_sku2.go @@ -181,10 +181,11 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg globals.SugarLogger.Debugf("看看走这儿了没,是不是更新 参数failedList1 %s", utils.Format4Output(failedList, false)) return failedList, err } + globals.SugarLogger.Debugf("====SkuId:= %d,ProductId := %d ", tiktokSkuId, utils.Str2Int64(v.VendorMainId)) price := &sku_editPrice_request.SkuEditPriceParam{ Price: v.VendorPrice, SkuId: tiktokSkuId, - ProductId: utils.Str2Int64(v.VendorSkuID), + ProductId: utils.Str2Int64(v.VendorMainId), } //更新子品 if err = api.EditPrice(price); err != nil { diff --git a/business/partner/purchase/tiktok_store/store_sku2_utils.go b/business/partner/purchase/tiktok_store/store_sku2_utils.go index 577f621d7..912161b4f 100644 --- a/business/partner/purchase/tiktok_store/store_sku2_utils.go +++ b/business/partner/purchase/tiktok_store/store_sku2_utils.go @@ -301,7 +301,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI updateParam.MainProductId = mainOrderDetail.MainProductId updateParam.SpecPrices = param.SpecPrices //updateParam.StoreId = utils.Str2Int64(vendorStoreID) - globals.SugarLogger.Debugf("========updateParam=============1 %s", utils.Format4Output(updateParam, false)) if err := api.EditStoreCommodity(updateParam); err != nil { failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType) storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID) @@ -386,13 +385,10 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI // 获取品牌 param.StandardBrandId = 789194134 // 默认品牌京西菜市 var mainIdInt int64 - globals.SugarLogger.Debugf("========param=============0 %s , mainId %d", utils.Format4Output(storeSku, false), mainIdInt) if storeSku.VendorMainId == "" { localThing, _ := dao.GetThingToTiktokMapList(db, model.VendorIDDD, int64(storeSku.SkuID), storeDetail.VendorOrgCode) - globals.SugarLogger.Debugf("========localThing=============1 %s", utils.Format4Output(localThing, false)) if len(localThing) == 0 || localThing == nil { mainOrderDetail, err := api.GetSkuDetailLocalID("", utils.Int2Str(storeSku.SkuID)) - globals.SugarLogger.Debugf("========mainOrderDetail=============1 %s", utils.Format4Output(mainOrderDetail, false)) if err != nil { failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType) continue @@ -415,7 +411,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI param.MainProductId = mainIdInt param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, param.MainProductId, storeSku) //param.StoreId = utils.Str2Int64(vendorStoreID) - globals.SugarLogger.Debugf("========param=============1 %s", utils.Format4Output(param, false)) if err := api.EditStoreCommodity(param); err != nil { failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType) storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)