From eaa20cb58afc80e3612fd6e93d6f27e181a027e7 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 07 四月 2023 17:38:29 +0800 Subject: [PATCH] 提交用户端开发版本 --- user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/dao/mapping/OrderMapper.xml | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 42 insertions(+), 1 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..d55f4d2 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,6 +75,7 @@ a.endAddress, a.endLat, a.endLng, + b.id as driverId, b.avatar as driverAvatar, b.`name` as driverName, b.phone as driverPhone, @@ -81,9 +83,48 @@ (DATE_FORMAT(now(), '%Y') - DATE_FORMAT(b.firstCertificateTime, '%Y')) 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.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