| | |
| | | <!--房屋详情--> |
| | | <resultMap id="houseAndHouseLabelMap" type="org.springblade.modules.house.vo.HouseVO" autoMapping="true"> |
| | | <id property="id" column="id"/> |
| | | <collection property="houseLabelVOList" javaType="java.util.List" |
| | | ofType="org.springblade.modules.house.vo.HouseLabelVO" autoMapping="true"> |
| | | <collection property="userHouseLabelVOList" javaType="java.util.List" |
| | | ofType="org.springblade.modules.house.vo.UserHouseLabelVO" autoMapping="true"> |
| | | <id property="id" column="cid"/> |
| | | <result property="remark" column="cremark"/> |
| | | </collection> |
| | |
| | | |
| | | <!--自定义分页列表--> |
| | | <select id="selectHousePage" resultType="org.springblade.modules.house.vo.HouseVO"> |
| | | select *,concat(building," ",unit," ",room) as address from jczz_house |
| | | select jh.*,concat(building," ",unit," ",room) as address from jczz_house jh |
| | | left join jczz_doorplate_address jda on jda.address_code = jh.house_code |
| | | where is_deleted = 0 |
| | | <if test="house.id != null "> and id = #{house.id}</if> |
| | | <if test="house.streetCode != null and house.streetCode != ''"> |
| | | and jda.town_street_code like concat('%',#{house.streetCode},'%') |
| | | </if> |
| | | <if test="house.houseCode != null and house.houseCode != ''"> and house_code = #{house.houseCode}</if> |
| | | <if test="house.districtCode != null and house.districtCode != ''"> and district_code = #{house.districtCode}</if> |
| | | <if test="house.districtName != null and house.districtName != ''"> |
| | | and district_name like concat('%',#{house.districtName},'%') |
| | | </if> |
| | | <if test="house.houseName != null and house.houseName != ''"> and house_name = #{house.houseName}</if> |
| | | <if test="house.houseName != null and house.houseName != ''"> and house_name like concat('%',#{house.houseName},'%')</if> |
| | | <if test="house.phone != null and house.phone != ''"> and phone = #{house.phone}</if> |
| | | <if test="house.area != null "> and area = #{house.area}</if> |
| | | <if test="house.propertyPrice != null "> and property_price = #{house.propertyPrice}</if> |
| | |
| | | jh.*, |
| | | jhl.id as cid,jhl.*,jhl.remark as cremark |
| | | from jczz_house jh |
| | | left join jczz_house_label jhl on jh.house_code = jhl.house_code |
| | | where jh.is_deleted = 0 |
| | | left join jczz_user_house_label jhl on jh.house_code = jhl.house_code |
| | | where jh.is_deleted = 0 and jhl.lable_type = 2 |
| | | and jh.house_code = #{house.houseCode} |
| | | </select> |
| | | |