From 92480c7fd17a6bf89205ffcf4b78eef17988f0d5 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 01 八月 2025 19:22:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml
index 27d4230..c593fd3 100644
--- a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml
+++ b/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>

--
Gitblit v1.7.1