From f9b578f0ae70c3cc2807e9d35203daed8a70fe2c Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 5 Aug 2019 12:25:29 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E9=97=A8=E5=BA=97=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=8F=AF=E5=94=AE=E6=97=B6=E6=9B=B4=E6=96=B0=E5=BA=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync_store_sku.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 128715311..438be2c54 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -298,6 +298,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo if model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) && singleStoreHandler != nil { updateList = append(updateList, calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage))) } else { + isAddedStock := false if model.IsSyncStatusPrice(sku.StoreSkuSyncStatus) { bareSku = storeSkuSyncInfo2Bare(calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage))) priceList = append(priceList, bareSku) @@ -307,6 +308,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo bareSku = storeSkuSyncInfo2Bare(sku) } stockList = append(stockList, bareSku) + isAddedStock = true } if model.IsSyncStatusSale(sku.StoreSkuSyncStatus) { if bareSku == nil { @@ -314,6 +316,10 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo } if sku.MergedStatus == model.SkuStatusNormal { onlineList = append(onlineList, bareSku) + if !isAddedStock { + stockList = append(stockList, bareSku) + isAddedStock = true + } } else { offlineList = append(offlineList, bareSku) }