|
|
@@ -1083,9 +1083,19 @@
|
|
|
SELECT tr.*,td.order_no, ou.mobile,td.travel_date, ou.contact_name ,tdl.product_name
|
|
|
FROM trade_refund tr
|
|
|
INNER JOIN trade_order td on tr.order_id = td.id
|
|
|
+ inner join product_voyage pv on td.voyage_id = pv.id
|
|
|
inner join trade_order_user ou on ou.order_id = td.id
|
|
|
INNER JOIN trade_detail tdl on td.id = tdl.order_id and tdl.deleted = 0
|
|
|
where 1= 1
|
|
|
+ <if test="vo.shipId != null and vo.shipId != ''">
|
|
|
+ AND td.ship_id = #{vo.shipId}
|
|
|
+ </if>
|
|
|
+ <if test="vo.voyageId != null and vo.voyageId != ''">
|
|
|
+ AND td.voyage_id = #{vo.voyageId}
|
|
|
+ </if>
|
|
|
+ <if test="vo.routeId != null and vo.routeId != ''">
|
|
|
+ AND pv.route_id = #{vo.routeId}
|
|
|
+ </if>
|
|
|
<if test="vo.orderNo != null and vo.orderNo != ''">
|
|
|
AND td.order_no = #{vo.orderNo}
|
|
|
</if>
|
|
|
@@ -1419,7 +1429,17 @@
|
|
|
left join trade_order_pay top on trr.order_pay_id = top.id
|
|
|
left join trade_refund tr on trr.refund_id = tr.id
|
|
|
left join trade_order td on td.id = top.order_id
|
|
|
+ left join product_voyage pv on td.voyage_id = pv.id
|
|
|
where 1= 1
|
|
|
+ <if test="vo.shipId != null and vo.shipId != ''">
|
|
|
+ AND td.ship_id = #{vo.shipId}
|
|
|
+ </if>
|
|
|
+ <if test="vo.voyageId != null and vo.voyageId != ''">
|
|
|
+ AND td.voyage_id = #{vo.voyageId}
|
|
|
+ </if>
|
|
|
+ <if test="vo.routeId != null and vo.routeId != ''">
|
|
|
+ AND pv.route_id = #{vo.routeId}
|
|
|
+ </if>
|
|
|
<if test="vo.orderNo != null and vo.orderNo != ''">
|
|
|
AND td.order_no = #{vo.orderNo}
|
|
|
</if>
|