From b4d8cb69ff3a3d35a10a7e5c487ff683b31cc9f1 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 24 二月 2023 10:06:03 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml | 63 +++++++++++++++++++++++++++++++ 1 files changed, 63 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 1e1d143..f2b1ab6 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 @@ -7,6 +7,8 @@ <id column="id" property="id" /> <result column="code" property="code" /> <result column="userId" property="userId" /> + <result column="userPhone" property="userPhone" /> + <result column="userName" property="userName" /> <result column="driverId" property="driverId" /> <result column="source" property="source" /> <result column="agentId" property="agentId" /> @@ -36,15 +38,76 @@ <result column="badWeatherPrice" property="badWeatherPrice" /> <result column="overBadWeatherDistance" property="overBadWeatherDistance" /> <result column="overBadWeatherPrice" property="overBadWeatherPrice" /> + <result column="weather" property="weather"/> <result column="estimatedPrice" property="estimatedPrice" /> + <result column="estimatedMileage" property="estimatedMileage"/> <result column="orderMoney" property="orderMoney" /> + <result column="actualMileage" property="actualMileage"/> <result column="payMoney" property="payMoney" /> <result column="discountedPrice" property="discountedPrice" /> <result column="couponId" property="couponId" /> <result column="payType" property="payType" /> <result column="payTime" property="payTime" /> + <result column="hallOrder" property="hallOrder"/> <result column="state" property="state" /> + <result column="oldState" property="oldState"/> <result column="status" property="status" /> <result column="createTime" property="createTime" /> </resultMap> + + + + <select id="queryOrderHall" resultType="com.supersavedriving.driver.modular.system.warpper.HallOrderList"> + 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 + from t_order a + 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