lin
2024-03-22 774c8b2ee14eef5fd10bbd46d85a180e7b19ab21
src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
@@ -45,6 +45,7 @@
        <include refid="selectTopics"/>
        <where>
            <if test="id != null "> parent_id = #{id}</if>
             and delete_flag = 0
        </where>
    </select>
@@ -64,7 +65,9 @@
            public_discuss_id,
            parent_id,
            level,
            selected
            selected,
            article_id,
            option_number
        from
            jczz_topics
    </sql>
@@ -74,20 +77,7 @@
    <select id="selectTopicsList" parameterType="org.springblade.modules.discuss.dto.TopicsDTO" resultMap="TopicsDTOResult">
        SELECT
        jt.id,
        jt.discuss_content,
        jt.option_range,
        jt.sort,
        jt.option_content,
        jt.option_detail,
        jt.number,
        jt.create_time,
        jt.update_time,
        jt.delete_flag,
        jt.public_discuss_id,
        jt.parent_id,
        jt.article_id,
        jt.LEVEL,
        jt.*,
        ( SELECT jut.selected FROM jczz_user_topics jut WHERE jut.article_id = jt.article_id AND jut.user_id = #{userId}
        limit 1
        ) selected