- 饿百与美团外卖尽量同步手机与地址信息
This commit is contained in:
@@ -83,7 +83,7 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorStoreID string
|
||||
baiduShopID := utils.Str2Int64(vendorStoreID)
|
||||
result, err := api.EbaiAPI.ShopGet("", baiduShopID)
|
||||
if err == nil {
|
||||
globals.SugarLogger.Debug(utils.Format4Output(result, false))
|
||||
// globals.SugarLogger.Debug(utils.Format4Output(result, false))
|
||||
retVal := &dao.StoreDetail{
|
||||
Store: model.Store{
|
||||
Address: utils.Interface2String(result["address"]),
|
||||
@@ -370,21 +370,25 @@ func ebaiOpTime2Jx(businessTime interface{}) (opTimeList []int16) {
|
||||
|
||||
func genStoreMapFromStore(store *tEbaiStoreInfo) map[string]interface{} {
|
||||
params := fillOpTimeParams(nil, store.GetOpTimeList())
|
||||
// if store.Tel2 != "" {
|
||||
// params["ivr_phone"] = store.Tel2
|
||||
// }
|
||||
// params["phone"] = store.Tel1
|
||||
tel := store.Tel1
|
||||
if tel == "" {
|
||||
tel = store.Tel2
|
||||
}
|
||||
if tel != "" {
|
||||
params["phone"] = tel
|
||||
params["ivr_phone"] = tel
|
||||
}
|
||||
if store.VendorStoreID != "" {
|
||||
params["baidu_shop_id"] = store.VendorStoreID
|
||||
}
|
||||
if store.SyncStatus&(model.SyncFlagNewMask /*|model.SyncFlagStoreName*/) != 0 {
|
||||
params["name"] = jxutils.ComposeStoreName(store.Name, model.VendorIDEBAI)
|
||||
}
|
||||
params["address"] = store.Address
|
||||
// todo 饿百 开店审核通过后不允许修改商户信息
|
||||
if store.SyncStatus&(model.SyncFlagNewMask /*|model.SyncFlagStoreAddress*/) != 0 {
|
||||
params["longitude"] = jxutils.IntCoordinate2Standard(store.Lng)
|
||||
params["latitude"] = jxutils.IntCoordinate2Standard(store.Lat)
|
||||
params["address"] = store.Address
|
||||
params["coord_type"] = ebaiapi.CoordTypeAutonavi
|
||||
if deliveryRegion := JxDeliveryRegion2Ebai(&store.Store); deliveryRegion != nil {
|
||||
params["delivery_region"] = deliveryRegion
|
||||
|
||||
Reference in New Issue
Block a user