<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yc.ship.module.trade.dal.mysql.order.TradeOrderRoomModelMapper">


    <select id="selectListByOrderId" resultType="com.yc.ship.module.trade.dal.dataobject.order.TradeOrderRoomModelDO">
        select t1.id,t1.order_id,t1.order_no,t1.room_model_id,t2.short_name room_model_name,t1.floor,t1.original_price,t1.discount,t1.unit_price,t1.real_money,t1.use_room_num,t1.country_plus_amount,t1.country_plus_num,t1.adult_take_num,t1.adult_plus_num,t1.child_non_take_num,t1.child_take_num,t1.child_plus_num,t1.baby_non_take_num,t1.baby_take_num,t1.baby_plus_num,t1.floor_price,t1.floor_num,t1.room_model_type_id,t1.tenant_id,t1.creator,t1.create_time,t1.update_time,t1.deleted,t1.room_index_id from trade_order_room_model t1 inner join resource_room_model t2 on t1.room_model_id = t2.id
        where t1.deleted =0 and t1.order_id = #{orderId}
    </select>

    <select id="selectListByOrderIds" resultType="com.yc.ship.module.trade.dal.dataobject.order.TradeOrderRoomModelDO">
        select t1.id,t1.order_id,t1.order_no,t1.room_model_id,t2.short_name room_model_name,t1.floor,t1.original_price,t1.discount,t1.unit_price,t1.real_money,t1.use_room_num,t1.country_plus_amount,t1.country_plus_num,t1.adult_take_num,t1.adult_plus_num,t1.child_non_take_num,t1.child_take_num,t1.child_plus_num,t1.baby_non_take_num,t1.baby_take_num,t1.baby_plus_num,t1.floor_price,t1.floor_num,t1.room_model_type_id,t1.tenant_id,t1.creator,t1.create_time,t1.update_time,t1.deleted,t1.room_index_id from trade_order_room_model t1 inner join resource_room_model t2 on t1.room_model_id = t2.id
        where t1.deleted =0 and t1.order_id in
        <foreach item="item" collection="orderIds" separator="," open="(" close=")" index="index">
            #{item}
        </foreach>

    </select>


</mapper>