|
|
@@ -180,9 +180,19 @@
|
|
|
</select>
|
|
|
|
|
|
<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
|
|
|
+ where to1.voyage_id=#{voyageId} and to1.order_status=6
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectListByVoyageIdAndRoomId"
|
|
|
+ resultType="com.yc.ship.module.trade.dal.dataobject.order.TradeVisitorDO">
|
|
|
select tv.*
|
|
|
from trade_visitor tv
|
|
|
- join trade_order to1 on tv.order_id=to1.id
|
|
|
- where to1.voyage_id=#{voyageId}
|
|
|
+ join trade_order b on tv.order_id=b.id
|
|
|
+ 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>
|
|
|
-</mapper>
|
|
|
+</mapper>
|