diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 622edb56a..e5e9e4370 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -148,11 +148,10 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo task.AddFailedList(failedList) } if err == nil { - if vendorID == model.VendorIDMTWM { + switch vendorID { + case model.VendorIDMTWM, model.VendorIDDD, model.VendorIDTaoVegetable: refutil.SetObjFieldByName(storeCatMap, idFieldName, catInfo.VendorCatID) - } else if vendorID == model.VendorIDDD { - refutil.SetObjFieldByName(storeCatMap, idFieldName, catInfo.VendorCatID) - } else { + default: refutil.SetObjFieldByName(storeCatMap, idFieldName, utils.Str2Int64WithDefault(catInfo.VendorCatID, 0)) } _, err = dao.UpdateEntity(db, storeCatMap, updateFields...)