From 22c0a41f35f2766fb8f2b474e0f54b54cab118f1 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Wed, 23 Jun 2021 10:38:28 +0800 Subject: [PATCH] aa --- business/partner/purchase/jdshop/store.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/partner/purchase/jdshop/store.go b/business/partner/purchase/jdshop/store.go index facebfcf0..6b27e8930 100644 --- a/business/partner/purchase/jdshop/store.go +++ b/business/partner/purchase/jdshop/store.go @@ -98,7 +98,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin if strings.Contains(storeName, " ") { storeName = strings.ReplaceAll(storeName, " ", "") } - storeName = "京西菜市" + strings.ReplaceAll(storeName, "店", "") + "生鲜店" + storeName = globals.StoreName + strings.ReplaceAll(storeName, "店", "") + "生鲜店" if len(storeName) > 30 { storeName = utils.LimitUTF8StringLen2(storeName, 30) } @@ -107,7 +107,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin } err = api.JdShopAPI.UpdateEntityStore(updateEntityStoreParam) detail, _ := api.JdShopAPI.ShopDetail(utils.Str2Int(store.VendorStoreID)) - if err == nil { + if err == nil && detail != nil { param := &jdshopapi.UpdateBasicParam{ StoreID: detail.StoreID, StoreName: detail.StoreName,