|
|
@@ -1346,6 +1346,11 @@
|
|
|
where t1.order_no = #{orderNo}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getTotalPayByOrderNo" resultType="java.math.BigDecimal">
|
|
|
+ select sum(t2.pay_amount) from trade_order t1 inner join trade_order_pay t2 on t1.id = t2.order_id
|
|
|
+ where t1.order_no = #{orderNo} and t2.pay_status = 1
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getCheckOrder" resultType="com.yc.ship.module.trade.controller.admin.order.vo.order.TradeOrderRespVO">
|
|
|
SELECT td.id,td.order_no,td.external_order_no,td.route_plan_id,td.travel_status,plan.name as route_plan_name,td.visitor_type,td.travel_date,
|
|
|
td.sell_method,td.source_name,td.seller_id,td.member_id,td.amount,td.pay_amount,td.order_status,
|
|
|
@@ -1887,20 +1892,30 @@
|
|
|
</select>
|
|
|
<select id="selectConfirmationCountry"
|
|
|
resultType="com.yc.ship.module.trade.controller.admin.order.vo.order.TradeOrderConfirmationCountryRespVO">
|
|
|
- select t1.actual_price,
|
|
|
- t2.room_model_id,
|
|
|
- t3.short_name room_model_short_name,
|
|
|
- t3.name room_model_name,t2.type,
|
|
|
- ifnull(t2.nationality,1) nationality,
|
|
|
- t2.floor,ifnull(t4.name, '中国') nationality_name,
|
|
|
- count(t1.id) num
|
|
|
- from trade_detail t1
|
|
|
- LEFT JOIN trade_visitor t2 on t1.visitor_id = t2.id
|
|
|
- LEFT JOIN resource_room_model t3 on t2.room_model_id = t3.id
|
|
|
- LEFT JOIN area t4 on t2.nationality = t4.id
|
|
|
- where t1.order_id = #{orderId} and t1.product_type = 0 and t1.deleted = 0 and t2.deleted = 0 and t3.deleted = 0
|
|
|
- GROUP BY t2.room_model_id, t2.floor, t2.type
|
|
|
- ORDER BY floor desc
|
|
|
+ SELECT
|
|
|
+ t1.real_money actual_price,
|
|
|
+ t1.room_model_id,
|
|
|
+ t2.short_name room_model_short_name,
|
|
|
+ t2.NAME room_model_name,
|
|
|
+ t3.type,
|
|
|
+ ifnull( t3.nationality, 1 ) nationality,
|
|
|
+ t3.floor,
|
|
|
+ IFNULL( t4.`name`, '中国' ) nationality_name,
|
|
|
+ count( t3.id ) num
|
|
|
+ FROM
|
|
|
+ trade_order_room_model t1
|
|
|
+ LEFT JOIN resource_room_model t2 ON t1.room_model_id = t2.id
|
|
|
+ LEFT JOIN trade_visitor t3 ON t1.room_index_id = t3.room_index_id
|
|
|
+ LEFT JOIN area t4 ON t3.nationality = t4.id
|
|
|
+ WHERE
|
|
|
+ t1.order_id = 2031362252762136577
|
|
|
+ AND t1.deleted = 0
|
|
|
+ GROUP BY
|
|
|
+ t1.room_model_id,
|
|
|
+ t1.floor,
|
|
|
+ t3.type
|
|
|
+ ORDER BY
|
|
|
+ floor DESC
|
|
|
</select>
|
|
|
|
|
|
<select id="getOrderCount" resultType="java.util.Map">
|