京东,饿百不同步配送范围

This commit is contained in:
gazebo
2020-02-03 20:56:49 +08:00
parent ca30a0cd0d
commit 833b7bcbed
2 changed files with 10 additions and 10 deletions

View File

@@ -408,9 +408,9 @@ func genStoreMapFromStore(store *tEbaiStoreInfo) map[string]interface{} {
params["longitude"] = jxutils.IntCoordinate2Standard(store.Lng) params["longitude"] = jxutils.IntCoordinate2Standard(store.Lng)
params["latitude"] = jxutils.IntCoordinate2Standard(store.Lat) params["latitude"] = jxutils.IntCoordinate2Standard(store.Lat)
params["coord_type"] = ebaiapi.CoordTypeAutonavi params["coord_type"] = ebaiapi.CoordTypeAutonavi
if deliveryRegion := JxDeliveryRegion2Ebai(&store.Store); deliveryRegion != nil { // if deliveryRegion := JxDeliveryRegion2Ebai(&store.Store); deliveryRegion != nil {
params["delivery_region"] = deliveryRegion // params["delivery_region"] = deliveryRegion
} // }
if store.ProvinceID != 0 { if store.ProvinceID != 0 {
params["province"] = store.ProvinceID params["province"] = store.ProvinceID
} }

View File

@@ -156,7 +156,6 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
} }
if store.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreAddress) != 0 { if store.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreAddress) != 0 {
storeParams.StationAddress = store.Address storeParams.StationAddress = store.Address
storeParams.DeliveryRangeType = store.DeliveryRangeType
storeParams.CoordinateType = jdapi.CoordinateTypeAutonavi // 一直用高德 storeParams.CoordinateType = jdapi.CoordinateTypeAutonavi // 一直用高德
storeParams.Lng = jxutils.IntCoordinate2Standard(store.Lng) storeParams.Lng = jxutils.IntCoordinate2Standard(store.Lng)
storeParams.Lat = jxutils.IntCoordinate2Standard(store.Lat) storeParams.Lat = jxutils.IntCoordinate2Standard(store.Lat)
@@ -166,11 +165,12 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
if store.JdDistrictCode != 0 { if store.JdDistrictCode != 0 {
storeParams.County = store.JdDistrictCode storeParams.County = store.JdDistrictCode
} }
if store.DeliveryRangeType == model.DeliveryRangeTypePolygon { // storeParams.DeliveryRangeType = store.DeliveryRangeType
storeParams.CoordinatePoints = store.DeliveryRange // if store.DeliveryRangeType == model.DeliveryRangeTypePolygon {
} else { // storeParams.CoordinatePoints = store.DeliveryRange
storeParams.DeliveryRangeRadius = int(utils.Str2Int64WithDefault(store.DeliveryRange, 0)) // } else {
} // storeParams.DeliveryRangeRadius = int(utils.Str2Int64WithDefault(store.DeliveryRange, 0))
// }
} }
if specialDistrictMap[storeParams.County] != 0 { if specialDistrictMap[storeParams.County] != 0 {
storeParams.City = storeParams.County storeParams.City = storeParams.County
@@ -183,7 +183,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
_, storeParams.CloseStatus = JxStoreStatus2JdStatus(jxutils.MergeStoreStatus(store.Status, store.JdStoreStatus)) _, storeParams.CloseStatus = JxStoreStatus2JdStatus(jxutils.MergeStoreStatus(store.Status, store.JdStoreStatus))
} }
fillOpTimeParams(storeParams, store.GetOpTimeList()) fillOpTimeParams(storeParams, store.GetOpTimeList())
globals.SugarLogger.Debug(utils.Format4Output(storeParams, false)) // globals.SugarLogger.Debug(utils.Format4Output(storeParams, false))
errList := errlist.New() errList := errlist.New()
if globals.EnableJdStoreWrite { if globals.EnableJdStoreWrite {
errList.AddErr(a.UpdateStoreInfo4Open2(storeParams, modifyCloseStatus)) errList.AddErr(a.UpdateStoreInfo4Open2(storeParams, modifyCloseStatus))