| | |
| | | <result property="optionContent" column="option_content" /> |
| | | <result property="optionDetail" column="option_detail" /> |
| | | <result property="number" column="number" /> |
| | | <result property="createTime" column="crete_time" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="deleteFlag" column="delete_flag" /> |
| | | <result property="publicDiscussId" column="public_discuss_id" /> |
| | | <result property="parentId" column="parent_id" /> |
| | | <result property="level" column="level" /> |
| | | <result property="selected" column="selected" /> |
| | | <result property="articleId" column="article_id" /> |
| | | <result property="optionNumber" column="option_number" /> |
| | | <result property="mandatoryFlag" column="mandatory_flag" /> |
| | | <result property="attachment" column="attachment" /> |
| | | <result property="optionNumberMin" column="option_number_min" /> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | <result property="parentId" column="parent_id" /> |
| | | <result property="level" column="level" /> |
| | | <result property="selected" column="selected" /> |
| | | <result property="articleId" column="article_id" /> |
| | | <result property="optionNumber" column="option_number" /> |
| | | <result property="optionNumberMin" column="option_number_min" /> |
| | | <result property="mandatoryFlag" column="mandatory_flag" /> |
| | | <result property="attachment" column="attachment" /> |
| | | <collection property="children" column="id" javaType="list" ofType="org.springblade.modules.discuss.dto.TopicsDTO" select="selectStlCount"> |
| | | </collection> |
| | | |
| | |
| | | public_discuss_id, |
| | | parent_id, |
| | | level, |
| | | selected |
| | | selected, |
| | | article_id, |
| | | option_number, |
| | | option_number_min, |
| | | mandatory_flag, |
| | | attachment |
| | | from |
| | | jczz_topics |
| | | </sql> |
| | |
| | | jt.parent_id, |
| | | jt.article_id, |
| | | jt.LEVEL, |
| | | ( SELECT jut.selected FROM jczz_user_topics jut WHERE jut.article_id = jt.article_id AND jut.user_id = #{userId} |
| | | jt.option_number, |
| | | jt.option_number_min, |
| | | jt.mandatory_flag, |
| | | jt.attachment, |
| | | ( SELECT |
| | | jut.selected |
| | | FROM |
| | | jczz_user_topics jut |
| | | LEFT JOIN jczz_topics jts ON jts.id = jut.topics_id |
| | | WHERE |
| | | jut.article_id = jt.article_id |
| | | AND jts.parent_id = jt.id |
| | | <if test="householdId != null "> AND jut.household_id = #{householdId}</if> |
| | | AND jut.house_code = #{houseCode} |
| | | limit 1 |
| | | ) selected |
| | | FROM |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="getTopicstotalbyarticleid" resultType="org.springblade.modules.discuss.dto.TopicsDTO"> |
| | | |
| | | SELECT |
| | | jt.discuss_content, |
| | | jt.option_content, |
| | | ( SELECT count( 1 ) FROM jczz_user_topics jut WHERE jut.topics_id = jt.id ) number |
| | | FROM |
| | | jczz_topics jt |
| | | WHERE |
| | | jt.article_id = #{articleId} |
| | | AND jt.`level` = 2 |
| | | and jt.delete_flag = 0 |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |