If student_sex = 0, sql is not executed, possibly the empty string is equal to 0 in this conversion.
<if test="student_sex != null and student_sex !=''"> AND student_sex =#{student_sex } </if>
If student_sex = 0, sql is not executed, possibly the empty string is equal to 0 in this conversion.
<if test="student_sex != null and student_sex !=''"> AND student_sex =#{student_sex } </if>