From 88eb4addec5fcc3218e25bce7a301d5a03cb5172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 30 Jun 2023 14:45:10 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/sync_store_sku.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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...)