无关风月
2025-02-19 efb2457e0f7b6e5a76999c239d8b079b21c88eb0
ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml
@@ -63,6 +63,7 @@
                and t.id = #{query.userId}
            </if>
        </where>
        order by b.payable_fees_time desc
    </select>
    <select id="getBillList" resultType="com.ruoyi.system.dto.TBillDto">
        SELECT
@@ -128,4 +129,20 @@
        </where>
        order by b.pay_fees_time
    </select>
    <select id="selectTenentByBillId" resultType="com.ruoyi.system.dto.TBillDto">
        SELECT
            b.*,
            t.resident_name as residentName,
            t.email,
            t.phone,
            t.account,
            h.house_name as houseName
        FROM
            t_bill b
        LEFT JOIN t_contract c ON c.contract_number = b.contract_number and c.disabled=0
        LEFT JOIN t_house h ON h.id = c.house_id and h.disabled=0
        LEFT JOIN t_tenant t ON t.id = c.tenant_id and t.disabled=0
        where b.id = #{billId}
    </select>
</mapper>