1、 <!--
***一以下在mysql中有点问题
<select id="toSearchBspAccount" parameterType="java.util.Map"
resultType="bspAccount">
select
<include refid="columns" />
from T_BSP_ACCOUNT t
<where>
<if test="code !=null and code !=''">
and t.code LIKE '%'||#{code}||'%'
</if>
<if test="name !=null and name !=''">
or t.name LIKE '%'||#{name}||'%'
</if>
<if test="username !=null and username !=''">
or t.username LIKE '%'||#{username}||'%'
</if>
</where>
</select>
-->
2、 <select id="toSearchBspAccount" parameterType="java.util.Map"
resultType="bspAccount">
select id,code,lastmodificationdate,name,password,username from T_BSP_ACCOUNT
<where>
<if test="code !=null and code !=''">
and code LIKE concat(concat('%',#{code}),'%')
</if>
<if test="name !=null and name !=''">
or name LIKE concat(concat('%',#{name}),'%')
</if>
<if test="username !=null and username !=''">
or username LIKE concat(concat('%',#{username}),'%')
</if>
</where>
</select>