| | |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="queryIdleDriverByIds" resultType="Driver"> |
| | | select * |
| | | from t_driver |
| | | where flag != 3 and state = 2 and authState = 2 and id in |
| | | <foreach collection="ids" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | and id in(select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%')) |
| | | and id in (select driverId from t_driver_orders where `type` = #{type}) |
| | | </select> |
| | | |
| | | <select id="queryIdleDriver_" resultType="Driver"> |
| | | select |
| | |
| | | updateTime as updateTime, |
| | | updateUser as updateUser |
| | | from t_driver |
| | | where flag != 3 and state = 3 and authState = 2 |
| | | where flag != 3 and state in (2,3) and authState = 2 |
| | | <if test="null != companyId"> |
| | | <choose> |
| | | <when test="companyId != 1"> |