From ae3dd677f3bbbc26d7c41aebc0e6048e2d20593c Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期六, 21 十二月 2024 14:58:43 +0800
Subject: [PATCH] 1.花材统计报表:增加父类名称

---
 src/main/resources/mapper/wallet/WalletWithdrawRecordMapper.xml |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/wallet/WalletWithdrawRecordMapper.xml b/src/main/resources/mapper/wallet/WalletWithdrawRecordMapper.xml
index 324735e..fa6c5d8 100644
--- a/src/main/resources/mapper/wallet/WalletWithdrawRecordMapper.xml
+++ b/src/main/resources/mapper/wallet/WalletWithdrawRecordMapper.xml
@@ -20,5 +20,38 @@
         <result column="approve_state" property="approveState" />
         <result column="reject_reason" property="rejectReason" />
     </resultMap>
+    <select id="queryPage" resultType="com.mzl.flower.dto.response.wallet.WalletWithdrawRecordVO">
+        select t.* ,s.name supplierName , u.nick_name AS approveName from t_wallet_withdraw_record t
+        left join t_supplier_info s on t.supplier_id = s.id
+        LEFT JOIN t_user u ON t.approve_by = u.id
+        where t.deleted= 0
+        <if test="dto.supplierName != null and dto.supplierName != ''">
+            and s.name like concat('%', #{dto.supplierName}, '%')
+        </if>
+        <if test="dto.supplierId != null and dto.supplierId != ''">
+            and t.supplier_id = #{dto.supplierId}
+        </if>
+        <if test="dto.approveState != null and dto.approveState != ''">
+            and t.approve_state = #{dto.approveState}
+        </if>
+        <if test="dto.withdrawState != null and dto.withdrawState != ''">
+            and t.withdraw_state = #{dto.withdrawState}
+        </if>
+
+        <if test="dto.createStartDate!=null ">
+               AND DATE_FORMAT(t.create_time, '%Y-%m-%d') &gt;= #{dto.createStartDate}
+        </if>
+        <if test="dto.endEndDate!=null ">
+               AND DATE_FORMAT(t.create_time, '%Y-%m-%d') &lt;= #{dto.endEndDate}
+        </if>
+        <if test="dto.approveStartDate!=null ">
+            AND DATE_FORMAT(t.approve_time, '%Y-%m-%d') &gt;= #{dto.approveStartDate}
+        </if>
+        <if test="dto.approveEndDate!=null ">
+            AND DATE_FORMAT(t.approve_time, '%Y-%m-%d') &lt;= #{dto.approveEndDate}
+        </if>
+
+        order by t.create_time desc
+    </select>
 
 </mapper>

--
Gitblit v1.9.3