| | |
| | | <include refid="selectTopics"/> |
| | | <where> |
| | | <if test="id != null "> parent_id = #{id}</if> |
| | | and delete_flag = 0 |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | public_discuss_id, |
| | | parent_id, |
| | | level, |
| | | selected |
| | | selected, |
| | | article_id, |
| | | option_number |
| | | from |
| | | jczz_topics |
| | | </sql> |
| | |
| | | |
| | | <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 |