mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-09 11:39:31 +08:00
fix: 修复语法问题
This commit is contained in:
@@ -110,9 +110,10 @@ public class TagController {
|
|||||||
if (postCntByTagIds == null) {
|
if (postCntByTagIds == null) {
|
||||||
postCntByTagIds = java.util.Collections.emptyMap();
|
postCntByTagIds = java.util.Collections.emptyMap();
|
||||||
}
|
}
|
||||||
|
Map<Long, Long> finalPostCntByTagIds = postCntByTagIds;
|
||||||
List<TagDto> dtos = tags
|
List<TagDto> dtos = tags
|
||||||
.stream()
|
.stream()
|
||||||
.map(t -> tagMapper.toDto(t, postCntByTagIds.getOrDefault(t.getId(), 0L)))
|
.map(t -> tagMapper.toDto(t, finalPostCntByTagIds.getOrDefault(t.getId(), 0L)))
|
||||||
.sorted((a, b) -> Long.compare(b.getCount(), a.getCount()))
|
.sorted((a, b) -> Long.compare(b.getCount(), a.getCount()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (page != null && pageSize != null && page >= 0 && pageSize > 0) {
|
if (page != null && pageSize != null && page >= 0 && pageSize > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user