From 6f97a42dccaedb7a8950feac205080e63d8be439 Mon Sep 17 00:00:00 2001
From: yupeng <roc__yu@163.com>
Date: 星期三, 26 二月 2025 14:27:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into xizang-changyun

---
 ruoyi-system/src/main/resources/mapper/system/TTenantMapper.xml |   69 ++++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/TTenantMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TTenantMapper.xml
index 4e23099..112f54f 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TTenantMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TTenantMapper.xml
@@ -43,5 +43,74 @@
         </where>
         ORDER BY create_time DESC
     </select>
+    <select id="pageListApplet" resultType="com.ruoyi.system.vo.TenantVO">
+        SELECT id, resident_name, checkIn_time, tenant_attributes, tenant_type, phone, id_card, email,
+        bank_number, mail_address, create_time, disabled,account
+        FROM t_tenant
+        <where>
+            <if test="query.residentNameOrPhone != null and query.residentNameOrPhone != ''">
+                AND (resident_name LIKE concat('%',#{query.residentNameOrPhone},'%')or phone LIKE concat('%',#{query.residentNameOrPhone},'%'))
+            </if>
+            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        </where>
+        ORDER BY create_time DESC
+    </select>
+    <select id="listBill" resultType="com.ruoyi.system.vo.TBillVO">
+        select t1.* from
+                     t_bill t1
+        where 1=1
+        <if test="query.payFeesStatus != null and query.payFeesStatus != ''">
+          AND t1.pay_fees_status = #{query.payFeesStatus}
+        </if>
+        <if test="null != query.contractIds and query.contractIds.size() > 0">
+            and t1.contract_id in
+            <foreach collection="query.contractIds" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+    </select>
+    <select id="examineList" resultType="com.ruoyi.system.vo.ExamineVO">
+        select t1.* from t_contract t1
+        <where>
+            <if test="query.status == 1">
+                AND t1.status = 2
+            </if>
+            <if test="query.status == 2">
+                AND (t1.status !=1 and t1.status !=2)
+            </if>
+            <if test="query.status == 3">
+                AND t1.create_by = #{query.userName}
+            </if>
+            <if test="query.time != null and query.time != ''">
+                <choose>
+                    <when test="query.time == 1">
+                        AND t1.create_time &gt;= DATE_SUB(NOW(), INTERVAL 1 DAY)
+                    </when>
+                    <when test="query.time == 2">
+                        AND t1.create_time &gt;= DATE_SUB(NOW(), INTERVAL 7 DAY)
+                    </when>
+                    <when test="query.time == 3">
+                        AND t1.create_time &gt;= DATE_SUB(NOW(), INTERVAL 30 DAY)
+                    </when>
+                </choose>
+            </if>
+        </where>
+        <choose>
+            <when test="query.sort != null and query.sort != ''">
+                <choose>
+                    <when test="query.sort == 1">
+                        ORDER BY t1.create_time DESC
+                    </when>
+                    <when test="query.sort == 2">
+                        ORDER BY t1.create_time ASC
+                    </when>
+                </choose>
+            </when>
+            <otherwise>
+                ORDER BY t1.create_time DESC
+            </otherwise>
+        </choose>
+    </select>
 
 </mapper>

--
Gitblit v1.7.1