From ea0358f00d930b5cd32dbada6553a19d33cbf7ed Mon Sep 17 00:00:00 2001 From: Rosy-zhudan Date: Fri, 20 Sep 2019 16:11:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=AA=E6=89=BE=E5=88=B0?= =?UTF-8?q?=E9=97=A8=E5=BA=97=E7=9A=84=E5=BC=82=E5=B8=B8=E6=8D=95=E6=8D=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/misc/store_sku_sales.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/business/jxstore/misc/store_sku_sales.go b/business/jxstore/misc/store_sku_sales.go index 5ba3f19de..ec5173695 100644 --- a/business/jxstore/misc/store_sku_sales.go +++ b/business/jxstore/misc/store_sku_sales.go @@ -1,6 +1,8 @@ package misc import ( + "errors" + "fmt" "math" "sync" @@ -31,6 +33,9 @@ func GetStoreSkuSalesInfo(ctx *jxcontext.Context, storeID int) (outStoreSkuSales storeMapData[value.ID] = value } curStoreInfo := storeMapData[storeID] + if curStoreInfo == nil { + return nil, errors.New(fmt.Sprintf("未找到商店:[%d]", storeID)) + } cityCode := curStoreInfo.CityCode //获取本市商品总销量