- 同步门店商品时,处理多门店平台SyncFlagModifiedMask标识的情况
This commit is contained in:
@@ -311,28 +311,23 @@ 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)
|
||||
}
|
||||
// if model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) && singleStoreHandler == nil {
|
||||
// if bareSku == nil {
|
||||
// bareSku = storeSkuSyncInfo2Bare(sku)
|
||||
// }
|
||||
// stockList = append(stockList, bareSku)
|
||||
// isAddedStock = true
|
||||
// }
|
||||
if model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) && singleStoreHandler == nil { // 正常就不应该进到这里
|
||||
if bareSku == nil {
|
||||
bareSku = storeSkuSyncInfo2Bare(sku)
|
||||
}
|
||||
updateItems = append(updateItems, sku2Update(vendorID, sku, model.SyncFlagStockMask))
|
||||
}
|
||||
if model.IsSyncStatusSale(sku.StoreSkuSyncStatus) {
|
||||
if bareSku == nil {
|
||||
bareSku = storeSkuSyncInfo2Bare(sku)
|
||||
}
|
||||
if sku.MergedStatus == model.SkuStatusNormal {
|
||||
onlineList = append(onlineList, bareSku)
|
||||
if !isAddedStock {
|
||||
stockList = append(stockList, bareSku)
|
||||
isAddedStock = true
|
||||
}
|
||||
stockList = append(stockList, bareSku)
|
||||
} else {
|
||||
offlineList = append(offlineList, bareSku)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user