From 656ac293601d6da08d25e892a79604fe3edcd086 Mon Sep 17 00:00:00 2001 From: zhibing.pu <393733352@qq.com> Date: 星期四, 01 八月 2024 16:04:46 +0800 Subject: [PATCH] 修改2.0 bug --- DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml index f965994..1ea3ead 100644 --- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml +++ b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml @@ -309,4 +309,40 @@ date_format(insertTime, '%Y-%m-%d') ) = YEARWEEK(now()) </select> + + + <select id="queryIdleDriver_" resultType="Driver"> + select * from ( + select + * + from t_driver + where flag != 3 and state = 2 and authState = 2 + <if test="null != companyId"> + <choose> + <when test="companyId != 1"> + and companyId = #{companyId} or franchiseeId = #{companyId} + </when> + <otherwise> + and companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0 + </otherwise> + </choose> + + </if> + 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}) + and carId in (select carId from t_car_service where `type` = #{type} + + <if test="null != serverCarModelId"> + and serverCarModelId = #{serverCarModelId} + </if> + ) + ) as aa <!--where aa.id not in ( + select driverId from t_order_private_car where isDelete = 1 and driverPay = 1 and state in (7, 8, 9) + union all + select driverId from t_order_logistics where isDelete = 1 and driverPay = 1 and state != 10 + )--> + </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1