<!--根据部门名字模糊查询部门信息-->
<select id="selectDeptList" resultMap="BaseResultMap">
select * from sys_dept
<where>
<if test=" deptName!=null and deptName!='' ">
deptName like '%${deptName}%'
</if>
</where>
order by id
</select>
记录下查询语句
${xxx}:不带引号
#{xxx}:带引号