1
This commit is contained in:
@@ -104,8 +104,9 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
|
||||
catInfo.Seq = catInfo.StoreCatSeq
|
||||
}
|
||||
}
|
||||
globals.SugarLogger.Debug("=================", catInfo.StoreCatName, catInfo.CatSyncStatus)
|
||||
globals.SugarLogger.Debug("=================1111", catInfo.StoreCatName, catInfo.CatSyncStatus)
|
||||
if model.IsSyncStatusDelete(catInfo.CatSyncStatus) { // 删除 4
|
||||
globals.SugarLogger.Debug("=================刘磊删除", catInfo.StoreCatName, catInfo.ID)
|
||||
if model.IsSyncStatusDelete(catInfo.CatSyncStatus) && !dao.IsVendorThingIDEmpty(catInfo.VendorCatID) {
|
||||
err = handler.DeleteStoreCategory(ctx, storeID, vendorStoreID, catInfo.VendorCatID, level)
|
||||
if err != nil && handler.IsErrCategoryNotExist(err) {
|
||||
@@ -115,6 +116,7 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
|
||||
}
|
||||
}
|
||||
} else if model.IsSyncStatusNew(catInfo.CatSyncStatus) { // 新增 2
|
||||
globals.SugarLogger.Debug("=================刘磊新增", catInfo.StoreCatName, catInfo.ID)
|
||||
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 {
|
||||
@@ -132,6 +134,7 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
|
||||
// }
|
||||
}
|
||||
} else if model.IsSyncStatusUpdate(catInfo.CatSyncStatus) { // 修改 1
|
||||
globals.SugarLogger.Debug("=================刘磊修改", catInfo.StoreCatName, catInfo.ID)
|
||||
err = handler.UpdateStoreCategory(ctx, storeID, vendorStoreID, catInfo)
|
||||
globals.SugarLogger.Debug("errrrr================", err)
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user