分页,数组入参mybatis写法实例
数组入参mybatis查找,模糊查找
mapper.xml:
<select id="pageSearchList" resultType="com.example.domain.stockModel">
select
user_name as username,
mobile as mobile
from stockin_order
<where>
<if test="query.spaceIds!=null and query.spaceIds.size()>0">
and s.space_id in
<foreach collection="query.spaceIds" separator="," index="index" item="spaceId" open="("
close=")">
#{
spaceId}
</foreach>
</if>
<if test="query.sku != null and query.sku !=''">
AND i.sku like concat(