From 4a8c3190fb9186039035822fecdf6d3b1ad5e77b Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 20 Sep 2019 14:38:10 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=A4=84=E7=90=86=E7=BE=8E=E5=9B=A2?= =?UTF-8?q?=E5=A4=96=E5=8D=96poi/save=E6=97=B6=EF=BC=8C=E6=8A=A5=E9=94=99?= =?UTF-8?q?=EF=BC=9A=E5=95=86=E5=AE=B6=E5=B7=B2=E6=8E=A5=E5=85=A5=E7=BE=8E?= =?UTF-8?q?=E5=9B=A2=E9=85=8D=E9=80=81=EF=BC=8C=E4=B8=8D=E5=8F=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=97=A8=E5=BA=97=E9=85=8D=E9=80=81=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=88=E5=BF=BD?= =?UTF-8?q?=E7=95=A5=E9=94=99=E8=AF=AF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/mtwm/store.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/business/partner/purchase/mtwm/store.go b/business/partner/purchase/mtwm/store.go index 84e1bd572..a3b2983c9 100644 --- a/business/partner/purchase/mtwm/store.go +++ b/business/partner/purchase/mtwm/store.go @@ -128,12 +128,20 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin } // globals.SugarLogger.Debug(utils.Format4Output(params, false)) if globals.EnableMtwmStoreWrite { - errList.AddErr(api.MtwmAPI.PoiSave(storeDetail.VendorStoreID, params)) + err = api.MtwmAPI.PoiSave(storeDetail.VendorStoreID, params) + } + // PoiSave有时会报错:商家已接入美团配送,不可修改门店配送相关信息,这里放弃信息修改 + if err != nil { + if utils.IsErrMatch(err, utils.Int2Str(mtwmapi.ErrCodeCanNotModifyStoreDeliveryInfo), nil) { + globals.SugarLogger.Infof("mtwm UpdateStore vendorStoreID:%s, params:%s failed with err:%v", storeDetail.VendorStoreID, utils.Format4Output(params, true), err) + if storeDetail.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreStatus) != 0 { + err = p.UpdateStoreStatus(jxcontext.AdminCtx, storeID, storeDetail.VendorStoreID, mergedStoreStatus) + } else { + err = nil + } + } + errList.AddErr(err) } - - // if storeDetail.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreStatus) != 0 { - // errList.AddErr(p.UpdateStoreStatus(jxcontext.AdminCtx, storeID, storeDetail.VendorStoreID, mergedStoreStatus)) - // } errList.AddErr(p.UpdateStoreOpTime(jxcontext.AdminCtx, storeID, storeDetail.VendorStoreID, storeDetail.GetOpTimeList())) return errList.GetErrListAsOne() }