|
|
@@ -42,10 +42,10 @@ public class GeoController implements ReactiveTreeServiceQueryController<GeoReg
|
|
|
@QueryAction
|
|
|
@QueryOperation(summary = "使用GET动态查询并返回树形结构以及geo集合信息")
|
|
|
public Mono<?> findAllTreeTp2(@Parameter(hidden = true) QueryParamEntity paramEntity) {
|
|
|
- return getService().query(paramEntity)
|
|
|
+ return this.findAllChildren(paramEntity)
|
|
|
.collectList()
|
|
|
- .map(result-> GeoJson.of(result.stream().map(GeoRegionEntity::getRegion)
|
|
|
- .filter(Objects::nonNull).collect(Collectors.toList()), "FeatureCollection"));
|
|
|
+ .map(result-> Tuple.of(result, GeoJson.of(result.stream().map(GeoRegionEntity::getRegion)
|
|
|
+ .filter(Objects::nonNull).collect(Collectors.toList()), "FeatureCollection")));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/_query/all")
|
|
|
@@ -67,7 +67,7 @@ public class GeoController implements ReactiveTreeServiceQueryController<GeoReg
|
|
|
.save(Mono.just(region))
|
|
|
.flatMap(ignore-> geoService.updateChildrenNum(region.getParentId())).then():
|
|
|
geoService.findById(id)
|
|
|
- .zipWith(geoService.save(Mono.just(region)))
|
|
|
+ .zipWith(geoService.updateById(id,Mono.just(region)))
|
|
|
.flatMap(tp2->geoService.updateChildrenNum(tp2.getT1().getParentId()))
|
|
|
.concatWith(geoService.updateChildrenNum(region.getParentId()))
|
|
|
.then();
|