From 237f3a85e0085bfd592efeb8a629d8d037c0a4f1 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, 26 Nov 2020 13:50:02 +0800 Subject: [PATCH] chuangjian --- business/jxstore/cms/sync_store_sku.go | 6 +++--- business/jxstore/misc/misc.go | 7 +++---- business/partner/purchase/jdshop/store_sku.go | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 066bebb38..67b743656 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -646,9 +646,9 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag updateList = updateList[:] updateList = rList2 } - if configs, err := dao.QueryConfigs(dao.GetDB(), "jdsCookie2", model.ConfigTypeCookie, ""); err == nil { - api.JdShop2API.SetCookieWithStr(configs[0].Value) - } + // if configs, err := dao.QueryConfigs(dao.GetDB(), "jdsCookie2", model.ConfigTypeCookie, ""); err == nil { + // api.JdShop2API.SetCookieWithStr(configs[0].Value) + // } } task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx, diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index eebeae29b..b430ac15b 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -340,10 +340,9 @@ func Init() { jdsCookie = configs[0].Value api.JdShopAPI.SetCookieWithStr(jdsCookie) } - // if configs, err := dao.QueryConfigs(dao.GetDB(), "jdsCookie2", model.ConfigTypeCookie, ""); err == nil { - // jdsCookie2 = configs[0].Value - // api.JdShop2API.SetCookieWithStr(jdsCookie2) - // } + if configs, err := dao.QueryConfigs(dao.GetDB(), "jdsCookie2", model.ConfigTypeCookie, ""); err == nil { + api.JdShop2API.SetCookieWithStr(configs[0].Value) + } if configs, err := dao.QueryConfigs(dao.GetDB(), "yinbaoCookie", model.ConfigTypeCookie, ""); err == nil { yinbaoCookie := configs[0].Value api.YinBaoAPI.SetCookie(".POSPALAUTH30220", yinbaoCookie) diff --git a/business/partner/purchase/jdshop/store_sku.go b/business/partner/purchase/jdshop/store_sku.go index a57d707b7..afc1c380d 100644 --- a/business/partner/purchase/jdshop/store_sku.go +++ b/business/partner/purchase/jdshop/store_sku.go @@ -163,7 +163,7 @@ func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, v } } } else { - createSkuResult, err2 := getAPI(v.VendorOrgCode).WareSave(wareSaveParam) + createSkuResult, err2 := api.JdShop2API.WareSave(wareSaveParam) err = err2 wareID = createSkuResult[0].WareID