list判断

<if test="filterNames!=null and filterNames.size()>0">

</if>


foreach

<foreach collection="filterNames" item="v" separator="," open="(" close=")">
#{v}
</foreach>

like

方式一:

<foreach collection="filterNames" item="v" separator=" " open="" close="">
and ii.chmc not like in concat(concat('%',#{v}),'%')
</foreach>



方式二:

<select id="selectUser">
<bind name="busername" value="'%' + username + '%'" />
select * from account
where username LIKE #{busername}
</select>