From 3f06b9de8009c1f0c16ee1996a4a8d03483fcd5b Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 20 六月 2023 16:59:05 +0800
Subject: [PATCH] 修改反馈bug

---
 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml
index 50230c6..f80e278 100644
--- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml
+++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml
@@ -23,6 +23,62 @@
             a.nickname AS userName,a.phone AS userPhone,a.cancelCount,a.status AS userStatus,d.name AS driverName,d.phone AS driverPhone
     </sql>
 
+
+    <select id="orderExceptionList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp">
+        select
+        o.id,
+        o.createTime,
+        o.code,
+        o.source,
+        o.startTime,
+        o.userName,
+        o.userPhone,
+        o.startAddress,
+        o.endAddress,
+        d.name as driverName,
+        d.phone as driverPhone,
+        o.estimatedPrice,
+        a.cancelCount,
+        o.state,
+        a.status AS userStatus
+        from t_order o
+        left join t_app_user a on o.userId = a.id
+        left join t_driver d on o.driverId = d.id
+        <where>
+            a.cancelCount >= 3
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                AND o.createTime between #{startTime} and #{endTime}
+            </if>
+            <if test="code != null and code != ''">
+                AND o.code LIKE concat('%',#{code},'%')
+            </if>
+            <if test="source != null">
+                AND o.source = #{source}
+            </if>
+            <if test="userName != null and userName != ''">
+                AND a.nickname LIKE concat('%',#{userName},'%')
+            </if>
+            <if test="userPhone != null and userPhone != ''">
+                AND a.phone LIKE concat('%',#{userPhone},'%')
+            </if>
+            <if test="state != null">
+                AND o.state = #{state}
+            </if>
+            <if test="driverName != null and driverName != ''">
+                AND d.name LIKE concat('%',#{driverName},'%')
+            </if>
+            <if test="roleType != null and roleType == 2">
+                AND o.branchOfficeId = #{objectId}
+            </if>
+            <if test="roleType != null and roleType == 3">
+                AND o.agentId = #{objectId}
+            </if>
+        </where>
+        ORDER BY o.createTime
+    </select>
+
+
+
     <select id="getCancelOrderList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp">
         select <include refid="Base_Column_Order"></include>
         from t_cancel_order co

--
Gitblit v1.7.1