- 同步门店商品时,处理多门店平台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 {
|
if model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) && singleStoreHandler != nil {
|
||||||
updateList = append(updateList, calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage)))
|
updateList = append(updateList, calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage)))
|
||||||
} else {
|
} else {
|
||||||
isAddedStock := false
|
|
||||||
if model.IsSyncStatusPrice(sku.StoreSkuSyncStatus) {
|
if model.IsSyncStatusPrice(sku.StoreSkuSyncStatus) {
|
||||||
bareSku = storeSkuSyncInfo2Bare(calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage)))
|
bareSku = storeSkuSyncInfo2Bare(calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage)))
|
||||||
priceList = append(priceList, bareSku)
|
priceList = append(priceList, bareSku)
|
||||||
}
|
}
|
||||||
// if model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) && singleStoreHandler == nil {
|
if model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) && singleStoreHandler == nil { // 正常就不应该进到这里
|
||||||
// if bareSku == nil {
|
if bareSku == nil {
|
||||||
// bareSku = storeSkuSyncInfo2Bare(sku)
|
bareSku = storeSkuSyncInfo2Bare(sku)
|
||||||
// }
|
}
|
||||||
// stockList = append(stockList, bareSku)
|
updateItems = append(updateItems, sku2Update(vendorID, sku, model.SyncFlagStockMask))
|
||||||
// isAddedStock = true
|
}
|
||||||
// }
|
|
||||||
if model.IsSyncStatusSale(sku.StoreSkuSyncStatus) {
|
if model.IsSyncStatusSale(sku.StoreSkuSyncStatus) {
|
||||||
if bareSku == nil {
|
if bareSku == nil {
|
||||||
bareSku = storeSkuSyncInfo2Bare(sku)
|
bareSku = storeSkuSyncInfo2Bare(sku)
|
||||||
}
|
}
|
||||||
if sku.MergedStatus == model.SkuStatusNormal {
|
if sku.MergedStatus == model.SkuStatusNormal {
|
||||||
onlineList = append(onlineList, bareSku)
|
onlineList = append(onlineList, bareSku)
|
||||||
if !isAddedStock {
|
stockList = append(stockList, bareSku)
|
||||||
stockList = append(stockList, bareSku)
|
|
||||||
isAddedStock = true
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
offlineList = append(offlineList, bareSku)
|
offlineList = append(offlineList, bareSku)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user