| | |
| | | LEFT JOIN jczz_topics jts ON jts.id = jut.topics_id |
| | | WHERE |
| | | jut.article_id = jt.article_id |
| | | AND jts.parent_id = jt.id AND jut.household_id = #{householdId} AND jut.house_code = #{houseCode} |
| | | 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> |