inleft
2022-08-04 eaf26c265f8882b2e100428d942ac377330cc114
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="vip.xiaonuo.modular.blogarticlecomment.mapper.BlogArticleCommentMapper">
 
    <select id="getReplyListById" resultType="vip.xiaonuo.modular.blogarticlecomment.entity.BlogCommentVo">
        SELECT
        b.id AS id,
        b.parent_id AS parentId,
        b.reply_id AS replyId,
        b.visitor_id AS visitorId,
        b.visitor_nick_name AS visitorNickName,
        b.visitor_home_page AS visitorHomePage,
        IF(b.auth_status=2,'(悄悄话已隐藏)******',b.comment_content) as commentContent,
        b.create_date AS createDate,
        b.auth_status AS authStatus,
        a.visitor_nick_name AS replyUserName,
        a.visitor_home_page AS replyUserHomePage
        FROM
        `blog_article_comment` a
        INNER JOIN `blog_article_comment` b ON a.id = b.reply_id
        AND b.parent_id = #{id}
        AND b.is_enable=1
        AND b.is_check=1
        ORDER BY
        b.create_date ASC
        <if test="limitCount != null">
            LIMIT #{limitCount};
        </if>
    </select>
 
</mapper>