<select id="selectByOrderIds" resultType="tbb.org.model.OrderDishes">
select * from order_dishes where
<if test="idList != null and idList.size() > 0">
order_id in (
<foreach collection="idList" item="ids" separator=",">
#{ids}
</foreach>
)
</if>
</select>
mybatis中使用in查询多个id对应的数据
最新推荐文章于 2024-04-30 16:27:04 发布