linwei
2024-01-08 ad2ec97fe0c60eee4bb7c8cdacff7c876f280ea7
src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
@@ -86,8 +86,10 @@
        jt.delete_flag,
        jt.public_discuss_id,
        jt.parent_id,
        jt.article_id,
        jt.LEVEL,
        ( SELECT jut.selected FROM jczz_user_topics jut WHERE jut.topics_id = jt.id AND jut.user_id = #{userId} ) selected
        ( SELECT jut.selected FROM jczz_user_topics jut WHERE jut.article_id = jt.article_id AND jut.user_id = #{userId}
        ) selected
        FROM
        jczz_topics jt
        <where>
@@ -104,6 +106,7 @@
            <if test="publicDiscussId != null "> and jt.public_discuss_id = #{publicDiscussId}</if>
            <if test="parentId != null "> and jt.parent_id = #{parentId}</if>
            <if test="level != null "> and jt.level = #{level}</if>
            <if test="articleId != null ">and jt.article_id = #{articleId}</if>
            and jt.delete_flag = 0
        </where>
    </select>