1
This commit is contained in:
@@ -227,6 +227,7 @@ func (p *PurchaseHandler) DeleteStore(db *dao.DaoDB, storeID int, userName strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error) {
|
func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error) {
|
||||||
|
globals.SugarLogger.Debugf("=========params := %s", utils.Format4Output(storeID, false))
|
||||||
var name string
|
var name string
|
||||||
if db == nil {
|
if db == nil {
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
@@ -255,14 +256,8 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
|||||||
}
|
}
|
||||||
store := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(美团):%s", storeID, remoteStoreInfo.Name, remoteStoreInfo.IsOnline, storeDetail.Status, mergedStoreStatus, storeDetail.VendorOrgCode)
|
store := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(美团):%s", storeID, remoteStoreInfo.Name, remoteStoreInfo.IsOnline, storeDetail.Status, mergedStoreStatus, storeDetail.VendorOrgCode)
|
||||||
event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), store, "", "", 10, "UpdateStore")
|
event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), store, "", "", 10, "UpdateStore")
|
||||||
// openLevel, isOnline := bizStatusJX2Mtwm(mergedStoreStatus)
|
|
||||||
//TODO 美团暂时不用那个电话
|
//TODO 美团暂时不用那个电话
|
||||||
phone := storeDetail.Tel1
|
phone := storeDetail.Tel1
|
||||||
// if storeDetail.MarketManPhone != "" {
|
|
||||||
// phone = storeDetail.MarketManPhone
|
|
||||||
// } else {
|
|
||||||
// phone = model.VendorStoreTel
|
|
||||||
// }
|
|
||||||
params := map[string]interface{}{
|
params := map[string]interface{}{
|
||||||
"name": name, //jxutils.ComposeStoreName(storeDetail.Store.Name, model.VendorIDMTWM),
|
"name": name, //jxutils.ComposeStoreName(storeDetail.Store.Name, model.VendorIDMTWM),
|
||||||
"address": storeDetail.Address, // 美团好像地址也不能改的?
|
"address": storeDetail.Address, // 美团好像地址也不能改的?
|
||||||
@@ -277,19 +272,9 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
|||||||
"promotion_info": storeDetail.PromoteInfo,
|
"promotion_info": storeDetail.PromoteInfo,
|
||||||
}
|
}
|
||||||
if globals.EnableMtwmStoreWrite {
|
if globals.EnableMtwmStoreWrite {
|
||||||
|
globals.SugarLogger.Debugf("=========params := %s", utils.Format4Output(params, false))
|
||||||
errList.AddErr(mtapi.PoiSave(storeDetail.VendorStoreID, params))
|
errList.AddErr(mtapi.PoiSave(storeDetail.VendorStoreID, params))
|
||||||
}
|
}
|
||||||
// PoiSave有时会报错:商家已接入美团配送,不可修改门店配送相关信息,这里放弃信息修改
|
|
||||||
// if err != nil {
|
|
||||||
// if utils.IsErrMatch(err, utils.Int2Str(mtwmapi.ErrCodeCanNotModifyStoreDeliveryInfo), nil) {
|
|
||||||
// if storeDetail.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreStatus) != 0 {
|
|
||||||
// err = p.UpdateStoreStatus(jxcontext.AdminCtx, storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID, mergedStoreStatus)
|
|
||||||
// } else {
|
|
||||||
// err = nil
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// errList.AddErr(err)
|
|
||||||
// }
|
|
||||||
if storeDetail.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreStatus) != 0 {
|
if storeDetail.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreStatus) != 0 {
|
||||||
errList.AddErr(p.UpdateStoreStatus(jxcontext.AdminCtx, storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID, mergedStoreStatus))
|
errList.AddErr(p.UpdateStoreStatus(jxcontext.AdminCtx, storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID, mergedStoreStatus))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user