| | |
| | | |
| | | |
| | | <select id="list" resultType="java.util.Map"> |
| | | select o.id,o.createTime, o.orderNo as orderNum, t2.nickName userName, t2.phone userPhone, o.passengers, o.passengersPhone, o.payStatus, o.payTime, o.payMoney, o.insertTime, o.companyId |
| | | from t_abnormal_pay_order o left join t_user t2 on o.userId = t2.id |
| | | select o.id,o.recoveryOrderCreateDate as createTime, o.orderNum, t2.nickName userName, t2.phone userPhone, o.passengers, o.passengersPhone,o.state,o.payMoney,o.payTime |
| | | from ( |
| | | select id,userId,recoveryOrderCreateDate,orderNum,passengers,passengersPhone,state,payMoney,companyId,payTime from t_order_private_car a where recoveryOrder = 1 |
| | | UNION all |
| | | select id,userId,recoveryOrderCreateDate,orderNum,passengers,passengersPhone,state,payMoney,companyId,payTime from t_order_taxi a where recoveryOrder = 1 |
| | | ) o |
| | | left join t_user t2 on o.userId = t2.id |
| | | where 1=1 |
| | | <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> |
| | | AND (o.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | AND (o.recoveryOrderCreateDate between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="orderNum != null and orderNum != ''"> |
| | | and o.orderNo LIKE CONCAT('%',#{orderNum},'%') |
| | | and o.orderNum LIKE CONCAT('%',#{orderNum},'%') |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and t2.nickName LIKE CONCAT('%',#{userName},'%') |
| | |
| | | <if test="roleType != null and roleType != '' and roleType == 3"> |
| | | and o.companyId = #{nowUserId} |
| | | </if> |
| | | <if test="null != abnormalStatus"> |
| | | and o.payStatus = #{abnormalStatus} |
| | | <if test="null != abnormalStatus and 1 == abnormalStatus"> |
| | | and o.state = 7 |
| | | </if> |
| | | order by o.createTime desc |
| | | <if test="null != abnormalStatus and 2 == abnormalStatus"> |
| | | and o.state in (8, 9) |
| | | </if> |
| | | order by o.recoveryOrderCreateDate desc |
| | | </select> |
| | | |
| | | </mapper> |