| | |
| | | <!--根据条件查询专车订单列表--> |
| | | <select id="getPrivateCarOrderList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT ui.nickName as userName,ui.phone as userPhone,CONCAT(di.firstName, " ", di.lastName,'-',di.phone) as driver,CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, |
| | | sc.chineseName as serverCarModel,ifnull(oc.money, 0) as cancel_money,ot.* FROM t_order_private_car as ot |
| | | sc.chineseName as serverCarModel,ifnull(oc.money, 0) as cancel_money,ot.* |
| | | FROM t_order_private_car as ot |
| | | LEFT JOIN t_user as ui on ui.id = ot.userId |
| | | LEFT JOIN t_driver as di on di.id = ot.driverId |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | |
| | | oc.money as cancelMoney, |
| | | case when oc.payType = 1 then '手机支付' |
| | | when oc.payType = 2 then '银行卡支付' |
| | | when oc.payType = 3 then '余额支付' else '现金支付' end as cancelPayTypeStr |
| | | when oc.payType = 3 then '余额支付' |
| | | when oc.payType = 4 then '现金支付'else '' end as cancelPayTypeStr |
| | | FROM t_order_private_car as ot |
| | | LEFT JOIN t_user as ui on ui.id = ot.userId |
| | | LEFT JOIN t_driver as di on di.id = ot.driverId |
| | |
| | | LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId |
| | | LEFT JOIN t_company as cc on cc.id = ot.companyId |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = ot.serverCarModelId |
| | | LEFT JOIN t_order_cancel as oc on ot.id = oc.orderId and oc.orderType = 1 |
| | | LEFT JOIN t_order_cancel as oc on ot.id = oc.orderId and oc.orderType = 1 and oc.state = 2 |
| | | LEFT JOIN ( |
| | | SELECT sum(ii.money) as money,ii.incomeId,cc.type FROM t_income as ii |
| | | LEFT JOIN t_company as cc on ii.objectId = cc.id |