| | |
| | | <mapper namespace="org.springblade.modules.discuss.mapper.UserPublicEnrollMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="userPublicEnrollResultMap" type="org.springblade.modules.discuss.entity.UserPublicEnrollEntity"> |
| | | <resultMap id="userPublicEnrollResultMap" type="org.springblade.modules.discuss.vo.UserPublicEnrollVO"> |
| | | <result property="id" column="id" /> |
| | | <result property="publicDiscussId" column="public_discuss_id" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="deleteFlag" column="delete_flag" /> |
| | | <result property="deletedFlag" column="deleted_flag" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectUserPublicEnroll"> |
| | |
| | | user_id, |
| | | create_time, |
| | | update_time, |
| | | delete_flag |
| | | deleted_flag |
| | | from |
| | | jczz_user_public_enroll |
| | | </sql> |
| | |
| | | |
| | | |
| | | <select id="selectUserPublicEnrollPage" resultMap="userPublicEnrollResultMap"> |
| | | select * from jczz_user_public_enroll where deleted_flag = 0 |
| | | SELECT |
| | | jup.id, |
| | | jup.public_discuss_id, |
| | | jup.user_id, |
| | | jup.create_time, |
| | | jup.update_time, |
| | | jup.deleted_flag, |
| | | bu.avatar, |
| | | bu.`name`, |
| | | bu.phone, |
| | | jda.address_name, |
| | | jda.aoi_name |
| | | FROM |
| | | jczz_user_public_enroll jup |
| | | LEFT JOIN blade_user bu ON jup.user_id = bu.id |
| | | LEFT JOIN jczz_household jh ON jh.associated_user_id = jup.user_id |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code |
| | | <where> |
| | | <if test="userPublicEnroll.id != null "> and jup.id = #{userPublicEnroll.id}</if> |
| | | <if test="userPublicEnroll.publicDiscussId != null "> and jup.public_discuss_id = #{userPublicEnroll.publicDiscussId}</if> |
| | | <if test="userPublicEnroll.userId != null "> and jup.user_id = #{userPublicEnroll.userId}</if> |
| | | <if test="userPublicEnroll.createTime != null "> and jup.create_time = #{userPublicEnroll.createTime}</if> |
| | | <if test="userPublicEnroll.updateTime != null "> and jup.update_time = #{userPublicEnroll.updateTime}</if> |
| | | <if test="userPublicEnroll.deletedFlag != null "> and jup.deleted_flag = #{userPublicEnroll.deletedFlag}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectUserPublicEnrollList" parameterType="org.springblade.modules.discuss.dto.UserPublicEnrollDTO" resultMap="userPublicEnrollResultMap"> |
| | |
| | | <if test="userId != null "> and user_id = #{userId}</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="deletedFlag != null "> and deleted_flag = #{deletedFlag}</if> |
| | | </where> |
| | | </select> |
| | | |