This commit is contained in:
邹宗楠
2022-11-01 17:17:31 +08:00
parent f660fadb54
commit c6e934de1b

View File

@@ -112,6 +112,7 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
}
}
} else if model.IsSyncStatusNew(catInfo.CatSyncStatus) { // 新增 2
globals.SugarLogger.Debugf("=====新增ebai分类:===%s,", utils.Format4Output(catInfo, false))
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 {
@@ -129,6 +130,7 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
// }
}
} else if model.IsSyncStatusUpdate(catInfo.CatSyncStatus) { // 修改 1
globals.SugarLogger.Debugf("=====修改ebai分类:===%s,", utils.Format4Output(catInfo, false))
err = handler.UpdateStoreCategory(ctx, storeID, vendorStoreID, catInfo)
if err == nil {
updateFields = append(updateFields, idFieldName)