Kaynağa Gözat

json 返回结构 +page +size +1

MOKASZ\lw12420 2 yıl önce
ebeveyn
işleme
c96456063d

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

@@ -82,7 +82,7 @@ public class testController {
     @GetMapping("get3")
     public Mono<RStatus<Paged>>  test3()   {
         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);
         return rStatusMono;