|
|
@@ -42,16 +42,22 @@ public class GeoController implements ReactiveServiceCrudController<GeoProperty
|
|
|
|
|
|
|
|
|
@PostMapping("/_search/geo.json")
|
|
|
- public Mono<?> search(@RequestBody Mono<QueryParamEntity> filter, @RequestBody GeoShape shape){
|
|
|
+ public Mono<?> search(@RequestBody Mono<QueryParamEntity> filter){
|
|
|
|
|
|
return geoService.queryPager(filter)
|
|
|
.map(PagerResult::getData)
|
|
|
.map(result->{
|
|
|
GeoPayload geoPayload = new GeoPayload();
|
|
|
-// geoPayload.setFeatures(result);
|
|
|
- return geoPayload;
|
|
|
- });
|
|
|
- }
|
|
|
+ result.stream()
|
|
|
+ .filter(geoProperty->null!=geoProperty.getGeometry())
|
|
|
+ .forEach(property->{
|
|
|
+ GeoEntity geoEntity = new GeoEntity();
|
|
|
+ geoEntity.with(property);
|
|
|
+ geoPayload.getFeatures().add(geoEntity);
|
|
|
+ });
|
|
|
+ return geoPayload;}
|
|
|
+ );
|
|
|
+ };
|
|
|
|
|
|
/**
|
|
|
* 区域管理新增
|