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), } //上传京东图片