|
@@ -36,8 +36,10 @@ import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.data.geo.Circle;
|
|
|
+import org.springframework.data.geo.Distance;
|
|
|
import org.springframework.data.geo.GeoResults;
|
|
|
import org.springframework.data.geo.Metrics;
|
|
|
+import org.springframework.data.geo.Point;
|
|
|
import org.springframework.data.redis.connection.RedisGeoCommands;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -71,7 +73,7 @@ public class WmDaHospitalServiceImpl extends ServiceImpl<WmDaHospitalMapper, WmD
|
|
|
|
|
|
@Lazy
|
|
|
@Resource
|
|
|
- private WmTaskService wmTaskService;
|
|
|
+ private WmTaskService wmTaskService;
|
|
|
|
|
|
private final SysDictItemService sysDictItemService;
|
|
|
private final WmScorePackageService wmScorePackageService;
|
|
@@ -160,7 +162,7 @@ public class WmDaHospitalServiceImpl extends ServiceImpl<WmDaHospitalMapper, WmD
|
|
|
|
|
|
|
|
|
private Map<String, Double> geoRadius(double lng, double lat) {
|
|
|
- Circle circle = new Circle(lng, lat, Metrics.KILOMETERS.getMultiplier());
|
|
|
+ Circle circle = new Circle(new Point(lng, lat), new Distance(1, Metrics.KILOMETERS));
|
|
|
RedisGeoCommands.GeoRadiusCommandArgs args = RedisGeoCommands.GeoRadiusCommandArgs.newGeoRadiusArgs()
|
|
|
.includeDistance()
|
|
|
.includeCoordinates()
|