From 099fe6189f10bf9ddb724a9ea9c122e66c4482b4 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 1 Nov 2019 14:35:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E8=BE=93=E5=85=A5=E7=9A=84=E9=A5=BF?= =?UTF-8?q?=E7=99=BE=E9=97=A8=E5=BA=97ID=E4=B8=8D=E8=83=BD=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E8=BD=AC=E4=B8=BA=E6=95=B4=E6=95=B0=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/ebai/store.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/business/partner/purchase/ebai/store.go b/business/partner/purchase/ebai/store.go index b50caaef9..d76a5c13e 100644 --- a/business/partner/purchase/ebai/store.go +++ b/business/partner/purchase/ebai/store.go @@ -80,7 +80,10 @@ func getCoordintate(data interface{}) float64 { } func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorStoreID string) (*dao.StoreDetail, error) { - baiduShopID := utils.Str2Int64(vendorStoreID) + baiduShopID := utils.Str2Int64WithDefault(vendorStoreID, 0) + if baiduShopID == 0 { + return nil, fmt.Errorf("饿百门店ID:%s非法,应该是一个整数", vendorStoreID) + } result, err := api.EbaiAPI.ShopGet("", baiduShopID) if err == nil { // globals.SugarLogger.Debug(utils.Format4Output(result, false))