Przeglądaj źródła

json 返回结构 +page +size +1

(cherry picked from commit c96456063da4700bde6b54237d43a73bee33bce6)
(cherry picked from commit b486832b052ee4e262ec3f1d067670b28a252bcb)
MOKASZ\lw12420 2 lat temu
rodzic
commit
4b66c2e9af

+ 1 - 1
launch-admin/src/main/java/com/webflux/launchadmin/mysql/controller/testController.java

@@ -82,7 +82,7 @@ public class testController {
     @GetMapping("get3")
     @GetMapping("get3")
     public Mono<RStatus<Paged>>  test3()   {
     public Mono<RStatus<Paged>>  test3()   {
         Mono<Paged> pagedMono = template.count(Query.query(Criteria.where("text").is("a")), Tweet.class).flatMap(fm ->
         Mono<Paged> pagedMono = template.count(Query.query(Criteria.where("text").is("a")), Tweet.class).flatMap(fm ->
-                tweetRepository.findByText("a", PageRequest.of(1, 2)).collectList().map(list -> new Paged(fm, list))
+                tweetRepository.findByText("a", PageRequest.of(1, 2)).collectList().map(list -> new Paged(fm, list,1,2))
         );
         );
         Mono<RStatus<Paged>> rStatusMono = RStatus.successList(pagedMono);
         Mono<RStatus<Paged>> rStatusMono = RStatus.successList(pagedMono);
         return rStatusMono;
         return rStatusMono;