Commit f41472bc authored by 刘基明's avatar 刘基明

推荐列表 fix

parent 7e0f2f69
...@@ -408,7 +408,7 @@ public class ThemeManager { ...@@ -408,7 +408,7 @@ public class ThemeManager {
LocalDateTime firstThemeTime = LocalDateTime.now(); LocalDateTime firstThemeTime = LocalDateTime.now();
if (req.page.pageNumber > 1) { if (req.page.pageNumber > 1) {
String l = redisCache.get("queryThemes_" + req.ident); String l = redisCache.get("queryThemes_" + req.ident);
if (StringUtils.isBlank(l)) { if (!StringUtils.isBlank(l)) {
excludeIds = JsonUtil.toBean(l, new TypeReference<List<String>>() { excludeIds = JsonUtil.toBean(l, new TypeReference<List<String>>() {
}); });
firstThemeTime = themeService.queryByThemeIdIgnoreDelete(excludeIds.get(0)).getCreateTime(); firstThemeTime = themeService.queryByThemeIdIgnoreDelete(excludeIds.get(0)).getCreateTime();
......
...@@ -66,7 +66,7 @@ public class RecommendService { ...@@ -66,7 +66,7 @@ public class RecommendService {
List<String> newThemeIds = getNewestThemes().stream() List<String> newThemeIds = getNewestThemes().stream()
.filter(theme -> { .filter(theme -> {
// 暂时不过滤用户自己发的 !userId.equals(theme.getAuthorId()); // 暂时不过滤用户自己发的 !userId.equals(theme.getAuthorId());
return !excludeIds.contains(theme.getThemeId()) && theme.getMinutesTillNow() < margin; return !excludeIds.contains(theme.getThemeId()) && theme.getMinutesTillNow() > margin;
}) })
.map(ThemeAnalysDO::getThemeId).collect(Collectors.toList()); .map(ThemeAnalysDO::getThemeId).collect(Collectors.toList());
newThemeIds = BizUtils.subList(newThemeIds, 0, pageSize); newThemeIds = BizUtils.subList(newThemeIds, 0, pageSize);
......
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