|
@@ -103,6 +103,9 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
@Autowired
|
|
|
private CommunityCollectionMapper communityCollectionMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CommunityUserBlockMapper communityUserBlockMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 查询文章列表
|
|
|
*
|
|
@@ -129,6 +132,18 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
rspData.setTotal(communityArticleMapper.selectCommunityArticleCount(communityArticle, classIds, searchType));
|
|
|
List<CommunityArticleVo> communityArticleVos_copy = new ArrayList<>(communityArticleVos);
|
|
|
for (CommunityArticleVo articleVo : communityArticleVos_copy) {
|
|
|
+ //判断当前文章是否被用户拉黑
|
|
|
+ List<CommunityUserBlock> communityUserBlocks = communityUserBlockMapper.selectList(new QueryWrapper<CommunityUserBlock>()
|
|
|
+ .eq("user_id", userId)
|
|
|
+ .eq("peer_id", articleVo.getUserId()));
|
|
|
+
|
|
|
+ for (CommunityUserBlock userBlock : communityUserBlocks) {
|
|
|
+ if (userBlock.isBlock()) {
|
|
|
+ communityArticleVos.remove(articleVo);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
List<Map<String, Object>> imageList = articleVo.getImageList();
|
|
|
articleVo.setClassIds(classIds);
|
|
|
List<CommunityArticleImages> videoList = new ArrayList<>();
|