修复bug

This commit is contained in:
苏元皓
2024-09-05 14:06:57 +08:00
parent ee64bca6fd
commit 117ab31c00
4 changed files with 27 additions and 14 deletions

View File

@@ -21,6 +21,7 @@ public class Comment implements Serializable {
private Long postId;
@TableField("tutorialId")
private Long tutorialId; // 新增字段
private String content;

View File

@@ -14,11 +14,11 @@ import org.apache.ibatis.annotations.Select;
public interface LikeMapper extends BaseMapper<Likee> {
// 获取帖子获赞数
@Select("SELECT SUM(like_count) FROM posts WHERE user_openid = #{userOpenid}")
Long getPostLikeCount(@Param("userOpenid") String userOpenid);
// 获取评论获赞数
@Select("SELECT SUM(like_count) FROM comments WHERE user_openid = #{userOpenid}")
Long getCommentLikeCount(@Param("userOpenid") String userOpenid);
// 查询帖子被点赞的总数