xuhy
2025-02-10 8a4d2b27e05d55be74dfdb870650a6b0f8cd9b45
ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml
@@ -38,10 +38,12 @@
            b.*,
            t.resident_name as residentName,
            t.phone,
            t.account
            t.account,
            h.house_name as houseName
        FROM
            t_bill b
        LEFT JOIN t_contract c ON c.contract_number = b.contract_number
        LEFT JOIN t_house h ON h.id = c.house_id
        LEFT JOIN t_tenant t ON t.id = c.tenant_id
        <where>
            <if test="query.payFeesStatus != null">
@@ -54,7 +56,10 @@
                and t.resident_name like concat('%',#{query.residentName},'%')
            </if>
            <if test="query.contractNumber != null and query.contractNumber !=''">
                and b.contract_number = #{contractNumber}
                and b.contract_number = #{query.contractNumber}
            </if>
            <if test="query.userId != null and query.userId !=''">
                and t.id = #{query.userId}
            </if>
        </where>
    </select>