From 8a4d2b27e05d55be74dfdb870650a6b0f8cd9b45 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期一, 10 二月 2025 13:48:39 +0800
Subject: [PATCH] Merge branch 'xizang-changyun' of https://gitee.com/xiaochen991015/xizang

---
 ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml
index a027bc6..2f8fbd8 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml
+++ b/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>

--
Gitblit v1.7.1