From 47fae47ca4155a1645cb6f8fbdbc0f83df39cf68 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期一, 27 五月 2024 14:47:32 +0800
Subject: [PATCH] 行程录音

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

diff --git a/ManagementNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderTapeMapper.xml b/ManagementNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderTapeMapper.xml
index 641d374..3875635 100644
--- a/ManagementNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderTapeMapper.xml
+++ b/ManagementNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderTapeMapper.xml
@@ -20,5 +20,35 @@
     <sql id="Base_Column_List">
         id,orderId,orderType,fileLink,fileName,fileFormat,fileSize,afterTime,insertTime,isDelete
     </sql>
+    <select id="getOrderTapeList" resultType="java.util.Map">
+        SELECT tot.id,tot.orderId,tot.orderType,tot.fileLink,tot.fileName,tot.fileFormat,tot.fileSize,tot.afterTime,tot.insertTime,tot.isDelete,o.orderNum,
+            (case when tot.afterTime &lt;= now() then 2 when tot.afterTime &gt;= now() then 1 end) as state
+        from t_order_tape tot
+        LEFT JOIN
+        (
+        SELECT id,orderNum,isDelete,1 as orderType from t_order_private_car
+        UNION ALL
+        SELECT id,orderNum,isDelete,3 as orderType from t_order_cross_city
+        UNION ALL
+        SELECT id,orderNum,isDelete,7 as orderType from t_order_transfer
+        ) o
+        on tot.orderId = o.id
+        where tot.isDelete = 1 and o.isDelete = 1 and tot.orderType = o.orderType
+        <if test="beginTime != null and endTime != null">
+            and tot.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')
+        </if>
+        <if test="fileName != null and fileName != ''">
+            and tot.fileName like concat('%',#{fileName},'%')
+        </if>
+        <if test="orderNum != null and orderNum != ''">
+            and o.orderNum like concat('%',#{orderNum},'%')
+        </if>
+        <if test="state != null and state == 1">
+            and tot.afterTime &gt;= now()
+        </if>
+        <if test="state != null and state == 2">
+            and tot.afterTime &lt;= now()
+        </if>
+    </select>
 
 </mapper>

--
Gitblit v1.7.1