|
@@ -24,6 +24,7 @@
|
|
|
<result column="role_name_" property="roleName" />
|
|
|
<result column="del_flag_" property="delFlag" />
|
|
|
<result column="tenant_id_" property="tenantId" />
|
|
|
+ <result column="organ_id_" property="organId" />
|
|
|
<association property="sysUser" resultMap="com.keao.edu.user.dao.SysUserDao.SysUser"/>
|
|
|
</resultMap>
|
|
|
|
|
@@ -40,55 +41,59 @@
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.keao.edu.user.entity.Employee" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
INSERT INTO employee (user_id_,job_nature_,education_background_,graduate_school_,technical_titles_,entry_date_,
|
|
|
- certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_,contact_address_,postal_code_,tenant_id_)
|
|
|
+ certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_,contact_address_,postal_code_,tenant_id_,organ_id_)
|
|
|
VALUES(#{userId},#{jobNature},#{educationBackground},#{graduateSchool},#{technicalTitles},#{entryDate},#{certificateType},
|
|
|
- #{certificateNum},#{updateTime},#{createTime},#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{tenantId})
|
|
|
+ #{certificateNum},NOW(),NOW(),#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{tenantId},#{organId})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<update id="update" parameterType="com.keao.edu.user.entity.Employee">
|
|
|
- UPDATE employee <set>
|
|
|
- <if test="graduateSchool != null">
|
|
|
- graduate_school_ = #{graduateSchool},
|
|
|
- </if>
|
|
|
- <if test="introduction != null">
|
|
|
- introduction_ = #{introduction},
|
|
|
- </if>
|
|
|
- <if test="postalCode != null">
|
|
|
- postal_code_ = #{postalCode},
|
|
|
- </if>
|
|
|
- <if test="technicalTitles != null">
|
|
|
- technical_titles_ = #{technicalTitles},
|
|
|
- </if>
|
|
|
- <if test="entryDate != null">
|
|
|
- entry_date_ = #{entryDate},
|
|
|
- </if>
|
|
|
- <if test="contactAddress != null">
|
|
|
- contact_address_ = #{contactAddress},
|
|
|
- </if>
|
|
|
- <if test="jobNature != null">
|
|
|
- job_nature_ = #{jobNature},
|
|
|
- </if>
|
|
|
- <if test="userId != null">
|
|
|
- user_id_ = #{userId},
|
|
|
- </if>
|
|
|
- <if test="certificateType != null">
|
|
|
- certificate_type_ = #{certificateType},
|
|
|
- </if>
|
|
|
- <if test="educationBackground != null">
|
|
|
- education_background_ = #{educationBackground},
|
|
|
- </if>
|
|
|
- <if test="certificateNum != null">
|
|
|
- certificate_num_ = #{certificateNum},
|
|
|
- </if>
|
|
|
- <if test="demissionDate != null">
|
|
|
- demission_date_ = #{demissionDate},
|
|
|
- </if>
|
|
|
- <if test="tenantId != null">
|
|
|
- tenant_id_=#{tenantId},
|
|
|
- </if>
|
|
|
- update_time_ = NOW()
|
|
|
- </set> WHERE user_id_ = #{userId}
|
|
|
+ UPDATE employee
|
|
|
+ <set>
|
|
|
+ <if test="graduateSchool != null">
|
|
|
+ graduate_school_ = #{graduateSchool},
|
|
|
+ </if>
|
|
|
+ <if test="introduction != null">
|
|
|
+ introduction_ = #{introduction},
|
|
|
+ </if>
|
|
|
+ <if test="postalCode != null">
|
|
|
+ postal_code_ = #{postalCode},
|
|
|
+ </if>
|
|
|
+ <if test="technicalTitles != null">
|
|
|
+ technical_titles_ = #{technicalTitles},
|
|
|
+ </if>
|
|
|
+ <if test="entryDate != null">
|
|
|
+ entry_date_ = #{entryDate},
|
|
|
+ </if>
|
|
|
+ <if test="contactAddress != null">
|
|
|
+ contact_address_ = #{contactAddress},
|
|
|
+ </if>
|
|
|
+ <if test="jobNature != null">
|
|
|
+ job_nature_ = #{jobNature},
|
|
|
+ </if>
|
|
|
+ <if test="userId != null">
|
|
|
+ user_id_ = #{userId},
|
|
|
+ </if>
|
|
|
+ <if test="certificateType != null">
|
|
|
+ certificate_type_ = #{certificateType},
|
|
|
+ </if>
|
|
|
+ <if test="educationBackground != null">
|
|
|
+ education_background_ = #{educationBackground},
|
|
|
+ </if>
|
|
|
+ <if test="certificateNum != null">
|
|
|
+ certificate_num_ = #{certificateNum},
|
|
|
+ </if>
|
|
|
+ <if test="demissionDate != null">
|
|
|
+ demission_date_ = #{demissionDate},
|
|
|
+ </if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ tenant_id_=#{tenantId},
|
|
|
+ </if>
|
|
|
+ <if test="organId != null">
|
|
|
+ organ_id_=#{organId},
|
|
|
+ </if>
|
|
|
+ update_time_ = NOW()
|
|
|
+ </set> WHERE user_id_ = #{userId}
|
|
|
</update>
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
|
<update id="delete" >
|