ibatis中iterat详解

 
 

传入的参数:  Map param = new HashMap();
  param.put("channelCode", channelCode);
  param.put("ihList", ihList);

 

<select id="queryHotelByHotelids" resultClass="com.fangcang.hotel.delivery.qunar.entity.QunarHotel"
  parameterClass="java.util.HashMap">
       select id,hotelid as hotelId   from t_qunar_hotel t 
       where  channelcode=#channelCode# 
       and hotelid in <iterate  property="ihList" conjunction="," close=")" open="(" > #ihList[].id# </iterate>
    
 </select>

你可能感兴趣的:(ibatis中iterat详解)