linwe
2023-11-09 365b5ad817c9c8a2992d505aa39eccfa2be0460e
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -44,6 +44,7 @@
        <collection property="householdLabelList" javaType="java.util.List"
                    ofType="org.springblade.modules.house.vo.HouseholdLabelVO" autoMapping="true">
            <id property="id" column="cid"/>
            <result property="remark" column="cremark"/>
        </collection>
    </resultMap>
@@ -64,12 +65,23 @@
    <select id="getHouseholdListByCode" resultMap="householdAndLabelMap" >
        select
            jh.*,
            jhl.id as cid,jhl.*
            jhl.id as cid,jhl.*,jhl.remark as cremark
        from jczz_household jh
        left join jczz_household_label jhl on jh.id = jhl.household_id
        where 1=1
        where 1=1 and is_deleted = 0
        and house_code = #{code}
    </select>
    <!--查询房屋集合信息-按id-->
    <select id="getHouseholdListById" resultMap="householdAndLabelMap" >
        select
            jh.*,
            jhl.id as cid,jhl.*,jhl.remark as cremark
        from jczz_household jh
        left join jczz_household_label jhl on jh.id = jhl.household_id
        where 1=1 and is_deleted = 0
        and jh.id = #{household.id}
    </select>
</mapper>