京东商城
This commit is contained in:
@@ -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) {
|
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 {
|
if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID {
|
||||||
for _, v := range storeSkuList {
|
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 {
|
if err != nil {
|
||||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDJDShop], "删除商品")
|
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)},
|
ShopCategorys: []int{utils.Str2Int(storeSku.VendorCatID)},
|
||||||
CategoryID: int(storeSku.VendorVendorCatID),
|
CategoryID: int(storeSku.VendorVendorCatID),
|
||||||
BrandID: jdshopapi.JxBrandId,
|
BrandID: jdshopapi.JxBrandId,
|
||||||
TransportID: jdshopapi.TransportID,
|
// TransportID: jdshopapi.TransportID,
|
||||||
WareStatus: 8, //上架待审核
|
WareStatus: 8, //上架待审核
|
||||||
OuterID: utils.Int2Str(storeSku.NameID),
|
OuterID: utils.Int2Str(storeSku.NameID),
|
||||||
VenderID: 0,
|
VenderID: 0,
|
||||||
Length: 100,
|
Length: 100,
|
||||||
Width: 100,
|
Width: 100,
|
||||||
Height: 100,
|
Height: 100,
|
||||||
Weight: 0.5,
|
Weight: 0.5,
|
||||||
JdPrice: jxutils.IntPrice2Standard(storeSku.UnitPrice),
|
JdPrice: jxutils.IntPrice2Standard(storeSku.UnitPrice),
|
||||||
MarketPrice: jxutils.IntPrice2Standard(storeSku.UnitPrice),
|
MarketPrice: jxutils.IntPrice2Standard(storeSku.UnitPrice),
|
||||||
}
|
}
|
||||||
|
|
||||||
//上传京东图片
|
//上传京东图片
|
||||||
|
|||||||
Reference in New Issue
Block a user