fix: inconsistent order of post for theme-side (#2742)

#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0.0-rc.1

#### What this PR does / why we need it:
修复主题端文章列表排序不固定问题
#### Which issue(s) this PR fixes:

Fixes #2734

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
修复主题端文章列表排序不固定问题
```
pull/2752/head
guqing 2022-11-23 17:21:30 +08:00 committed by GitHub
parent 180548161a
commit b0c461b5f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -36,6 +36,6 @@ public class ContributorFinderImpl implements ContributorFinder {
return Flux.empty();
}
return Flux.fromIterable(names)
.flatMap(this::getContributor);
.concatMap(this::getContributor);
}
}

View File

@ -127,7 +127,7 @@ public class PostFinderImpl implements PostFinder {
@Override
public Flux<ListedPostVo> listAll() {
return client.list(Post.class, FIXED_PREDICATE, defaultComparator())
.flatMap(this::getListedPostVo);
.concatMap(this::getListedPostVo);
}
static Pair<String, String> postPreviousNextPair(List<String> postNames,
@ -292,7 +292,7 @@ public class PostFinderImpl implements PostFinder {
return client.list(Post.class, predicate,
comparator, pageNullSafe(page), sizeNullSafe(size))
.flatMap(list -> Flux.fromStream(list.get())
.flatMap(post -> getListedPostVo(post)
.concatMap(post -> getListedPostVo(post)
.map(postVo -> {
populateStats(postVo);
return postVo;

View File

@ -96,7 +96,7 @@ public class SinglePageFinderImpl implements SinglePageFinder {
populateStats(pageVo);
return pageVo;
})
.flatMap(this::populateContributors)
.concatMap(this::populateContributors)
.collectList()
.map(pageVos -> new ListResult<>(list.getPage(), list.getSize(), list.getTotal(),
pageVos)

View File

@ -40,7 +40,7 @@ public class TagFinderImpl implements TagFinder {
@Override
public Flux<TagVo> getByNames(List<String> names) {
return Flux.fromIterable(names)
.flatMap(this::getByName);
.concatMap(this::getByName);
}
@Override