Pu Zhibing
2025-08-01 92480c7fd17a6bf89205ffcf4b78eef17988f0d5
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml
@@ -264,7 +264,7 @@
    <select id="promotionInfo" resultType="java.util.Map">
select  * from (
        select t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName
        select 1 as type,t1.id orderId,t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName
        from t_order_private_car t1
        LEFT JOIN t_driver_promotion_activity t2 ON t1.promotionActivityId = t2.id
        LEFT JOIN t_driver t3 ON t1.promotionDriverId = t3.id
@@ -288,9 +288,12 @@
        <if test="roleType != null and roleType != '' and roleType != 1">
            and t1.companyId = #{objectId}
        </if>
        <if test="driverId != null ">
            and t1.promotionDriverId =#{driverId}
        </if>
        union all
        select t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName
        select 2 as type,t1.id orderId,t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName
        from t_order_taxi t1
        LEFT JOIN t_driver_promotion_activity t2 ON t1.promotionActivityId = t2.id
        LEFT JOIN t_driver t3 ON t1.promotionDriverId = t3.id
@@ -314,10 +317,13 @@
        <if test="roleType != null and roleType != '' and roleType != 1">
            and t1.companyId = #{objectId}
        </if>
        <if test="driverId != null ">
            and t1.promotionDriverId =#{driverId}
        </if>
        union all
        select t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName
        select 3 as type,t1.id orderId,t1.orderNum,t1.promotionMoney,t1.successTime,t1.payMoney money,t2.activityTitle name,t3.name driverName,t4.nickName userName
        from t_order_cross_city t1
        LEFT JOIN t_driver_promotion_activity t2 ON t1.promotionActivityId = t2.id
        LEFT JOIN t_driver t3 ON t1.promotionDriverId = t3.id
@@ -340,6 +346,9 @@
        </if>
        <if test="roleType != null and roleType != '' and roleType != 1">
            and t1.companyId = #{objectId}
        </if>
        <if test="driverId != null ">
            and t1.promotionDriverId =#{driverId}
        </if>
        ) as t5 order by t5.successTime desc
@@ -367,6 +376,9 @@
        <if test="driverName != null and driverName != ''">
            and t3.name  like CONCAT('%',#{driverName},'%')
        </if>
        <if test="driverId != null ">
            and t1.promotionDriverId =#{driverId}
        </if>
        <if test="roleType != null and roleType != '' and roleType != 1">
            and t1.companyId = #{objectId}
        </if>
@@ -392,6 +404,9 @@
        </if>
        <if test="driverName != null and driverName != ''">
            and t3.name  like CONCAT('%',#{driverName},'%')
        </if>
        <if test="driverId != null ">
            and t1.promotionDriverId =#{driverId}
        </if>
        <if test="roleType != null and roleType != '' and roleType != 1">
            and t1.companyId = #{objectId}
@@ -420,6 +435,9 @@
        <if test="driverName != null and driverName != ''">
            and t3.name  like CONCAT('%',#{driverName},'%')
        </if>
        <if test="driverId != null ">
            and t1.promotionDriverId =#{driverId}
        </if>
        <if test="roleType != null and roleType != '' and roleType != 1">
            and t1.companyId = #{objectId}
        </if>