From 5b95a414acaa450772716a4743866ad83d19ee87 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, 14 May 2020 17:00:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E5=95=86=E5=9F=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/jdshop/store_sku.go | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/business/partner/purchase/jdshop/store_sku.go b/business/partner/purchase/jdshop/store_sku.go index ec3eb8eac..f0a2e55f2 100644 --- a/business/partner/purchase/jdshop/store_sku.go +++ b/business/partner/purchase/jdshop/store_sku.go @@ -82,7 +82,10 @@ func (p *PurchaseHandler) UpdateStoreSkus(ctx *jxcontext.Context, storeID int, v func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) { if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID { for _, v := range storeSkuList { - err = api.JdShopAPI.DeleteWare(utils.Str2Int(v.VendorSkuID2)) + err = api.JdShopAPI.UpOrDown(utils.Str2Int64(v.VendorSkuID2), 2) + if err == nil { + err = api.JdShopAPI.DeleteWare(utils.Str2Int(v.VendorSkuID2)) + } } if err != nil { failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDJDShop], "删除商品") @@ -308,16 +311,16 @@ func buildCreateWareParam(storeSku *dao.StoreSkuSyncInfo) (createSkuParamWare *j ShopCategorys: []int{utils.Str2Int(storeSku.VendorCatID)}, CategoryID: int(storeSku.VendorVendorCatID), BrandID: jdshopapi.JxBrandId, - TransportID: jdshopapi.TransportID, - WareStatus: 8, //上架待审核 - OuterID: utils.Int2Str(storeSku.NameID), - VenderID: 0, - Length: 100, - Width: 100, - Height: 100, - Weight: 0.5, - JdPrice: jxutils.IntPrice2Standard(storeSku.UnitPrice), - MarketPrice: jxutils.IntPrice2Standard(storeSku.UnitPrice), + // TransportID: jdshopapi.TransportID, + WareStatus: 8, //上架待审核 + OuterID: utils.Int2Str(storeSku.NameID), + VenderID: 0, + Length: 100, + Width: 100, + Height: 100, + Weight: 0.5, + JdPrice: jxutils.IntPrice2Standard(storeSku.UnitPrice), + MarketPrice: jxutils.IntPrice2Standard(storeSku.UnitPrice), } //上传京东图片