From adfee6707095116968e2f9650325c17ab5fd2a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B9=B3=E5=87=A1=E6=A2=A6?= Date: Thu, 9 Jul 2020 14:22:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9SetMTPSStatus=E8=B0=83?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 2 ++ business/jxstore/cms/sync.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 8d4f0061e..2c4c55bf9 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1517,6 +1517,8 @@ func GetStoreCourierMaps(ctx *jxcontext.Context, db *dao.DaoDB, storeID int, ven continue } else { SetMTPSStatus(jxcontext.AdminCtx, v.StoreID, v.Status) + storeCourierMaps = nil + err = dao.GetEntitiesByKV(db, &storeCourierMaps, cond, false) break } } diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index 083d3ab91..8e20e6751 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -1288,7 +1288,7 @@ func SetMTPSStatus(ctx *jxcontext.Context, StoreId, CourierStatus int) { StoreLists, _ := dao.GetStoreList(nil, []int{StoreId}, nil, nil, nil, "") StoreInfoList, _ := api.MtpsAPI.GetStoreStatus(StoreLists[0].Name) globals.SugarLogger.Debug("美团查询结果", StoreInfoList) - if StoreInfoList == nil && StoreInfoList.DataList == nil { + if StoreInfoList == nil || StoreInfoList.DataList == nil { sl := make(map[string]interface{}) sl["vendorStoreID"] = model.VendorIDMTPS sl["status"] = 0