|
|
@@ -16,6 +16,11 @@
|
|
|
<result column="teacher_entry" property="teacher_entry" jdbcType="DATE" />
|
|
|
<result column="teacher_honor" property="teacher_honor" jdbcType="VARCHAR" />
|
|
|
<result column="teacher_remarks" property="teacher_remarks" jdbcType="VARCHAR" />
|
|
|
+ <result column="teacher_phone" property="teacher_phone" jdbcType="VARCHAR" />
|
|
|
+ <result column="teacher_email" property="teacher_email" jdbcType="VARCHAR" />
|
|
|
+ <result column="teacher_nation" property="teacher_nation" jdbcType="VARCHAR" />
|
|
|
+ <result column="teacher_school" property="teacher_school" jdbcType="VARCHAR" />
|
|
|
+ <result column="teacher_education" property="teacher_education" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
teacher_id, user_id, openid, school_id, teacher_number, teacher_name, teacher_sex,
|
|
|
@@ -26,10 +31,7 @@
|
|
|
teacher_photo, teacher_experience
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
- select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- ,
|
|
|
- <include refid="Blob_Column_List" />
|
|
|
+ select *
|
|
|
from sys_teacher
|
|
|
where teacher_id = #{teacher_id,jdbcType=BIGINT}
|
|
|
</select>
|
|
|
@@ -102,6 +104,21 @@
|
|
|
<if test="teacher_experience != null" >
|
|
|
teacher_experience,
|
|
|
</if>
|
|
|
+ <if test="teacher_phone != null" >
|
|
|
+ teacher_phone,
|
|
|
+ </if>
|
|
|
+ <if test="teacher_email != null" >
|
|
|
+ teacher_email,
|
|
|
+ </if>
|
|
|
+ <if test="teacher_nation != null" >
|
|
|
+ teacher_nation,
|
|
|
+ </if>
|
|
|
+ <if test="teacher_school != null" >
|
|
|
+ teacher_school,
|
|
|
+ </if>
|
|
|
+ <if test="teacher_education != null" >
|
|
|
+ teacher_education,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="user_id != null" >
|
|
|
@@ -149,6 +166,21 @@
|
|
|
<if test="teacher_experience != null" >
|
|
|
#{teacher_experience,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="teacher_phone != null" >
|
|
|
+ #{teacher_phone,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="teacher_email != null" >
|
|
|
+ #{teacher_email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="teacher_nation != null" >
|
|
|
+ #{teacher_nation,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="teacher_school != null" >
|
|
|
+ #{teacher_school,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="teacher_education != null" >
|
|
|
+ #{teacher_education,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.SysTeacher" >
|
|
|
@@ -199,6 +231,21 @@
|
|
|
<if test="teacher_experience != null" >
|
|
|
teacher_experience = #{teacher_experience,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="teacher_phone != null" >
|
|
|
+ teacher_phone = #{teacher_phone,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="teacher_email != null" >
|
|
|
+ teacher_email = #{teacher_email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="teacher_nation != null" >
|
|
|
+ teacher_nation = #{teacher_nation,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="teacher_school != null" >
|
|
|
+ teacher_school = #{teacher_school,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="teacher_education != null" >
|
|
|
+ teacher_education = #{teacher_education,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where teacher_id = #{teacher_id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
@@ -266,4 +313,7 @@ left join sys_clazz on sys_teacher_clazz.clazz_id = sys_clazz.clazz_id
|
|
|
left join sys_grade on sys_grade.grade_id=sys_clazz.grade_id
|
|
|
where sys_teacher_clazz.teacher_id=#{id}
|
|
|
</select>
|
|
|
+ <select id="selectByPhone" resultMap="BaseResultMap">
|
|
|
+ select * from sys_teacher where teacher_phone=#{phone} and school_id=#{school_id}
|
|
|
+ </select>
|
|
|
</mapper>
|