From ca7d039a47e0ebd4199f49f6ae7affe878f162fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 27 Dec 2022 09:34:45 +0800 Subject: [PATCH] 1 --- business/jxstore/misc/misc.go | 10 +++++----- .../partner/purchase/tiktok_store/store_sku2_utils.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 10f85c8b4..5e8bc4ab3 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -252,11 +252,11 @@ func Init() { }, 60*time.Second, 30*time.Minute) // 抖音更新门店商品 - //if beego.BConfig.RunMode != "jxgy" { - // ScheduleTimerFuncByInterval(func() { - // syncStoreSkuTiktok() - // }, 60*time.Second, 2*time.Minute) - //} + if beego.BConfig.RunMode != "jxgy" { + ScheduleTimerFuncByInterval(func() { + syncStoreSkuTiktok() + }, 60*time.Second, 10*time.Minute) + } // 定时任务刷新当前订单的物流信息 ScheduleTimerFunc("RefreshMaterialLogistics", func() { diff --git a/business/partner/purchase/tiktok_store/store_sku2_utils.go b/business/partner/purchase/tiktok_store/store_sku2_utils.go index 925a57512..1c26a24bb 100644 --- a/business/partner/purchase/tiktok_store/store_sku2_utils.go +++ b/business/partner/purchase/tiktok_store/store_sku2_utils.go @@ -246,11 +246,11 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI continue } - if err := dao.CreateThingMap(int64(storeSku.SkuID), utils.Int64ToStr(mainOrderDetail.MainProductId), storeDetail.VendorOrgCode, "线上存在本地不存在", model.ThingTypeSku, 0); err != nil { + if err := dao.CreateThingMap(int64(storeSku.SkuID), mainOrderDetail.ProductIdStr, storeDetail.VendorOrgCode, "线上存在本地不存在", model.ThingTypeSku, 0); err != nil { failedList = putils.GetErrMsg2FailedSingleList(storeSku, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType) } - childrenProductId, err = api.CreateSubProduct(mainOrderDetail.MainProductId, utils.Str2Int64(vendorStoreID)) + childrenProductId, err = api.CreateSubProduct(mainOrderDetail.ProductId, utils.Str2Int64(vendorStoreID)) if err != nil { failedList = putils.GetErrMsg2FailedSingleList(storeSku, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType) continue @@ -300,8 +300,8 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI updateParam.Description = detailImg updateParam.WeightUnit = tiktokShop.WeightUint_G updateParam.StandardBrandId = param.StandardBrandId // 默认品牌京西菜市 - updateParam.ProductId = mainOrderDetail.MainProductId - updateParam.MainProductId = mainOrderDetail.MainProductId + updateParam.ProductId = mainOrderDetail.ProductId + updateParam.MainProductId = mainOrderDetail.ProductId updateParam.SpecPrices = param.SpecPrices //updateParam.StoreId = utils.Str2Int64(vendorStoreID) if err := api.EditStoreCommodity(updateParam); err != nil { @@ -396,7 +396,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType) continue } - mainIdInt = mainOrderDetail.MainProductId + mainIdInt = mainOrderDetail.ProductId storeSku.VendorMainId = utils.Int64ToStr(mainIdInt) if err := dao.CreateThingMap(int64(storeSku.SkuID), utils.Int64ToStr(mainIdInt), storeDetail.VendorOrgCode, "更新发现不存在", model.ThingTypeSku, 0); err != nil { failedList = putils.GetErrMsg2FailedSingleList(storeSku, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)