| | |
| | | |
| | | <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 |
| | |
| | | <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 |
| | |
| | | <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 |
| | |
| | | </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 |
| | | |
| | |
| | | <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> |
| | |
| | | </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} |
| | |
| | | <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> |