From 0ec4c11b1b5a832fc3db1031e4314d2f6fdfd565 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期日, 26 二月 2023 15:38:12 +0800
Subject: [PATCH] 提交用户端基础框架

---
 driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml
index 344442d..f465499 100644
--- a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml
+++ b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml
@@ -13,6 +13,9 @@
         <result column="source" property="source" />
         <result column="agentId" property="agentId" />
         <result column="branchOfficeId" property="branchOfficeId" />
+        <result column="orderTakingTime" property="orderTakingTime"/>
+        <result column="goToAppointmentPointTime" property="goToAppointmentPointTime"/>
+        <result column="arrivalTimeAtTheAppointmentPoint" property="arrivalTimeAtTheAppointmentPoint"/>
         <result column="startTime" property="startTime" />
         <result column="startAddress" property="startAddress" />
         <result column="startLat" property="startLat" />
@@ -46,9 +49,12 @@
         <result column="payMoney" property="payMoney" />
         <result column="discountedPrice" property="discountedPrice" />
         <result column="couponId" property="couponId" />
+        <result column="discountAmount" property="discountAmount"/>
+        <result column="discount" property="discount"/>
         <result column="payType" property="payType" />
         <result column="payTime" property="payTime" />
         <result column="hallOrder" property="hallOrder"/>
+        <result column="startWaitTime" property="startWaitTime"/>
         <result column="state" property="state" />
         <result column="oldState" property="oldState"/>
         <result column="status" property="status" />
@@ -80,4 +86,34 @@
         left join t_app_user b on (a.userId = b.id)
         where a.`status` = 1 and a.hallOrder = 1 order by a.createTime desc
     </select>
+
+
+
+    <select id="queryOrderInfo" resultType="com.supersavedriving.driver.modular.system.warpper.OrderInfoWarpper">
+        select
+        a.id,
+        b.avatar,
+        a.userName,
+        a.userPhone,
+        (select count(1) from t_order where userPhone = a.userPhone and state in (107, 108)) as orderTimes,
+        (select count(1) from t_order where userPhone = a.userPhone and state in (301)) as cancelTimes,
+        a.source,
+        UNIX_TIMESTAMP(a.createTime) * 1000 as createTime,
+        a.startAddress,
+        a.startLat,
+        a.startLng,
+        a.endAddress,
+        a.endLat,
+        a.endLng,
+        a.estimatedPrice,
+        a.estimatedMileage,
+        a.startPrice,
+        a.waitTime,
+        a.actualMileage,
+        a.state,
+        (UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(a.startTime)) / 60 as travelTime
+        from t_order a
+        left join t_app_user b on (a.userId = b.id)
+        where a.id = #{orderId}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.7.1