| | |
| | | |
| | | <select id="selectUserTopicsPage" resultMap="userTopicsResultMap"> |
| | | SELECT |
| | | jut.id, |
| | | jut.topics_id, |
| | | jut.public_discuss_id, |
| | | jut.article_id, |
| | | bu.avatar, |
| | | bu.`name`, |
| | | bu.phone, |
| | | jda.address_name, |
| | | jda.aoi_name |
| | | FROM |
| | | jczz_user_topics jut |
| | | jczz_user_topics as jut |
| | | LEFT JOIN blade_user bu ON jut.user_id = bu.id |
| | | LEFT JOIN jczz_household jh ON jh.associated_user_id = jut.user_id |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code |
| | |
| | | <if test="userTopics.createTime != null ">and jut.create_time = #{userTopics.createTime}</if> |
| | | <if test="userTopics.updateTime != null ">and jut.update_time = #{userTopics.updateTime}</if> |
| | | <if test="userTopics.deleteFlag != null ">and jut.delete_flag = #{userTopics.deleteFlag}</if> |
| | | <if test="userTopics.publicDiscussId != null ">and jut.public_discuss_id = #{userTopics.publicDiscussId} |
| | | GROUP BY jut.public_discuss_id |
| | | <if test="userTopics.articleId != null ">and jut.article_id = #{userTopics.articleId} |
| | | GROUP BY jut.article_id, |
| | | bu.avatar, |
| | | bu.`name`, |
| | | bu.phone, |
| | | jda.address_name, |
| | | jda.aoi_name |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectUserTopicsList" parameterType="org.springblade.modules.discuss.dto.UserTopicsDTO" resultMap="userTopicsResultMap"> |
| | | <select id="selectUserTopicsList" parameterType="org.springblade.modules.discuss.dto.UserTopicsDTO" |
| | | resultMap="userTopicsResultMap"> |
| | | <include refid="selectUserTopics"/> |
| | | <where> |
| | | <if test="id != null "> and id = #{id}</if> |
| | | <if test="userId != null "> and user_id = #{userId}</if> |
| | | <if test="topicsId != null "> and topics_id = #{topicsId}</if> |
| | | <if test="createTime != null "> and create_time = #{createTime}</if> |
| | | <if test="updateTime != null "> and update_time = #{updateTime}</if> |
| | | <if test="deleteFlag != null "> and delete_flag = #{deleteFlag}</if> |
| | | <if test="publicDiscussId != null "> and public_discuss_id = #{publicDiscussId}</if> |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="userId != null ">and user_id = #{userId}</if> |
| | | <if test="topicsId != null ">and topics_id = #{topicsId}</if> |
| | | <if test="createTime != null ">and create_time = #{createTime}</if> |
| | | <if test="updateTime != null ">and update_time = #{updateTime}</if> |
| | | <if test="deleteFlag != null ">and delete_flag = #{deleteFlag}</if> |
| | | <if test="publicDiscussId != null ">and public_discuss_id = #{publicDiscussId}</if> |
| | | </where> |
| | | </select> |
| | | |