|
@@ -24,6 +24,7 @@
|
|
<result column="role_name_" property="roleName" />
|
|
<result column="role_name_" property="roleName" />
|
|
<result column="del_flag_" property="delFlag" />
|
|
<result column="del_flag_" property="delFlag" />
|
|
<result column="tenant_id_" property="tenantId" />
|
|
<result column="tenant_id_" property="tenantId" />
|
|
|
|
+ <result column="employee_type_" property="employeeType" />
|
|
<result column="organ_id_" property="organId" />
|
|
<result column="organ_id_" property="organId" />
|
|
<association property="sysUser" resultMap="com.keao.edu.user.dao.SysUserDao.SysUser"/>
|
|
<association property="sysUser" resultMap="com.keao.edu.user.dao.SysUserDao.SysUser"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
@@ -43,15 +44,18 @@
|
|
<!-- 向数据库增加一条记录 -->
|
|
<!-- 向数据库增加一条记录 -->
|
|
<insert id="insert" parameterType="com.keao.edu.user.entity.Employee" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
<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_,
|
|
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_,organ_id_)
|
|
|
|
|
|
+ certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_,contact_address_,postal_code_,tenant_id_,organ_id_,employee_type_)
|
|
VALUES(#{userId},#{jobNature},#{educationBackground},#{graduateSchool},#{technicalTitles},#{entryDate},#{certificateType},
|
|
VALUES(#{userId},#{jobNature},#{educationBackground},#{graduateSchool},#{technicalTitles},#{entryDate},#{certificateType},
|
|
- #{certificateNum},NOW(),NOW(),#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{tenantId},#{organId})
|
|
|
|
|
|
+ #{certificateNum},NOW(),NOW(),#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{tenantId},#{organId},#{employeeType})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
<update id="update" parameterType="com.keao.edu.user.entity.Employee">
|
|
<update id="update" parameterType="com.keao.edu.user.entity.Employee">
|
|
UPDATE employee
|
|
UPDATE employee
|
|
<set>
|
|
<set>
|
|
|
|
+ <if test="employeeType != null">
|
|
|
|
+ employee_type_ = #{employeeType},
|
|
|
|
+ </if>
|
|
<if test="graduateSchool != null">
|
|
<if test="graduateSchool != null">
|
|
graduate_school_ = #{graduateSchool},
|
|
graduate_school_ = #{graduateSchool},
|
|
</if>
|
|
</if>
|
|
@@ -106,7 +110,7 @@
|
|
</update>
|
|
</update>
|
|
<sql id="employeeQueryPage">
|
|
<sql id="employeeQueryPage">
|
|
<where>
|
|
<where>
|
|
- e.del_flag_ = 0 AND e.user_id_ != #{userId}
|
|
|
|
|
|
+ e.del_flag_ = 0 AND e.user_id_ != #{userId} AND e.employee_type_ = 'EMPLOYEE'
|
|
<if test="search != null and search != ''">
|
|
<if test="search != null and search != ''">
|
|
AND (e.user_id_ = #{search} OR su.phone_ LIKE CONCAT('%',#{search},'%') OR su.real_name_ LIKE CONCAT('%',#{search},'%'))
|
|
AND (e.user_id_ = #{search} OR su.phone_ LIKE CONCAT('%',#{search},'%') OR su.real_name_ LIKE CONCAT('%',#{search},'%'))
|
|
</if>
|
|
</if>
|