zhangmei
2025-02-18 b2be113822cad796a1489b7fc52de2cb4042b57c
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>