SELECT id,name,sex,id_card,file_birth_date,political_landscape,to_second_middle_school_time,current_professional_title,last_degree,on_duty_situation FROM school_teacher_basic_information where del_flag = 0
<iftest="teachingSubject != null "> and teaching_subject = #{teachingSubject}</if>
<iftest="name != null ">
AND name like concat('%', #{name}, '%')
</if>
<iftest="sex != null and sex != ''"> and sex = #{sex}</if>
<iftest="birthDategt != null and birthDate != ''"> and birth_date > #{birthDategt}</if>
<iftest="birthDategtd != null and birthDate != ''"> and birth_date >= #{birthDategtd}</if>
<iftest="birthDatelt != null and birthDate != ''"> and birth_date < #{birthDatelt}</if>
<iftest="birthDateltd != null and birthDate != ''"> and birth_date <= #{birthDateltd}</if>
<iftest="birthDate != null and birthDate != ''"> and birth_date = #{birthDate}</if>
<iftest="politicalLandscape != null "> and political_landscape = #{politicalLandscape}</if>
<iftest="workingHoursgt != null "> and working_hours > #{workingHoursgt}</if>
<iftest="workingHoursgtd != null "> and working_hours >= #{workingHoursgtd}</if>
<iftest="workingHourslt != null "> and working_hours < #{workingHourslt}</if>
<iftest="workingHoursltd != null "> and working_hours <= #{workingHoursltd}</if>
<iftest="workingHours != null "> and working_hours = #{workingHours}</if>
<iftest="currentProfessionalTitle != null ">
and current_professional_title like concat('%', #{currentProfessionalTitle}, '%')
</if>
<iftest="onDutySituation != null "> and on_duty_situation = #{onDutySituation}</if>
<iftest="graduationInstitution1 != null ">
AND CONCAT(IFNULL(c.graduationInstitution1,''),IFNULL(c.graduationInstitution2,''),IFNULL(c.graduationInstitution3,'')) LIKE concat('%',#{graduationInstitution1},'%')}
</if>
<iftest="firstDegree != null ">
AND CONCAT(IFNULL(c.firstDegree,''),IFNULL(c.lastDegree,'')) LIKE concat('%',#{firstDegree},'%')}