增加未找到门店的异常捕捉
This commit is contained in:
@@ -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
|
||||
|
||||
//获取本市商品总销量
|
||||
|
||||
Reference in New Issue
Block a user