This commit is contained in:
邹宗楠
2025-02-07 15:04:59 +08:00
parent abf96a20a6
commit 681753ee8a
6 changed files with 6 additions and 19 deletions

View File

@@ -171,7 +171,6 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg
}
func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
globals.SugarLogger.Debugf("-----------storeskuList %s", utils.Format4Output(storeSkuList, false))
if len(storeSkuList) == 1 && vendorOrgCode != apimanager.FakeJdOrgCode {
if globals.EnableJdStoreWrite {
err = getAPI(vendorOrgCode).UpdateCurrentQty(ctx.GetTrackInfo(), vendorStoreID, utils.Str2Int64WithDefault(storeSkuList[0].VendorSkuID, 0), storeSkuList[0].Stock)
@@ -189,10 +188,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, vendorOrg
var responseList []*jdapi.StoreSkuBatchUpdateResponse
var err2 error
if vendorOrgCode != apimanager.FakeJdOrgCode {
globals.SugarLogger.Debugf("-----------skuStockList %s", utils.Format4Output(skuStockList, false))
responseList, err2 = getAPI(vendorOrgCode).BatchUpdateCurrentQtys(ctx.GetTrackInfo(), "", vendorStoreID, skuStockList, ctx.GetUserName())
globals.SugarLogger.Debugf("-----------responseList %s", utils.Format4Output(responseList, false))
globals.SugarLogger.Debugf("-----------err2 %v", err2)
} else {
responseList, err2 = getAPI(vendorOrgCode).FakeBatchUpdateCurrentQtys(ctx.GetTrackInfo(), "", vendorStoreID, skuStockList, ctx.GetUserName())
}