| | |
| | | a.nickname AS userName,a.phone AS userPhone,a.cancelCount,a.status AS userStatus,d.name AS driverName,d.phone AS driverPhone |
| | | </sql> |
| | | |
| | | |
| | | <select id="orderExceptionList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp"> |
| | | select |
| | | o.id, |
| | | o.createTime, |
| | | o.code, |
| | | o.source, |
| | | o.startTime, |
| | | o.userName, |
| | | o.userPhone, |
| | | o.startAddress, |
| | | o.endAddress, |
| | | d.name as driverName, |
| | | d.phone as driverPhone, |
| | | o.estimatedPrice, |
| | | a.cancelCount, |
| | | o.state, |
| | | a.status AS userStatus |
| | | from t_order o |
| | | left join t_app_user a on o.userId = a.id |
| | | left join t_driver d on o.driverId = d.id |
| | | <where> |
| | | a.cancelCount >= 3 |
| | | <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
| | | AND o.createTime between #{startTime} and #{endTime} |
| | | </if> |
| | | <if test="code != null and code != ''"> |
| | | AND o.code LIKE concat('%',#{code},'%') |
| | | </if> |
| | | <if test="source != null"> |
| | | AND o.source = #{source} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | AND a.nickname LIKE concat('%',#{userName},'%') |
| | | </if> |
| | | <if test="userPhone != null and userPhone != ''"> |
| | | AND a.phone LIKE concat('%',#{userPhone},'%') |
| | | </if> |
| | | <if test="state != null"> |
| | | AND o.state = #{state} |
| | | </if> |
| | | <if test="driverName != null and driverName != ''"> |
| | | AND d.name LIKE concat('%',#{driverName},'%') |
| | | </if> |
| | | <if test="roleType != null and roleType == 2"> |
| | | AND o.branchOfficeId = #{objectId} |
| | | </if> |
| | | <if test="roleType != null and roleType == 3"> |
| | | AND o.agentId = #{objectId} |
| | | </if> |
| | | </where> |
| | | ORDER BY o.createTime |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getCancelOrderList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp"> |
| | | select <include refid="Base_Column_Order"></include> |
| | | from t_cancel_order co |