From f1aea16c2eca8f550f8b0c1ab749385487de94b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 9 Dec 2019 18:50:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=B9=B3=E5=8F=B0=E9=97=A8?= =?UTF-8?q?=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 170a6f163..0c19cea78 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -2378,20 +2378,25 @@ func GetVendorStoreInfo(ctx *jxcontext.Context, vendorIDList []int, isAsync, isC } db := dao.GetDB() storeDetail2, err := dao.GetStoreDetailByVendorStoreID(db, storeDetail.VendorStoreID, vendorID) + if err != nil { + return "", err + } if storeDetail.Status != model.StoreStatusOpened { - var storeExcel = VendorStoreExcel{ - StoreID: storeDetail.ID, - VendorStoreName: storeDetail.Name, - Tel1: storeDetail.Tel1, - Tel2: storeDetail.Tel2, - Address: storeDetail.Address, - Status: StoreStatus2Chinese(storeDetail.Status), - CityName: storeDetail.CityName, - MarketManName: storeDetail2.MarketManName, - OperatorName: storeDetail2.OperatorName, - OperatorName2: storeDetail2.OperatorName2, + if storeDetail2 != nil { + var storeExcel = VendorStoreExcel{ + StoreID: storeDetail.ID, + VendorStoreName: storeDetail.Name, + Tel1: storeDetail.Tel1, + Tel2: storeDetail.Tel2, + Address: storeDetail.Address, + Status: StoreStatus2Chinese(storeDetail.Status), + CityName: storeDetail.CityName, + MarketManName: storeDetail2.MarketManName, + OperatorName: storeDetail2.OperatorName, + OperatorName2: storeDetail2.OperatorName2, + } + retVal = []VendorStoreExcel{storeExcel} } - retVal = []VendorStoreExcel{storeExcel} } return retVal, err }