修复删除饿百活动商品失败的bug

在删除门店商品失败时,尝试设置不可售
This commit is contained in:
gazebo
2019-11-08 15:24:51 +08:00
parent c5a01f1e9b
commit 7d230ecf1e
3 changed files with 9 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ func (p *PurchaseHandler) GetStoreSkusBatchSize(funcID int) (batchSize int) {
case partner.FuncUpdateStoreSkusStock, partner.FuncUpdateStoreSkusStatus, partner.FuncUpdateStoreSkusPrice:
batchSize = mtwmapi.MaxStoreSkuBatchSize
case partner.FuncDeleteStoreSkus:
batchSize = 1 // 可考虑用批量操作
batchSize = mtwmapi.MaxBatchDeleteSize
case partner.FuncCreateStoreSkus:
batchSize = 1 // 可考虑用批量操作
case partner.FuncUpdateStoreSkus:
@@ -284,7 +284,7 @@ func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, v
err = api.MtwmAPI.RetailDelete(ctx.GetTrackInfo(), vendorStoreID, storeSkuList[0].VendorSkuID)
} else {
// todo 部分失败
err = api.MtwmAPI.RetailCatSkuBatchDelete(ctx.GetTrackInfo(), vendorStoreID, nil, nil, partner.BareStoreSkuInfoList(storeSkuList).GetVendorSkuIDList())
err = api.MtwmAPI.RetailCatSkuBatchDelete2(ctx.GetTrackInfo(), vendorStoreID, nil, nil, nil, nil, partner.BareStoreSkuInfoList(storeSkuList).GetVendorSkuIDList())
}
}
return nil, err