Commit c6400f83 by shenjunjie

Merge branch 'release' into 'master'

Release

See merge request !451
parents 85fac016 b53ead5f
......@@ -516,18 +516,14 @@ public class ChannelServiceImpl implements ChannelService {
// 过滤掉不符合时间条件的数据并排序
Map<String, List<ChannelRecord>> channelRecords = keyMap.values().stream().map(pair -> {
ChannelRecord channelRecord = pair.getRight();
// 情感过滤
if (emotion == EmotionEnum.ALL.getState() || emotion == channelRecord.getEmotion()) {
List<ChannelIndex.Article> articles = ChannelIndex.Record.filterArticles(startTime, endTime,
channelRecord.getRecord().getArticles(), emotion);
if (0 == articles.size()) {
return null;
}
articles.sort(Comparator.comparingLong(ChannelIndex.Article::getTime).reversed());
channelRecord.getRecord().setArticles(articles);
return channelRecord;
List<ChannelIndex.Article> articles = ChannelIndex.Record.filterArticles(startTime, endTime,
channelRecord.getRecord().getArticles(), emotion);
if (0 == articles.size()) {
return null;
}
return null;
articles.sort(Comparator.comparingLong(ChannelIndex.Article::getTime).reversed());
channelRecord.getRecord().setArticles(articles);
return channelRecord;
}).filter(Objects::nonNull).collect(Collectors.groupingBy(ChannelRecord::getPlatform));
for (String platformName : PLATFORMS) {
List<ChannelRecord> channelRecordList = channelRecords.getOrDefault(platformName, Collections.emptyList()).stream().limit(size).collect(Collectors.toList());
......
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