inleft
2022-03-02 42b7d05dfdf60ee67c876084a3240ff48a3bf3a5
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
<?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,
        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
        a.create_date ASC
        <if test="limitCount != null">
            LIMIT #{limitCount};
        </if>
    </select>
</mapper>