Pu Zhibing
2025-04-24 818937959bb19d3669585fa87a526bffe9ce77a4
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml
@@ -272,7 +272,7 @@
    <!--根据审核通过的司机列表无分页-->
    <select id="getDriverListNoPage" resultType="map">
        SELECT * FROM (SELECT cc1.`name` as companyName,cc2.`name` as franchiseeName,ci.carLicensePlate,ds.serverStr,IFNULL(oe.evaluateNum,0) as evaluateNum,
        (IFNULL(ot1.taxiNum, 0) + IFNULL(ot3.num, 0) + IFNULL(ot5.num, 0)) as historyNum,(IFNULL(ot2.taxiMoney, 0)+ IFNULL(ot4.money, 0) + IFNULL(ot6.money, 0)) as historyMoney,dd.* from t_driver as dd
        (IFNULL(ot1.taxiNum, 0) + IFNULL(ot3.num, 0) + IFNULL(ot5.num, 0)) as historyNum,(IFNULL(ot2.taxiMoney, 0)+ IFNULL(ot4.money, 0) + IFNULL(ot6.money, 0)) as historyMoney,ti.inviteNumber,dd.* from t_driver as dd
        LEFT JOIN (select * from t_company where type = 2 and flag != 3) as cc1 on cc1.id = dd.companyId
        LEFT JOIN (select * from t_company where type = 3 and flag != 3) as cc2 on cc2.id = dd.franchiseeId
        LEFT JOIN (select * from t_car where state = 1) as ci on ci.id = dd.carId
@@ -292,6 +292,8 @@
        LEFT JOIN (SELECT SUM(orderMoney) as money,driverId FROM t_order_private_car where FIND_IN_SET(state,'7,8,9') GROUP BY driverId) as ot4 on ot4.driverId = dd.id
        LEFT JOIN (SELECT COUNT(id) as num,driverId FROM t_order_cross_city where FIND_IN_SET(state,'6,7,8') GROUP BY driverId) as ot5 on ot5.driverId = dd.id
        LEFT JOIN (SELECT SUM(orderMoney) as money,driverId FROM t_order_cross_city where FIND_IN_SET(state,'6,7,8') GROUP BY driverId) as ot6 on ot6.driverId = dd.id
        LEFT JOIN (select COUNT(id) as inviteNumber,inviteUserId from t_invite  where userType =2 GROUP BY inviteUserId)as ti on ti.inviteUserId = dd.id
        ) as o
        <where>
            o.flag != 3
@@ -392,4 +394,19 @@
        )
        and id in (select driverId from t_driver_orders where `type` = #{type})
    </select>
    <select id="inviteList" resultType="java.util.Map">
        select t1.*,t2.phone,t2.avatar,t2.nickName from t_invite t1
        left join t_user t2 on t2.id = t1.userId
        where 1=1
        <if test="null != uid">
            and t1.inviteUserId = #{uid}
        </if>
        <if test="inviteName != null and inviteName != ''">
            and t2.nickName  LIKE CONCAT('%',#{inviteName},'%')
        </if>
        <if test="null != startTime and null != endTime">
            and t1.registerTime between #{startTime} and #{endTime}
        </if>
        order by t1.registerTime desc
    </select>
</mapper>