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: {