| | |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="householdAndLabelMap" type="org.springblade.modules.house.vo.HouseholdVO" autoMapping="true"> |
| | | <id property="id" column="id"/> |
| | | <collection property="householdLabelList" javaType="java.util.List" |
| | | ofType="org.springblade.modules.house.vo.HouseholdLabelVO" autoMapping="true"> |
| | | <id property="id" column="cid"/> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <!--自定义分页数据查询--> |
| | | <select id="selectHouseholdPage" resultMap="householdResultMap"> |
| | | select * from jczz_household where is_deleted = 0 |
| | |
| | | and associated_user_id = #{userId} |
| | | </select> |
| | | |
| | | <!--查询房屋集合信息--> |
| | | <select id="getHouseholdListByCode" resultMap="householdAndLabelMap" > |
| | | select |
| | | jh.*, |
| | | jhl.id as cid,jhl.* |
| | | from jczz_household jh |
| | | left join jczz_household_label jhl on jh.id = jhl.household_id |
| | | where 1=1 |
| | | and house_code = #{code} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |