From 49197bb59d86fbd4cd6bd63724b366e32105e266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 15 Sep 2020 17:52:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E4=BA=AC=E4=B8=9C=E8=B4=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync.go | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index 5f6df4614..db3b86369 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -1345,8 +1345,23 @@ func SetMTPSStatus(ctx *jxcontext.Context, storeId, courierStatus int) { goto ifNotExist } } else { - /*如果通过ID找不到,那就直接去判断名字*/ - goto NameProblem + StoreCourierList, _ := dao.GetStoreCourierList(dao.GetDB(), []int{storeId}, []int{model.VendorIDMTPS}, model.StoreStatusAll, model.StoreAuditStatusAll) + if len(StoreCourierList) > 0 { + ShopInfo, _ := api.MtpsAPI.GetStoreInfo(utils.Str2Int(StoreCourierList[0].VendorStoreID)) + if ShopInfo != nil { + ShopName = ShopInfo[0].PoiName + StoreInfoList, _ = api.MtpsAPI.GetStoreStatus(ShopName) + if StoreInfoList != nil && StoreInfoList.DataList != nil { + goto ifExist + } else { + /*如果通过API返回的名字也找不到*/ + goto ifNotExist + } + } + } else { + /*如果通过ID找不到,那就直接去判断名字*/ + goto NameProblem + } } NameProblem: {