From c60f4c46134cafd36f6531114f03828faf755166 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期四, 26 三月 2026 16:54:34 +0800
Subject: [PATCH] feat(account): 增加支出和收入查询的模糊筛选条件

---
 src/main/resources/mapper/account/AccountIncomeMapper.xml |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/account/AccountIncomeMapper.xml b/src/main/resources/mapper/account/AccountIncomeMapper.xml
index 4acb504..56d254d 100644
--- a/src/main/resources/mapper/account/AccountIncomeMapper.xml
+++ b/src/main/resources/mapper/account/AccountIncomeMapper.xml
@@ -11,6 +11,13 @@
         <if test="accountIncome.entryDateStart != null and accountIncome.entryDateStart != '' ">
             AND income_date &gt;= DATE_FORMAT(#{accountIncome.entryDateStart},'%Y-%m-%d')
         </if>
+        <if test="accountIncome.customerName != null and accountIncome.customerName != '' ">
+            AND customer_name like CONCAT('%',#{accountIncome.customerName},'%')
+        </if>
+
+        <if test="accountIncome.invoiceNumber != null and accountIncome.invoiceNumber != '' ">
+            AND invoice_number like CONCAT('%',#{accountIncome.invoiceNumber},'%')
+        </if>
         <if test="accountIncome.entryDateEnd != null and accountIncome.entryDateEnd != '' ">
             AND income_date &lt;= DATE_FORMAT(#{accountIncome.entryDateEnd},'%Y-%m-%d')
         </if>
@@ -76,7 +83,7 @@
                IFNULL(SUM(income_money), 0)            AS amount
         FROM account_income
         WHERE income_date BETWEEN #{startDate} AND #{endDate}
-          AND business_type = 1
+#           AND business_type = 1
         GROUP BY dateStr
         ORDER BY dateStr
 

--
Gitblit v1.9.3