- 处理美团外卖poi/save时,报错:商家已接入美团配送,不可修改门店配送相关信息的问题(忽略错误)

This commit is contained in:
gazebo
2019-09-20 14:38:10 +08:00
parent 7e1104c068
commit 4a8c3190fb

View File

@@ -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()
}