zhongrj
2023-11-17 bc670e87f764e250a54b1687dedbe0df135b411f
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -87,8 +87,26 @@
    </resultMap>
    <!--自定义分页数据查询-->
    <select id="selectHouseholdPage" resultMap="householdResultMap">
        select * from jczz_household where is_deleted = 0
    <select id="selectHouseholdPage" resultType="org.springblade.modules.house.vo.HouseholdVO">
        select
        jh.*,
        jhs.district_name aoiName,
        concat(jhs.building," ",unit," ",room) as address
        from
        jczz_household jh join jczz_house jhs on jh.house_code = jhs.house_code and jhs.is_deleted = 0
        where jh.is_deleted = 0
        <if test="household.name!=null and household.name !=''">
            and jh.name like concat('%',#{household.name},'%')
        </if>
        <if test="household.phoneNumber!=null and household.phoneNumber !=''">
            and jh.phone_number like concat('%',#{household.phoneNumber},'%')
        </if>
        <if test="household.idCard!=null and household.idCard !=''">
            and jh.id_card like concat('%',#{household.idCard},'%')
        </if>
        <if test="household.aoiName!=null and household.aoiName !=''">
            and jhs.district_name like concat('%',#{household.aoiName},'%')
        </if>
    </select>
    <!--查询房屋集合信息-->
@@ -128,7 +146,7 @@
        and jh.id = #{household.id}
    </select>
    <select id="export" resultType="org.springblade.modules.system.excel.HouseHoldExcel">
    <select id="export" resultType="org.springblade.modules.house.excel.HouseHoldExcel">
        <include refid="selectHousehold"/>
        <where>
            <if test="id != null "> and id = #{id}</if>