Commit 87df9b624fd00c135d8a470cb8b4fc54ef89009e
1 parent
dd8d8404
Replace Baidu Map API with Amap across all services.
Showing
4 changed files
with
5 additions
and
5 deletions
sl-express-ms-oms-service/src/main/java/com/sl/ms/oms/service/impl/OrderServiceImpl.java
| ... | ... | @@ -215,7 +215,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderEntity> impl |
| 215 | 215 | Coordinate destination = new Coordinate(receiveLnt, receiveLat); |
| 216 | 216 | //设置高德地图参数,默认是不返回预计耗时的,需要额外设置参数 |
| 217 | 217 | Map<String, Object> param = MapUtil.<String, Object>builder().put("show_fields", "cost").build(); |
| 218 | - String driving = this.eagleMapTemplate.opsForDirection().driving(ProviderEnum.BAIDU, origin, destination, param); | |
| 218 | + String driving = this.eagleMapTemplate.opsForDirection().driving(ProviderEnum.AMAP, origin, destination, param); | |
| 219 | 219 | if (StrUtil.isEmpty(driving)) { |
| 220 | 220 | return; |
| 221 | 221 | } |
| ... | ... | @@ -282,7 +282,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderEntity> impl |
| 282 | 282 | throw new SLException("下单时发货地址不能为空"); |
| 283 | 283 | } |
| 284 | 284 | //根据详细地址查询坐标 |
| 285 | - GeoResult geoResult = this.eagleMapTemplate.opsForBase().geoCode(ProviderEnum.BAIDU, address, null); | |
| 285 | + GeoResult geoResult = this.eagleMapTemplate.opsForBase().geoCode(ProviderEnum.AMAP, address, null); | |
| 286 | 286 | Coordinate coordinate = geoResult.getLocation(); |
| 287 | 287 | |
| 288 | 288 | log.info("地址和坐标-->" + address + "--" + coordinate); | ... | ... |
sl-express-ms-service-scope-service/src/main/java/com/sl/ms/scope/service/impl/ScopeServiceImpl.java
| ... | ... | @@ -141,7 +141,7 @@ public class ScopeServiceImpl implements ScopeService { |
| 141 | 141 | */ |
| 142 | 142 | @Override |
| 143 | 143 | public List<ServiceScopeEntity> queryListByPoint(ServiceTypeEnum type, String address) { |
| 144 | - GeoResult geoResult = eagleMapTemplate.opsForBase().geoCode(ProviderEnum.BAIDU, address, null); | |
| 144 | + GeoResult geoResult = eagleMapTemplate.opsForBase().geoCode(ProviderEnum.AMAP, address, null); | |
| 145 | 145 | Coordinate coordinate = geoResult.getLocation(); |
| 146 | 146 | return queryListByPoint(type, new GeoJsonPoint(coordinate.getLongitude(), coordinate.getLatitude())); |
| 147 | 147 | } | ... | ... |
sl-express-ms-transport-service/src/main/java/com/sl/transport/service/impl/TransportLineServiceImpl.java
| ... | ... | @@ -140,7 +140,7 @@ public class TransportLineServiceImpl implements TransportLineService { |
| 140 | 140 | Coordinate destination = new Coordinate(endOrgan.getLongitude(), endOrgan.getLatitude()); |
| 141 | 141 | //设置高德地图参数,默认是不返回预计耗时的,需要额外设置参数 |
| 142 | 142 | Map<String, Object> param = MapUtil.<String, Object>builder().put("show_fields", "cost").build(); |
| 143 | - String driving = this.eagleMapTemplate.opsForDirection().driving(ProviderEnum.BAIDU, origin, destination, param); | |
| 143 | + String driving = this.eagleMapTemplate.opsForDirection().driving(ProviderEnum.AMAP, origin, destination, param); | |
| 144 | 144 | if (StrUtil.isEmpty(driving)) { |
| 145 | 145 | return; |
| 146 | 146 | } | ... | ... |
sl-express-ms-web-manager/src/main/java/com/sl/ms/web/manager/service/impl/AgencyServiceImpl.java
| ... | ... | @@ -104,7 +104,7 @@ public class AgencyServiceImpl implements AgencyService { |
| 104 | 104 | address.append(areaMap.get(agencyVO.getProvinceId()).getName()); |
| 105 | 105 | address.append(areaMap.get(agencyVO.getCountyId()).getName()); |
| 106 | 106 | address.append(agencyVO.getAddress()); |
| 107 | - GeoResult geoResult = eagleMapTemplate.opsForBase().geoCode(ProviderEnum.BAIDU, address.toString(), null); | |
| 107 | + GeoResult geoResult = eagleMapTemplate.opsForBase().geoCode(ProviderEnum.AMAP, address.toString(), null); | |
| 108 | 108 | Coordinate coordinate = geoResult.getLocation(); |
| 109 | 109 | |
| 110 | 110 | log.info("地址和坐标-->" + address + "--" + coordinate); | ... | ... |