From 50406046eea31606d477d75f91883124b239ffda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 22 Sep 2023 13:06:07 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/system_store_sku.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index f55f05f45..97dabda92 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -80,6 +80,10 @@ func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId case 3: // 同步商品 fromFoodList, err1 := fromApi.RetailListAll(utils.Int2Str(fromVendorStoreId)) + if len(fromFoodList) == 0 || fromFoodList == nil { + return nil, fmt.Errorf("fromFoodList 为空") + } + globals.SugarLogger.Debugf("RetailListAll : %s", utils.Format4Output(len(fromFoodList), false)) if err1 != nil { globals.SugarLogger.Debugf("RetailListAll : %s", utils.Format4Output(err, false)) }