mybatis xml文件
<select id="searchBid" resultType="com.zk.company.entity.mysql.dao.BidWinNotice">
SELECT bwn.*,bwa.type as type,bwa.name as name,bwa.company_name as companyName FROM bid_win_notice AS bwn LEFT JOIN bid_win_analysis AS bwa ON bwn.id =bwa.id
WHERE bwa.is_check=1
<if test="names !=null">
<foreach collection="names" item="item" separator="OR" open="and (" close=")">
bwa.name LIKE concat('%',#{item},'%')
</foreach>
</if>
<if test="page !=null">
limit #{page.startRow},#{page.limit}
</if>
</select>
mapper文件,输入集合对象就可以