|
@@ -23,7 +23,16 @@ 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" />
|
|
|
- <association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
|
|
+ <result property="birthday" column="birthday" />
|
|
|
+ <result property="idCard" column="id_card" />
|
|
|
+ <result property="height" column="height" />
|
|
|
+ <result property="familyAddress" column="family_address" />
|
|
|
+ <result property="politicalStatus" column="political_status" />
|
|
|
+ <result property="hiredate" column="hiredate" />
|
|
|
+ <result property="partyMembershipDate" column="party_membership_date" />
|
|
|
+ <result property="rank" column="rank" />
|
|
|
+ <result property="holdDocuments" column="hold_documents" />
|
|
|
+ <association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
|
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
|
|
</resultMap>
|
|
|
|
|
@@ -49,15 +58,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<sql id="selectUserVo">
|
|
|
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
|
|
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
|
|
- r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
|
|
- from sys_user u
|
|
|
+ r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
|
|
|
+ u.birthday,u.id_card,u.height,u.family_address,u.political_status,u.hiredate,u.party_membership_date,u.rank,u.hold_documents
|
|
|
+ from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
left join sys_user_role ur on u.user_id = ur.user_id
|
|
|
left join sys_role r on r.role_id = ur.role_id
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
- select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
|
|
+ select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader,
|
|
|
+ u.birthday,u.id_card,u.height,u.family_address,u.political_status,u.hiredate,u.party_membership_date,u.rank,u.hold_documents
|
|
|
+ from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
where u.del_flag = '0'
|
|
|
<if test="userId != null and userId != 0">
|
|
@@ -86,8 +98,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
- select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
|
|
- from sys_user u
|
|
|
+ select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time,
|
|
|
+ u.birthday,u.id_card,u.height,u.family_address,u.political_status,u.hiredate,u.party_membership_date,u.rank,u.hold_documents
|
|
|
+ from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
left join sys_user_role ur on u.user_id = ur.user_id
|
|
|
left join sys_role r on r.role_id = ur.role_id
|
|
@@ -103,8 +116,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
- select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
|
|
- from sys_user u
|
|
|
+ select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time,
|
|
|
+ u.birthday,u.id_card,u.height,u.family_address,u.political_status,u.hiredate,u.party_membership_date,u.rank,u.hold_documents
|
|
|
+ from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
left join sys_user_role ur on u.user_id = ur.user_id
|
|
|
left join sys_role r on r.role_id = ur.role_id
|
|
@@ -141,7 +155,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
|
|
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
|
|
|
</select>
|
|
|
-
|
|
|
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
|
|
insert into sys_user(
|
|
|
<if test="userId != null and userId != 0">user_id,</if>
|
|
@@ -155,7 +168,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="password != null and password != ''">password,</if>
|
|
|
<if test="status != null and status != ''">status,</if>
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
- <if test="remark != null and remark != ''">remark,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="birthday!= null">birthday,</if>
|
|
|
+ <if test="idCard!= null">id_card,</if>
|
|
|
+ <if test="height!= null">height,</if>
|
|
|
+ <if test="familyAddress!= null">family_address,</if>
|
|
|
+ <if test="politicalStatus!= null ">political_status,</if>
|
|
|
+ <if test="hiredate!= null ">hiredate,</if>
|
|
|
+ <if test="partyMembershipDate!= null">party_membership_date,</if>
|
|
|
+ <if test="rank!= null">rank,</if>
|
|
|
+ <if test="holdDocuments!= null">hold_documents,</if>
|
|
|
create_time
|
|
|
)values(
|
|
|
<if test="userId != null and userId != ''">#{userId},</if>
|
|
@@ -170,6 +192,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
+ <if test="birthday!= null">#{birthday},</if>
|
|
|
+ <if test="idCard!= null">#{idCard},</if>
|
|
|
+ <if test="height!= null">#{height},</if>
|
|
|
+ <if test="familyAddress!= null">#{familyAddress},</if>
|
|
|
+ <if test="politicalStatus!= null ">#{politicalStatus},</if>
|
|
|
+ <if test="hiredate!= null ">#{hiredate},</if>
|
|
|
+ <if test="partyMembershipDate!= null">#{partyMembershipDate},</if>
|
|
|
+ <if test="rank!= null">#{rank},</if>
|
|
|
+ <if test="holdDocuments!= null">#{holdDocuments},</if>
|
|
|
sysdate()
|
|
|
)
|
|
|
</insert>
|