|
@@ -354,7 +354,8 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
//判断当前标签是否被当前登录用户拉黑
|
|
|
List<CommunityTagBlock> communityTagBlocks = communityTagBlockMapper.selectList(new QueryWrapper<CommunityTagBlock>()
|
|
|
.in("tag_id", tagList)
|
|
|
- .eq("user_id", userId));
|
|
|
+ .eq("user_id", userId)
|
|
|
+ .eq("is_block", 1));
|
|
|
|
|
|
for (CommunityTagBlock tagBlock : communityTagBlocks) {
|
|
|
if (tagBlock.isBlock()) {
|
|
@@ -514,7 +515,7 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
//文章标签拉黑数据
|
|
|
List<CommunityTagBlock> communityTagBlocks = redisCache.getCacheList(CacheConstants.COMMUNITY_TAG_BLOCK);
|
|
|
if (communityTagBlocks.isEmpty()) {
|
|
|
- communityTagBlocks = communityTagBlockMapper.selectList(new QueryWrapper<CommunityTagBlock>());
|
|
|
+ communityTagBlocks = communityTagBlockMapper.selectList(new QueryWrapper<CommunityTagBlock>().eq("is_block", 1));
|
|
|
redisCache.setCacheList(CacheConstants.COMMUNITY_TAG_BLOCK, communityTagBlocks);
|
|
|
redisCache.expire(CacheConstants.COMMUNITY_TAG_BLOCK, 24, TimeUnit.HOURS);
|
|
|
}
|