Commit 4cbb57a9 by sdif

用户端代码提交

parent 92d322a5
......@@ -14,5 +14,5 @@ import java.util.List;
* @date 2023-09-07
*/
public interface ArticleCommentMapper extends BaseMapperPlus<ArticleCommentMapper, ArticleComment, ArticleCommentVo> {
List<ArticleCommentVo> selectByArticleComment(@Param("aid") Integer aid, @Param("uid") Integer uid);
List<ArticleCommentVo> selectByArticleComment(@Param("aid") Integer aid);
}
......@@ -80,7 +80,7 @@ public class ArticleServiceImpl implements IArticleService {
articleVo.setCollectNum(Math.toIntExact(collectCount));
// 查询用户评论
List<ArticleCommentVo> articleCommentVos = articleCommentMapper.selectByArticleComment(id,loginUser.getUserId().intValue());
List<ArticleCommentVo> articleCommentVos = articleCommentMapper.selectByArticleComment(id);
// 查询用户信息并设置到评论中
/*if (articleCommentVos != null && !articleCommentVos.isEmpty()) {
......
......@@ -3,6 +3,6 @@
<mapper namespace="com.pz.system.mapper.ArticleCommentMapper" >
<select id="selectByArticleComment" resultType="com.pz.system.domain.vo.ArticleCommentVo">
SELECT a.*,s.avatar,s.user_name FROM article_comment a left join sys_user s on s.user_id = a.uid
WHERE a.aid = #{aid} and a.uid = #{uid}
WHERE a.aid = #{aid}
</select>
</mapper>
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