|
@@ -3,6 +3,7 @@ package com.ruoyi.generator.service;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
+import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
|
@@ -106,7 +107,7 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
* @return 文章信息集合
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<CommunityArticleVo> selectCommunityArticleList(CommunityArticle communityArticle, int pageNum, int pageSize, int searchType) {
|
|
|
+ public List<CommunityArticleVo> selectCommunityArticleList(TableDataInfo rspData, CommunityArticle communityArticle, int pageNum, int pageSize, int searchType) {
|
|
|
//找出板块下的分类
|
|
|
Long classId = communityArticle.getClassId();
|
|
|
Long id = communityArticle.getId();
|
|
@@ -143,6 +144,7 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
//根据分类查找文章
|
|
|
int offset = (pageNum - 1) * pageSize;
|
|
|
communityArticleVos = communityArticleMapper.selectCommunityArticleList(communityArticle, circleIds, offset, pageSize, searchType);
|
|
|
+ rspData.setTotal(communityArticleMapper.selectCommunityArticleCount(communityArticle, circleIds, searchType));
|
|
|
List<CommunityArticleVo> communityArticleVos_copy = new ArrayList<>(communityArticleVos);
|
|
|
for (CommunityArticleVo articleVo : communityArticleVos_copy) {
|
|
|
List<Map<String, Object>> imageList = articleVo.getImageList();
|
|
@@ -612,6 +614,7 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
|
|
|
/**
|
|
|
* 判断评论的人 是否在文章作者的关注列表中
|
|
|
+ *
|
|
|
* @param userId 必填
|
|
|
* @param commentId 可选 评论的评论接口
|
|
|
* @param articleId 可选 文章评论接口
|
|
@@ -619,7 +622,7 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
* @throws ParseException
|
|
|
*/
|
|
|
@Override
|
|
|
- public Boolean checkCommentPermission(Long userId,Long commentId,Long articleId) throws ParseException {
|
|
|
+ public Boolean checkCommentPermission(Long userId, Long commentId, Long articleId) throws ParseException {
|
|
|
/**
|
|
|
* 1.传commentId 说明是 评论的评论接口
|
|
|
* 2.传articleId 说明是文章评论接口
|
|
@@ -635,7 +638,8 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
.selectList(new QueryWrapper<CommunityArticleComment>().eq("id", commentId));
|
|
|
CommunityArticleComment communityArticleComment = communityArticleComments.get(0);
|
|
|
articleId = communityArticleComment.getArticleId();
|
|
|
- };
|
|
|
+ }
|
|
|
+ ;
|
|
|
|
|
|
//获取文章信息 找到文章创建人
|
|
|
List<CommunityArticle> communityArticles
|