用包含关系模糊匹配,比如传入数组【1,2,3】,模糊匹配该字段包含1或者2或者3的
动态sql:重点是(separator=" or ")连接sql
select count(*)
from demo_result
where 1=1
<if test="deviceInfoList !=null ">
and
<foreach item="deviceInfo" collection="deviceInfoList" open="(" separator=" or " close=")">
device_info like CONCAT('%',#{deviceInfo},'%')
</foreach>
</if>