From c29d8d0b6915941564e27b3141db798de1950b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 12 Oct 2023 15:02:45 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/system_store_sku.go | 9 +++++++++ 1 file changed, 9 insertions(+) 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