Commit 9be81d00 authored by 刘基明's avatar 刘基明

Merge branch 'bugfix_0311_blacklist' into 'master'

Bugfix 0311 blacklist

See merge request !108
parents f908576f 1daa61a2
......@@ -152,6 +152,9 @@ public class ThemeManager {
@Autowired
private TopicReportService topicReportService;
@Value("#{'${theme.filter.userIds:}'.split(',')}")
private Set<String> filterUsers;
@PostConstruct
public void init() throws IOException {
File f = new File(tmpDir);
......@@ -514,6 +517,10 @@ public class ThemeManager {
// 权限控制,筛选出当前用户有权限的话题
Set<String> userPermitTopics = topicService.getUserPermitTopics(userId);
// 黑名单过滤
HashSet<String> blackList = new HashSet<>(this.filterUsers);
themes= themes.stream().filter(o->!blackList.contains(o.getAuthorId())).collect(Collectors.toList());
// 排序并去重
themes = RankUtils.sortThemeEntityByIds(themes, recmdIds, userPermitTopics).stream().limit(pageSize).collect(Collectors.toList());
......
......@@ -149,3 +149,8 @@ pagehelper:
msg:
kefu:
telephone: 021-65681889
theme:
filter:
userIds: USER_INFO16011642302016
\ No newline at end of file
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