| | |
| | | <select id="getOrderInfo" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideInfoVo"> |
| | | select r.addTime,r.startTime,r.endName,r.startName,r.money,r.id as userOrderId,r.state,t.id as driverOrderId,r.isEvaluate,t.isComplaint, |
| | | r.num,r.userId,r.driverId ,u.avatar as headImg,CASE when r.isDai=1 then r.lxPhone else u.phone end as phone,u.sex,u.nickName as name,u.totalOrders, |
| | | calculate_distance(#{lat},#{lon},r.startLat, r.startLon) as distance,r.startLat as lat, r.startLon as lon |
| | | calculate_distance(#{lat},#{lon},r.startLat, r.startLon) as distance,r.startLat as lat, r.startLon as lon,r.endLon endLon,r.endLat endLat, |
| | | t.startLat as latDriver, t.startLon as lonDriver,t.endLon endLonDriver,t.endLat endLatDriver |
| | | from (select * from app_order_ride where id=#{userOrderId}) r |
| | | left join app_order_travel t on r.travelId=t.id |
| | | left join app_driver_ride d on d.id=r.driverId |
| | | left join t_user u on r.userId=u.id |
| | | </select> |
| | | |
| | | <select id="queryMyOrderList" resultType="java.util.Map"> |
| | | select |
| | | id as orderId, |
| | | DATE_FORMAT(addTime, '%Y-%m-%d %H:%i') as orderTime, |
| | | DATE_FORMAT(startTime, '%m月%d日 %H:%i') as time, |
| | | startName as startAddress, |
| | | endName as endAddress, |
| | | driverId as driverId, |
| | | (8) as orderType, |
| | | state as state |
| | | from app_order_ride where userId = #{uid} order by addTime desc limit #{pageNum}, #{size} |
| | | </select> |
| | | </mapper> |