diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index 5626ed7b0..967969027 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -189,6 +189,15 @@ func BatchInitData(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mt } else { foodData["category_name"] = storeSku.SecondaryCategoryName } + + if storeSku.SecondaryCategoryName == "" && storeSku.SecondaryCategoryCode == "" { + if storeSku.SecondaryCategoryCode != "" { + foodData["category_code"] = storeSku.CategoryCode + } else { + foodData["category_name"] = storeSku.CategoryName + } + } + foodData["is_sold_out"] = storeSku.IsSoldOut foodData["picture"] = storeSku.Picture foodData["picture_contents"] = storeSku.PictureContents