mybaits in
mybatis中的in:
<select id="getByInventoryIds" resultMap="beanMap"> SELECT * FROM <include refid="t_onsale_resource" /> <where> inventory_id in <foreach collection="inventoryIds" item="item" index="index" open="(" separator="," close=")"> #{item} </foreach> </where> </select>
dao层:
List<OnSaleResource> getByInventoryIds(@Param("inventoryIds") List<Long> inventoryIds);
弱水_穿云天