From 753c4aede53b07041841d9aa94859b59e366bd5d Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 14 八月 2023 18:47:39 +0800
Subject: [PATCH] Merge branch '1.1' of http://120.76.84.145:10101/gitblit/r/java/SuperSaveDriving
---
user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/dao/mapping/OrderMapper.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/dao/mapping/OrderMapper.xml b/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/dao/mapping/OrderMapper.xml
index 9715b4f..cf0adf3 100644
--- a/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/dao/mapping/OrderMapper.xml
+++ b/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/dao/mapping/OrderMapper.xml
@@ -58,6 +58,7 @@
<result column="startWaitTime" property="startWaitTime"/>
<result column="state" property="state" />
<result column="oldState" property="oldState"/>
+ <result column="isInvoice" property="isInvoice"/>
<result column="status" property="status" />
<result column="createTime" property="createTime" />
</resultMap>
@@ -74,16 +75,57 @@
a.endAddress,
a.endLat,
a.endLng,
+ b.id as driverId,
b.avatar as driverAvatar,
b.`name` as driverName,
b.phone as driverPhone,
b.`code` as driverCode,
- (DATE_FORMAT(now(), '%Y') - DATE_FORMAT(b.firstCertificateTime, '%Y')) as driverAge,
+ ifnull(DATE_FORMAT(now(), '%Y') - DATE_FORMAT(b.firstCertificateTime, '%Y'), 0) as driverAge,
(select count(1) from t_order where driverId = b.id and `status` = 1 and state in (107, 108, 109)) as driverNumber,
b.score as driverScore,
- a.state
+ a.payType,
+ a.state,
+ UNIX_TIMESTAMP(a.createTime) * 1000 as createTime,
+ c.score as evaluationScore,
+ c.evaluate as evaluationContent
from t_order a
left join t_driver b on (a.driverId = b.id)
+ left join t_evaluate c on (a.id = c.orderId)
where a.id = #{orderId}
</select>
+
+
+ <select id="queryMyOrder" resultType="com.supersavedriving.user.modular.system.warpper.OrderListWarpper">
+ select
+ id,
+ '超省新代驾订单' as title,
+ startAddress,
+ endAddress,
+ state,
+ UNIX_TIMESTAMP(createTime) * 1000 as createTime
+ from t_order
+ where `status` = 1 and userId = #{uid} order by createTime desc limit #{pageNum}, #{pageSize}
+ </select>
+
+
+
+ <select id="queryNotInvoiceOrder" resultType="com.supersavedriving.user.modular.system.warpper.OrderListWarpper">
+ select
+ id,
+ '超省新代驾' as title,
+ startAddress,
+ endAddress,
+ state,
+ UNIX_TIMESTAMP(createTime) * 1000 as createTime,
+ payMoney as amount
+ from t_order
+ where `status` = 1 and isInvoice != 1 and state in (108, 109) and userId = #{uid}
+ <if test="null != notInvoiceOrder.startTime and '' != notInvoiceOrder.startTime and null != notInvoiceOrder.endTime and '' != notInvoiceOrder.endTime">
+ and DATE_FORMAT(createTime, '%Y-%m-%d') between #{notInvoiceOrder.startTime} and #{notInvoiceOrder.endTime}
+ </if>
+ <if test="null != notInvoiceOrder.startAmount and null != notInvoiceOrder.endAmount">
+ and payMoney between #{notInvoiceOrder.startAmount} and #{notInvoiceOrder.endAmount}
+ </if>
+ order by createTime desc limit #{notInvoiceOrder.pageNum}, #{notInvoiceOrder.pageSize}
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.7.1