Commit 4cbb57a9 by sdif

用户端代码提交

parent 92d322a5
...@@ -14,5 +14,5 @@ import java.util.List; ...@@ -14,5 +14,5 @@ import java.util.List;
* @date 2023-09-07 * @date 2023-09-07
*/ */
public interface ArticleCommentMapper extends BaseMapperPlus<ArticleCommentMapper, ArticleComment, ArticleCommentVo> { 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 { ...@@ -80,7 +80,7 @@ public class ArticleServiceImpl implements IArticleService {
articleVo.setCollectNum(Math.toIntExact(collectCount)); 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()) { /*if (articleCommentVos != null && !articleCommentVos.isEmpty()) {
......
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
<mapper namespace="com.pz.system.mapper.ArticleCommentMapper" > <mapper namespace="com.pz.system.mapper.ArticleCommentMapper" >
<select id="selectByArticleComment" resultType="com.pz.system.domain.vo.ArticleCommentVo"> <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 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> </select>
</mapper> </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