|
@@ -124,12 +124,22 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
*/
|
|
|
@Override
|
|
|
public List<CommunityArticleVo> selectCommunityArticleList(TableDataInfo rspData, CommunityArticle communityArticle, int pageNum, int pageSize, int searchType) {
|
|
|
+
|
|
|
+ List<CommunityArticleVo> communityArticleVos = null;
|
|
|
//找出板块下的分类
|
|
|
List<Long> classIds = communityArticle.getClassIds();
|
|
|
Long id = communityArticle.getId();
|
|
|
List<Long> articleIds = communityArticle.getArticleIds();
|
|
|
+ Integer pageTagType = communityArticle.getPageTagType();
|
|
|
+ if (pageTagType != null && pageTagType == 1) {
|
|
|
+ List<CommunityUserLikeVo> communityUserLikeVos = selectCommunityUserLikeList(SecurityUtils.getUserId(), null, 1, 999999, 1);
|
|
|
+ if (communityUserLikeVos.isEmpty()) {
|
|
|
+ return communityArticleVos;
|
|
|
+ }
|
|
|
+ List<Long> likeUserIds = communityUserLikeVos.stream().map(CommunityUserLikeVo::getLikeUserId).collect(Collectors.toList());
|
|
|
+ communityArticle.setUserIds(likeUserIds);
|
|
|
+ }
|
|
|
Long userId = SecurityUtils.getUserId();
|
|
|
- List<CommunityArticleVo> communityArticleVos = null;
|
|
|
if (Objects.nonNull(id)) {
|
|
|
//获取指定文章详细内容,文章浏览量+1
|
|
|
CommunityArticle article = communityArticleMapper.selectById(id);
|