select
gs.id as goodsId
from table1 gs left join table2 wg on gs.id = wg.goods_id
where
( gs.id, wg.warehouse_id ) in (
<foreach item="item" index="index" collection="wgIdList" separator=",">
(#{item.goodsId},#{item.warehouseId})
</foreach>
)
group by gs.id,wg.warehouse_id
mybatis xml multi-field in batch query
Guess you like
Origin blog.csdn.net/qq_33767353/article/details/125036914
Recommended
Ranking