<selectid="getEmpByConditionTwo"resultType="Emp">
select * from t_emp
<trimprefix="where"suffixOverrides="and"><iftest="empName != null and empName != ''">
emp_name = #{empName} and
</if><iftest="age != null and age != ''">
age = #{age} and
</if><iftest="gender != null and gender != ''">
gender = #{gender}
</if></trim></select>