教师信息表添加4个字段:头像地址avatar,所属专业major,主讲课程courses,从教时间start_teaching
This commit is contained in:
1 parent
989f549c5a
commit
f97cb35b6f
2 files changed
+62
-1
No files matched your search
@@ -60,6 +60,15 @@ public class TrainTeacher extends BaseEntity
|
||||
/** 删除标志 (0:存在, 2:删除) */
|
||||
private String delFlag;
|
||||
|
||||
private String avatar;
|
||||
|
||||
private String major;
|
||||
|
||||
private String courses;
|
||||
|
||||
private Date startTeaching;
|
||||
|
||||
|
||||
public void settId(String tId)
|
||||
{
|
||||
this.tId = tId;
|
||||
@@ -180,6 +189,38 @@ public class TrainTeacher extends BaseEntity
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getMajor() {
|
||||
return major;
|
||||
}
|
||||
|
||||
public void setMajor(String major) {
|
||||
this.major = major;
|
||||
}
|
||||
|
||||
public String getCourses() {
|
||||
return courses;
|
||||
}
|
||||
|
||||
public void setCourses(String courses) {
|
||||
this.courses = courses;
|
||||
}
|
||||
|
||||
public Date getStartTeaching() {
|
||||
return startTeaching;
|
||||
}
|
||||
|
||||
public void setStartTeaching(Date startTeaching) {
|
||||
this.startTeaching = startTeaching;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@@ -199,6 +240,10 @@ public class TrainTeacher extends BaseEntity
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("avatar", getAvatar())
|
||||
.append("major", getMajor())
|
||||
.append("courses", getCourses())
|
||||
.append("startTeaching", getStartTeaching())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -21,10 +21,14 @@ 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="avatar" column="avatar" />
|
||||
<result property="major" column="major" />
|
||||
<result property="courses" column="courses" />
|
||||
<result property="startTeaching" column="start_teaching" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTrainTeacherVo">
|
||||
select t_id, t_name, t_gender, t_birth, user_id, org_name, job_title, t_phone, t_email, status, del_flag, create_by, create_time, update_by, update_time, remark from train_teacher
|
||||
select t_id, t_name, t_gender, t_birth, user_id, org_name, job_title, t_phone, t_email, status, del_flag, create_by, create_time, update_by, update_time, remark, avatar, major, courses, start_teaching from train_teacher
|
||||
</sql>
|
||||
|
||||
<select id="selectTrainTeacherList" parameterType="TrainTeacher" resultMap="TrainTeacherResult">
|
||||
@@ -72,6 +76,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="avatar != null">avatar,</if>
|
||||
<if test="major != null">major,</if>
|
||||
<if test="courses != null">courses,</if>
|
||||
<if test="startTeaching != null">start_teaching,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tId != null">#{tId},</if>
|
||||
@@ -90,6 +98,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="avatar != null">#{avatar},</if>
|
||||
<if test="major != null">#{major},</if>
|
||||
<if test="courses != null">#{courses},</if>
|
||||
<if test="startTeaching != null">#{startTeaching},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -108,6 +120,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="avatar != null">avatar = #{avatar},</if>
|
||||
<if test="major != null">major = #{major},</if>
|
||||
<if test="courses != null">courses = #{courses},</if>
|
||||
<if test="startTeaching != null">start_teaching = #{startTeaching},</if>
|
||||
</trim>
|
||||
where t_id = #{tId} and del_flag = '0'
|
||||
</update>
|
||||
|
||||
Reference in new issue
Block a user