Merge remote-tracking branch 'origin/mark' into don
This commit is contained in:
@@ -9,7 +9,7 @@ type JxBadComments struct {
|
||||
Jxstoreid string `json:"jxstoreid" orm:"column(jxstoreid);size(11);index" description:"京西门店ID"`
|
||||
Userphone string `json:"userPhone" orm:"column(userphone);size(255);null" description:"评价的用户的联系方式"`
|
||||
Status int `json:"status" orm:"column(status)" description:"当前评论的状态(0:未解决 1:已解决)"`
|
||||
Createtime string `json:"createTime" orm:"column(createtime);size(255);null" description:"评论的创建时间"`
|
||||
Createtime string `json:"createTime" orm:"column(createtime);size(255);null;index" description:"评论的创建时间"`
|
||||
Maxmodifytime int `json:"maxModifyTime" orm:"column(maxmodifytime);null" description:"评论可修改的最大时间"`
|
||||
Score int `json:"score4" orm:"column(score)" description:"评论的星级"`
|
||||
Scorecontent string `json:"score4Content" orm:"column(scorecontent);size(255);null" description:"评论的内容"`
|
||||
|
||||
@@ -112,10 +112,11 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
openLevel, isOnline := bizStatusJX2Mtwm(storeDetail.Status)
|
||||
mergedStoreStatus := jxutils.MergeStoreStatus(storeDetail.Status, storeDetail.VendorStatus)
|
||||
openLevel, isOnline := bizStatusJX2Mtwm(mergedStoreStatus)
|
||||
params := map[string]interface{}{
|
||||
"name": remoteStoreInfo.Name, //jxutils.ComposeStoreName(storeDetail.Store.Name, model.VendorIDMTWM),
|
||||
"address": storeDetail.Address,
|
||||
"address": storeDetail.Address, // 美团好像地址也不能改的?
|
||||
"longitude": jxutils.IntCoordinate2Standard(int(remoteStoreInfo.Longitude)),
|
||||
"latitude": jxutils.IntCoordinate2Standard(int(remoteStoreInfo.Latitude)),
|
||||
"phone": storeDetail.Tel1,
|
||||
@@ -127,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, jxutils.MergeStoreStatus(storeDetail.Status, storeDetail.VendorStatus)))
|
||||
// }
|
||||
errList.AddErr(p.UpdateStoreOpTime(jxcontext.AdminCtx, storeID, storeDetail.VendorStoreID, storeDetail.GetOpTimeList()))
|
||||
return errList.GetErrListAsOne()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user