|
@@ -33,34 +33,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="remark" column="remark" />
|
|
|
+
|
|
|
+ <result property="schoolId" column="schoolId" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTeacherInfoVo">
|
|
|
- select id, teacher_id, name, sex, age, phone, professional, id_card, height, weight, blood_type, political_status, graduation_photo, degree_photo, teaching_photo, professional_photo, identification_photo, entrance_permit, address,on_board_time,job_time, create_by, create_time, update_by, update_time, remark from teacher_info
|
|
|
+ select id, teacher_id, name, sex, age, phone, professional, id_card, height, weight, blood_type, political_status, graduation_photo, degree_photo,
|
|
|
+ teaching_photo, professional_photo, identification_photo, entrance_permit, address,on_board_time,job_time, create_by, create_time,
|
|
|
+ update_by, update_time, remark from teacher_info
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTeacherInfoList" parameterType="TeacherInfo" resultMap="TeacherInfoResult">
|
|
|
- <include refid="selectTeacherInfoVo"/>
|
|
|
+ select ANY_VALUE(t.id) as id, ANY_VALUE(t.teacher_id) as teacher_id, ANY_VALUE(t.name) as name, ANY_VALUE(t.sex) as sex,
|
|
|
+ ANY_VALUE(t.age) as age, ANY_VALUE(t.phone) as phone, ANY_VALUE(t.professional) as professional, ANY_VALUE(t.id_card) as id_card,
|
|
|
+ ANY_VALUE(t.height) as height, ANY_VALUE(t.weight) as weight, ANY_VALUE(t.blood_type) as blood_type, ANY_VALUE(t.political_status) as political_status,
|
|
|
+ ANY_VALUE(t.graduation_photo) as graduation_photo, ANY_VALUE(t.degree_photo) as degree_photo,
|
|
|
+ ANY_VALUE(t.teaching_photo) as teaching_photo, ANY_VALUE(t.professional_photo) as professional_photo, ANY_VALUE(t.identification_photo) as identification_photo,
|
|
|
+ ANY_VALUE(t.entrance_permit) as entrance_permit, ANY_VALUE(t.address) as address,ANY_VALUE(t.on_board_time) as on_board_time,ANY_VALUE(t.job_time) as job_time,
|
|
|
+ ANY_VALUE(t.create_by) as create_by, ANY_VALUE(t.create_time) as create_time,
|
|
|
+ ANY_VALUE(t.update_by) as update_by, ANY_VALUE(t.update_time) as update_time, ANY_VALUE(t.remark) as remark
|
|
|
+ from teacher_info t
|
|
|
+ left join formal_teacher_class f on t.teacher_id = f.teacher_id
|
|
|
<where>
|
|
|
- <if test="teacherId != null "> and teacher_id = #{teacherId}</if>
|
|
|
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
- <if test="sex != null and sex != ''"> and sex = #{sex}</if>
|
|
|
- <if test="age != null and age != ''"> and age = #{age}</if>
|
|
|
- <if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
- <if test="professional != null and professional != ''"> and professional = #{professional}</if>
|
|
|
- <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
|
|
|
- <if test="height != null and height != ''"> and height = #{height}</if>
|
|
|
- <if test="weight != null and weight != ''"> and weight = #{weight}</if>
|
|
|
- <if test="bloodType != null and bloodType != ''"> and blood_type = #{bloodType}</if>
|
|
|
- <if test="politicalStatus != null and politicalStatus != ''"> and political_status = #{politicalStatus}</if>
|
|
|
- <if test="graduationPhoto != null and graduationPhoto != ''"> and graduation_photo = #{graduationPhoto}</if>
|
|
|
- <if test="degreePhoto != null and degreePhoto != ''"> and degree_photo = #{degreePhoto}</if>
|
|
|
- <if test="teachingPhoto != null and teachingPhoto != ''"> and teaching_photo = #{teachingPhoto}</if>
|
|
|
- <if test="professionalPhoto != null and professionalPhoto != ''"> and professional_photo = #{professionalPhoto}</if>
|
|
|
- <if test="identificationPhoto != null and identificationPhoto != ''"> and identification_photo = #{identificationPhoto}</if>
|
|
|
- <if test="entrancePermit != null and entrancePermit != ''"> and entrance_permit = #{entrancePermit}</if>
|
|
|
- <if test="address != null and address != ''"> and address = #{address}</if>
|
|
|
+ <if test="teacherId != null "> and t.teacher_id = #{teacherId}</if>
|
|
|
+ <if test="name != null and name != ''"> and t.name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="sex != null and sex != ''"> and t.sex = #{sex}</if>
|
|
|
+ <if test="age != null and age != ''"> and t.age = #{age}</if>
|
|
|
+ <if test="phone != null and phone != ''"> and t.phone = #{phone}</if>
|
|
|
+ <if test="professional != null and professional != ''"> and t.professional = #{professional}</if>
|
|
|
+ <if test="idCard != null and idCard != ''"> and t.id_card = #{idCard}</if>
|
|
|
+ <if test="height != null and height != ''"> and t.height = #{height}</if>
|
|
|
+ <if test="weight != null and weight != ''"> and t.weight = #{weight}</if>
|
|
|
+ <if test="bloodType != null and bloodType != ''"> and t.blood_type = #{bloodType}</if>
|
|
|
+ <if test="politicalStatus != null and politicalStatus != ''"> and t.political_status = #{politicalStatus}</if>
|
|
|
+ <if test="graduationPhoto != null and graduationPhoto != ''"> and t.graduation_photo = #{graduationPhoto}</if>
|
|
|
+ <if test="degreePhoto != null and degreePhoto != ''"> and t.degree_photo = #{degreePhoto}</if>
|
|
|
+ <if test="teachingPhoto != null and teachingPhoto != ''"> and t.teaching_photo = #{teachingPhoto}</if>
|
|
|
+ <if test="professionalPhoto != null and professionalPhoto != ''"> and t.professional_photo = #{professionalPhoto}</if>
|
|
|
+ <if test="identificationPhoto != null and identificationPhoto != ''"> and t.identification_photo = #{identificationPhoto}</if>
|
|
|
+ <if test="entrancePermit != null and entrancePermit != ''"> and t.entrance_permit = #{entrancePermit}</if>
|
|
|
+ <if test="address != null and address != ''"> and t.address = #{address}</if>
|
|
|
+ <if test="schoolId != null and schoolId != ''"> and f.school_id = #{schoolId}</if>
|
|
|
</where>
|
|
|
+ group by teacher_id
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTeacherInfoById" parameterType="Long" resultMap="TeacherInfoResult">
|