Pu Zhibing
2 天以前 c3b7673c16d026e57f8759b4cee99a42bf3c57f2
UserZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
@@ -163,7 +163,16 @@
    </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 &lt; 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
@@ -319,7 +328,7 @@
        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">
@@ -354,7 +363,7 @@
        a.headImgUrl as avatar,
        case when b.telX is null then a.phone else b.telX end as phone,
        c.carLicensePlate as carCode,
        CONCAT(F.`name`, d.`name`,  '.', c.carColor) as carName,
        CONCAT(f.`name`, d.`name`,  '.', c.carColor) as carName,
        (select sum(fraction) / count(id) from t_order_evaluate where driverId = a.id) as score,
        (
        (select count(id) from t_order_private_car where state in (7, 8, 9) and driverId = a.id) +