1
This commit is contained in:
@@ -103,7 +103,6 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
|
||||
}
|
||||
}
|
||||
if model.IsSyncStatusDelete(catInfo.CatSyncStatus) { // 删除 4
|
||||
globals.SugarLogger.Debugf("============5:删除")
|
||||
if model.IsSyncStatusDelete(catInfo.CatSyncStatus) && !dao.IsVendorThingIDEmpty(catInfo.VendorCatID) {
|
||||
err = handler.DeleteStoreCategory(ctx, storeID, vendorStoreID, catInfo.VendorCatID, level)
|
||||
if err != nil && handler.IsErrCategoryNotExist(err) {
|
||||
@@ -113,7 +112,6 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
|
||||
}
|
||||
}
|
||||
} else if model.IsSyncStatusNew(catInfo.CatSyncStatus) { // 新增 2
|
||||
globals.SugarLogger.Debugf("============6:新增")
|
||||
err = handler.CreateStoreCategory(ctx, storeID, vendorStoreID, catInfo)
|
||||
if err != nil && handler.IsErrCategoryExist(err) {
|
||||
if cat, err2 := handler.GetStoreCategory(ctx, storeID, vendorStoreID, catInfo.Name); err2 == nil {
|
||||
@@ -176,7 +174,6 @@ func SyncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
|
||||
}
|
||||
|
||||
func SyncStoreSkuNew2(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag int, vendorID, storeID int, vendorStoreID, vendorOrgCode string, nameIDs, skuIDs, excludeSkuIDs []int, useVendorPriceDirectly, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
globals.SugarLogger.Debugf("============4")
|
||||
singleStoreHandler, _ := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.ISingleStoreStoreSkuHandler)
|
||||
if singleStoreHandler != nil { // 本地创建商品分类
|
||||
if err = CreateStoreCategoryByStoreSku(ctx, vendorID, storeID, vendorStoreID, nameIDs, skuIDs); err != nil {
|
||||
@@ -503,12 +500,9 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
|
||||
if sku.Status != model.SkuStatusNormal {
|
||||
sku.MergedStatus = model.SkuStatusDontSale
|
||||
}
|
||||
globals.SugarLogger.Debugf("==========sku.MergedStatus := %d", sku.MergedStatus)
|
||||
|
||||
var bareSku *partner.StoreSkuInfo
|
||||
isNeedReorder := false
|
||||
if isStoreSkuSyncNeedDelete(sku) {
|
||||
globals.SugarLogger.Debugf("==========isStoreSkuSyncNeedDelete := %d", 222)
|
||||
if !dao.IsVendorThingIDEmpty(sku.VendorSkuID) {
|
||||
bareSku = storeSkuSyncInfo2Bare(sku)
|
||||
if singleStoreHandler == nil {
|
||||
|
||||
Reference in New Issue
Block a user