<if test=" search !=null and search !='' ">
AND CONCAT(
IFNULL(zsci.clean_name,''),
IFNULL(zsci.clean_standard,''),
IFNULL(zsci.clean_tool,''),
IFNULL(zsci.clean_action,'')
)
LIKE CONCAT('%',#{search},'%')
</if>
concat() 方法 # 号 模糊查询
<if test="name!=null and name!=''">
and t_employee.name like concat('%',#{name},'%')
</if>
<p> </p>
<pre>
<code class="language-xml"><select id="selectlikesnames" parameterType="user" resultType="user">
select * from employee
<where>
<if test="empname!=null and empname!='' ">
and empname like '%${empname}%'
</if>
<if test="salary!=null and salary!='' ">
and salary > ${salary}
</if>
</where>
<select>
</code></pre>
<p> </p>