From c8ea01fdd9fc8ebf5e1fcbbd56fee7071e4d5809 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期二, 10 十二月 2024 14:45:05 +0800
Subject: [PATCH] 583-订单管理-订单列表统计页面增加一个,筛选地区的下拉列表,例如昆明-呈贡区等等
---
src/main/resources/mapper/payment/OrderSettlementMapper.xml | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/payment/OrderSettlementMapper.xml b/src/main/resources/mapper/payment/OrderSettlementMapper.xml
index 5a75e50..0be30c2 100644
--- a/src/main/resources/mapper/payment/OrderSettlementMapper.xml
+++ b/src/main/resources/mapper/payment/OrderSettlementMapper.xml
@@ -26,7 +26,39 @@
<if test="condition.userName != null and condition.userName != ''">
AND (si.name LIKE CONCAT('%', #{condition.userName}, '%') OR pi.name LIKE CONCAT('%', #{condition.userName}, '%'))
</if>
- ORDER BY s.create_time desc
+ ORDER BY s.create_time desc, userName
+ </select>
+
+
+ <select id="selectSettlementListInfo" resultType="com.mzl.flower.dto.response.payment.OrderSettlementListDTO">
+ SELECT s.*, ifnull(si.name, pi.name) userName,
+ code.label as statusStr,
+ code2.label as typeStr
+ FROM t_order_settlement s
+ left join t_supplier_info si on s.user_id = si.user_id
+ left join t_partner_info pi on s.user_id = pi.user_id
+ LEFT JOIN (SELECT ct.label, ct.value from t_code_value ct where type_code = 'SETTLEMENT_STATUS') code ON s.status = code.value
+ LEFT JOIN (SELECT ct.label, ct.value from t_code_value ct where type_code = 'SETTLEMENT_TYPE') code2 ON s.type = code2.value
+ WHERE s.deleted = 0
+ <if test="condition.userId != null and condition.userId != ''">
+ AND s.user_id = #{condition.userId}
+ </if>
+ <if test="condition.type != null and condition.type != ''">
+ AND s.type = #{condition.type}
+ </if>
+ <if test="condition.status != null and condition.status != ''">
+ AND s.status = #{condition.status}
+ </if>
+ <if test="condition.startDate != null">
+ AND s.create_time >= #{condition.startDate}
+ </if>
+ <if test="condition.endDate != null">
+ AND s.create_time <= #{condition.endDate}
+ </if>
+ <if test="condition.userName != null and condition.userName != ''">
+ AND (si.name LIKE CONCAT('%', #{condition.userName}, '%') OR pi.name LIKE CONCAT('%', #{condition.userName}, '%'))
+ </if>
+ ORDER BY s.create_time desc, userName
</select>
<select id="getUserIncome" resultType="java.math.BigDecimal">
--
Gitblit v1.9.3