_parameter:代表整个参数
- 单个参数:_parameter就是这个参数
<!--当使用@Param("employee")修饰变量后,就不能在使用"_parameter",可以使用employee或param1来获取变量中的值-->
<!--public List<Employee> getEmployeeTestInnerParameter(@Param("employee") Employee employee);-->
<select id="getEmployeeTestInnerParameter3" resultType="com.ll.mybatis.entity.Employee">
select id, last_name, email, gender
from tbl_employee
<if test="employee != null">
<!--<if test="_parameter!=null">-->
<where>
<if test="employee.lastName!=null">
last_name=#{employee.lastName}
</if>
<if test="employee.email!=null">
and email=#{employee.email}
</if>
</where>
</if>
</select>
下面是错误写法
<!--public