|
|
@@ -206,10 +206,14 @@
|
|
|
<select id="selectListByVoyageId" resultType="com.yc.ship.module.trade.dal.dataobject.order.TradeVisitorDO">
|
|
|
select tv.*,if(pprmt.total_num >=2 and pprmt.enable_share=0,1,0) as isHaveTogethers,if(pprmt.total_num =1 and pprmt.enable_share=0,1,0) as isAlone
|
|
|
from trade_visitor tv
|
|
|
- join trade_order to1 on tv.order_id=to1.id
|
|
|
- join trade_order_room_model torm on tv.room_index_id=torm.room_index_id
|
|
|
- join product_price_room_model_type pprmt on torm.room_model_type_id = pprmt.id
|
|
|
+ join trade_order to1 on tv.order_id=to1.id
|
|
|
+ join trade_order_room_model torm on tv.room_index_id=torm.room_index_id
|
|
|
+ join product_price_room_model_type pprmt on torm.room_model_type_id = pprmt.id
|
|
|
where to1.voyage_id=#{voyageId} and to1.order_status=6
|
|
|
+ join trade_order to1 on tv.order_id=to1.id and to1.deleted=0
|
|
|
+ join trade_order_room_model torm on tv.room_index_id=torm.room_index_id and torm.deleted=0
|
|
|
+ join product_price_room_model_type pprmt on torm.room_model_type_id = pprmt.id and pprmt.deleted=0
|
|
|
+ where to1.voyage_id=#{voyageId} and to1.order_status=6 and tv.deleted=0
|
|
|
</select>
|
|
|
|
|
|
<select id="selectListByVoyageIdAndRoomId"
|
|
|
@@ -217,6 +221,7 @@
|
|
|
select tv.*
|
|
|
from trade_visitor tv
|
|
|
join trade_order b on tv.order_id=b.id
|
|
|
+ join trade_order b on tv.order_id=b.id and b.deleted=0
|
|
|
where b.order_status=6 and b.voyage_id=#{voyageId} and if(tv.final_room_id is null,tv.init_room_id,tv.final_room_id)=#{roomId}
|
|
|
</select>
|
|
|
|