<selectid="getProductCapitalBookListByIds"resultMap="ProductCapitalBookResultMap">
SELECT
<includerefid="ProductCapitalBook_Column_List"/>
FROM
product_capital_book t1
WHERE 1 = 1
<iftest="booksRequestList!= null and booksRequestList.size() > 0">
and exists (
select 1 from (
<foreachcollection="booksRequestList"item="item"index="index"separator="union all">
select #{item.bookId} as book_id,#{item.productId} as product_id
from dual
</foreach>
) a where a.book_id=t1.book_id and a.product_id = t1.product_id
)
</if></select>