- IsSyncStatusSec fixed to IsSyncStatusSeq
- 修改(或创建)单平台门店商品时,如果没有平台分类ID,报警
This commit is contained in:
@@ -336,8 +336,12 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
|
|||||||
offlineList = append(offlineList, bareSku)
|
offlineList = append(offlineList, bareSku)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if sku.MergedStatus == model.SkuStatusNormal /*&& !dao.IsVendorThingIDEmpty(sku.VendorCatID)*/ {
|
if sku.MergedStatus == model.SkuStatusNormal {
|
||||||
createList = append(createList, sku)
|
if dao.IsVendorThingIDEmpty(sku.VendorCatID) {
|
||||||
|
globals.SugarLogger.Warnf("syncStoreSkuNew 创建门店:%d商品:%d,但没有平台分类ID", sku.StoreID, sku.SkuID)
|
||||||
|
} else {
|
||||||
|
createList = append(createList, sku)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isNeedReorder = true
|
isNeedReorder = true
|
||||||
@@ -351,9 +355,13 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
|
|||||||
} else {
|
} else {
|
||||||
isAdded2Update := false
|
isAdded2Update := false
|
||||||
// 修改商品信息时不改价(以免活动引起的失败),而用单独的改价来改
|
// 修改商品信息时不改价(以免活动引起的失败),而用单独的改价来改
|
||||||
if (model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) || (model.IsSyncStatusSec(sku.StoreSkuSyncStatus) && reorderHandler == nil)) && singleStoreHandler != nil {
|
if (model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) || (model.IsSyncStatusSeq(sku.StoreSkuSyncStatus) && reorderHandler == nil)) && singleStoreHandler != nil {
|
||||||
isAdded2Update = true
|
if dao.IsVendorThingIDEmpty(sku.VendorCatID) {
|
||||||
updateList = append(updateList, calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage)))
|
globals.SugarLogger.Warnf("syncStoreSkuNew 修改门店:%d商品:%d,但没有平台分类ID", sku.StoreID, sku.SkuID)
|
||||||
|
} else {
|
||||||
|
isAdded2Update = true
|
||||||
|
updateList = append(updateList, calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage)))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
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)))
|
||||||
@@ -378,7 +386,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isNeedReorder = model.IsSyncStatusSec(sku.StoreSkuSyncStatus)
|
isNeedReorder = model.IsSyncStatusSeq(sku.StoreSkuSyncStatus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if isNeedReorder && reorderHandler != nil && sku.VendorCatID != "" {
|
if isNeedReorder && reorderHandler != nil && sku.VendorCatID != "" {
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ func IsSyncStatusPrice(syncStatus int8) bool {
|
|||||||
return (syncStatus & SyncFlagPriceMask) != 0
|
return (syncStatus & SyncFlagPriceMask) != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsSyncStatusSec(syncStatus int8) bool {
|
func IsSyncStatusSeq(syncStatus int8) bool {
|
||||||
return (syncStatus & SyncFlagSeqMask) != 0
|
return (syncStatus & SyncFlagSeqMask) != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user