增加未找到门店的异常捕捉

This commit is contained in:
Rosy-zhudan
2019-09-20 16:11:08 +08:00
parent 6a20aa4aa4
commit ea0358f00d

View File

@@ -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
//获取本市商品总销量