Browse Source

Merge remote-tracking branch 'origin/master'

zhou-hao 3 years ago
parent
commit
c4547af5f0

+ 8 - 6
hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/reactive/ReactiveTreeServiceQueryController.java

@@ -1,5 +1,6 @@
 package org.hswebframework.web.crud.web.reactive;
 
+import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import org.hswebframework.web.api.crud.entity.QueryOperation;
 import org.hswebframework.web.api.crud.entity.QueryParamEntity;
@@ -9,6 +10,7 @@ import org.hswebframework.web.authorization.annotation.QueryAction;
 import org.hswebframework.web.crud.service.ReactiveTreeSortEntityService;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 
@@ -42,22 +44,22 @@ public interface ReactiveTreeServiceQueryController<E extends TreeSortSupportEnt
 
     @PostMapping("/_query/tree")
     @QueryAction
-    @QueryOperation(summary = "使用POST动态查询并返回树形结构")
-    default Mono<List<E>> findAllTree(@Parameter(hidden = true) Mono<QueryParamEntity> paramEntity) {
+    @Operation(summary = "使用POST动态查询并返回树形结构")
+    default Mono<List<E>> findAllTree(@RequestBody Mono<QueryParamEntity> paramEntity) {
         return getService().queryResultToTree(paramEntity);
     }
 
     @PostMapping("/_query/_children")
     @QueryAction
-    @QueryOperation(summary = "使用POST动态查询并返回子节点数据")
-    default Flux<E> findAllChildren(@Parameter(hidden = true) Mono<QueryParamEntity> paramEntity) {
+    @Operation(summary = "使用POST动态查询并返回子节点数据")
+    default Flux<E> findAllChildren(@RequestBody Mono<QueryParamEntity> paramEntity) {
         return paramEntity.flatMapMany(param -> getService().queryIncludeChildren(param));
     }
 
     @PostMapping("/_query/_children/tree")
     @QueryAction
-    @QueryOperation(summary = "使用POST动态查询并返回子节点树形结构数据")
-    default Mono<List<E>> findAllChildrenTree(@Parameter(hidden = true) Mono<QueryParamEntity> paramEntity) {
+    @Operation(summary = "使用POST动态查询并返回子节点树形结构数据")
+    default Mono<List<E>> findAllChildrenTree(@RequestBody Mono<QueryParamEntity> paramEntity) {
         return paramEntity.flatMap(param -> getService().queryIncludeChildrenTree(param));
     }