From 085d0e9e62e524b7cf0e7b7d8ad3b51a5a7c1e81 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 24 七月 2024 11:01:09 +0800
Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/IgoTravel into 2.0

---
 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml |   40 ++++++++++++++++++++++++++--------------
 1 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml
index 107906d..75870fa 100644
--- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml
+++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml
@@ -76,6 +76,7 @@
         <result column="oldState" property="oldState"/>
         <result column="telX" property="telX"/>
         <result column="bindId" property="bindId"/>
+        <result column="driverPay" property="driverPay"/>
     </resultMap>
 
 
@@ -152,7 +153,7 @@
         oldState as oldState,
         telX as telX,
         bindId as bindId
-        from t_order_private_car where isDelete = 1 and userId = #{uid}
+        from t_order_private_car where isDelete = 1 and isFrozen = 1 and userId = #{uid}
         <if test="null != orderType">
             and orderType = #{orderType}
         </if>
@@ -320,7 +321,8 @@
         isDelete as isDelete,
         oldState as oldState,
         telX as telX,
-        bindId as bindId
+        bindId as bindId,
+        tripId
         from t_order_private_car where isDelete = 1 and userId = #{uid}
         <if test="null != state">
             and state in
@@ -336,14 +338,17 @@
         select
         id as orderId,
         DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as orderTime,
-        DATE_FORMAT(travelTime, '%m月%d日 %H:%i') as time,
+        DATE_FORMAT(travelTime, '%m-%d %H:%i') as time,
         startAddress as startAddress,
         endAddress as endAddress,
         driverId as driverId,
         (1) as orderType,
         state as state,
-        oldState as oldState
-        from t_order_private_car where userId = #{uid} order by insertTime desc limit #{pageNum}, #{size}
+        oldState as oldState,
+        isFrozen,
+        cancelMidway,
+        tripId
+        from t_order_private_car where userId = #{uid} and isDelete = 1 order by insertTime desc limit #{pageNum}, #{size}
     </select>
 
 
@@ -354,7 +359,7 @@
         startAddress as startAddress,
         endAddress as endAddress,
         payMoney as payMoney,
-        ('专车订单') as orderName,
+        ('打车订单') as orderName,
         if(invoiceId is null, 1, 2) as invoice,
         unix_timestamp(insertTime) as insertTime,
         (1) as orderType
@@ -385,7 +390,7 @@
         a.type as type,
         a.state as state,
         DATE_FORMAT(a.insertTime, '%Y-%m-%d %H:%i:%s') as insertTime,
-        DATE_FORMAT(a.travelTime, '%m月%d日 %H:%i') as travelTime,
+        DATE_FORMAT(a.travelTime, '%m-%d %H:%i') as travelTime,
         DATE_FORMAT(a.travelTime, '%Y-%m-%d %H:%i:%s') as travelTime1,
         DATE_FORMAT(a.arriveTime, '%Y-%m-%d %H:%i:%s') as arriveTime,
         a.startLon as startLon,
@@ -413,19 +418,21 @@
 		a.couponMoney as couponMoney,
 		a.discount as discount,
 		a.discountMoney as discountMoney,
+		a.payType,
 		a.payMoney as payMoney,
 		a.reassignNotice as reassignNotice,
 		a.oldState as oldState,
 		b.headImgUrl as driverAvatar,
-		b.`name` as driverName,
+		CONCAT(b.firstName, " ", b.lastName) as driverName,
 		c.carLicensePlate as licensePlate,
 		c.carColor as carColor,
-		CONCAT(f.`name`, d.`name`) as brand,
+		CONCAT(f.`name`, " ", d.`name`) as brand,
 		((select sum(fraction) from t_order_evaluate where driverId = a.driverId) / (select count(id) from t_order_evaluate where driverId = a.driverId)) as score,
 		(
 		(select count(id) from t_order_private_car where driverId = a.driverId and state in (7, 8, 9)) +
 		(select count(id) from t_order_taxi where driverId = a.driverId and state in (7, 8, 9)) +
-		(select count(id) from t_order_cross_city where driverId = a.driverId and state in (6, 8, 9))
+		(select count(id) from t_order_cross_city where driverId = a.driverId and state in (6, 8, 9)) +
+		(select count(id) from t_order_logistics where driverId = a.driverId and state in (6, 9))
 		) as orderNum,
 		b.phone as driverPhone,
 		if(a.state = 12, (select money from t_order_cancel where orderId = a.id and orderType = 1 and state = 1 order by insertTime desc limit 0, 1), if(a.state = 10, (select money from t_order_cancel where orderId = a.id and orderType = 1 and state = 2 order by insertTime desc limit 0, 1), 0)) as cancelPayMoney,
@@ -438,7 +445,12 @@
 		h.money as cancelMoney,
 		h.reason as cancelReason,
 		h.remark as cancelRemark,
-		a.isFree,a.moneyType,a.moneyTime
+		a.isFree,
+		a.moneyType,
+		a.moneyTime,
+		a.isFrozen,
+		a.tripId,
+        DATE_FORMAT(a.snatchOrderTime, '%Y-%m-%d %H:%i:%s') as snatchOrderTime
         from t_order_private_car a
 		left join t_driver b on (a.driverId = b.id)
 		left join t_car c on (a.carId = c.id)
@@ -455,9 +467,9 @@
         select
         (payMoney * -1) as money,
         DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as time,
-        ('专车订单') as name,
+        ('打车订单') as name,
         UNIX_TIMESTAMP(insertTime) as insertTime
-        from t_order_private_car where payMoney != 0 and userId = #{uid} and state in (8, 9, 10, 11, 12)
+        from t_order_private_car where payMoney != 0 and userId = #{uid} and state in (8, 9, 10, 11, 12) and payType = 3
     </select>
 
 
@@ -465,7 +477,7 @@
         select
         redPacketMoney as money,
         DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as time,
-        ('专车订单') as name,
+        ('打车订单') as name,
         UNIX_TIMESTAMP(insertTime) as insertTime
         from t_order_private_car where userId = #{uid} and state in (8, 9) and redPacketId is not null
     </select>

--
Gitblit v1.7.1