Commit 4156fa95 authored by 张辰's avatar 张辰

fix page bug

parent df7fa9e4
......@@ -20,6 +20,7 @@ import com.tanpu.community.dao.entity.community.*;
import com.tanpu.community.feign.fatools.FeignClientForFatools;
import com.tanpu.community.service.*;
import com.tanpu.community.service.base.ESService;
import com.tanpu.community.util.BizUtils;
import com.tanpu.community.util.ConvertUtil;
import com.tanpu.community.util.RankUtils;
import com.tanpu.community.util.TencentcloudUtils;
......@@ -215,14 +216,15 @@ public class ThemeManager {
if (StringUtils.isEmpty(req.getTopicId())) {
throw new BizException("TopicId为空");
}
themes = themeService.queryNewestByTopic(req.topicId, req.page.pageNumber, realSize);
}
// filter用户自己的
themes = themes.stream().filter(t -> {
return !userId.equals(t.getAuthorId()) && !req.excludeIds.contains(t.getThemeId());
}).collect(Collectors.toList()).subList(0, req.page.pageSize);
}).collect(Collectors.toList());
// todo pageNo pageSize
themes = BizUtils.subList(themes, 0, req.page.pageSize);
ThemeListResp resp = new ThemeListResp();
resp.excludeIds = req.excludeIds;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment