|
|
@@ -9,9 +9,12 @@
|
|
|
<result property="deptId" column="dept_id"/>
|
|
|
<result property="userName" column="user_name"/>
|
|
|
<result property="nickName" column="nick_name"/>
|
|
|
+ <result property="realName" column="real_name"/>
|
|
|
<result property="email" column="email"/>
|
|
|
- <result property="phonenumber" column="phonenumber"/>
|
|
|
+ <result property="phone" column="phone"/>
|
|
|
+ <result property="wechat" column="wechat"/>
|
|
|
<result property="sex" column="sex"/>
|
|
|
+ <result property="birthday" column="birthday"/>
|
|
|
<result property="avatar" column="avatar"/>
|
|
|
<result property="password" column="password"/>
|
|
|
<result property="status" column="status"/>
|
|
|
@@ -46,9 +49,9 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectUserVo">
|
|
|
- select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber,
|
|
|
+ select u.user_id, u.dept_id, u.user_name, u.nick_name, u.real_name, u.email, u.avatar, u.phone, u.wechat,
|
|
|
u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time,
|
|
|
- u.remark,
|
|
|
+ u.remark,u.birthday,
|
|
|
d.dept_id, d.parent_id, 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
|
|
|
@@ -58,9 +61,9 @@
|
|
|
</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,
|
|
|
+ select u.user_id, u.dept_id, u.nick_name, u.user_name, u.real_name, u.email, u.avatar, u.phone, u.wechat,
|
|
|
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_name, d.leader from sys_user u
|
|
|
+ u.birthday, u.remark, d.dept_name, d.leader 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">
|
|
|
@@ -72,8 +75,8 @@
|
|
|
<if test="status != null and status != ''">
|
|
|
AND u.status = #{status}
|
|
|
</if>
|
|
|
- <if test="phonenumber != null and phonenumber != ''">
|
|
|
- AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
|
|
+ <if test="phone != null and phone != ''">
|
|
|
+ AND u.phone like concat('%', #{phone}, '%')
|
|
|
</if>
|
|
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
|
AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
@@ -90,7 +93,7 @@
|
|
|
</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,
|
|
|
+ select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.real_name, u.email, u.phone, u.wechat,
|
|
|
u.status, u.create_time
|
|
|
from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
@@ -100,15 +103,15 @@
|
|
|
<if test="userName != null and userName != ''">
|
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
|
</if>
|
|
|
- <if test="phonenumber != null and phonenumber != ''">
|
|
|
- AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
|
|
+ <if test="phone != null and phone != ''">
|
|
|
+ AND u.phone like concat('%', #{phone}, '%')
|
|
|
</if>
|
|
|
<!-- 数据范围过滤 -->
|
|
|
${params.dataScope}
|
|
|
</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,
|
|
|
+ select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.real_name, u.email, u.phone, u.wechat,
|
|
|
u.status, u.create_time
|
|
|
from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
@@ -120,8 +123,8 @@
|
|
|
<if test="userName != null and userName != ''">
|
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
|
</if>
|
|
|
- <if test="phonenumber != null and phonenumber != ''">
|
|
|
- AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
|
|
+ <if test="phone != null and phone != ''">
|
|
|
+ AND u.phone like concat('%', #{phone}, '%')
|
|
|
</if>
|
|
|
<!-- 数据范围过滤 -->
|
|
|
${params.dataScope}
|
|
|
@@ -142,7 +145,7 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
|
|
- select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} limit 1
|
|
|
+ select user_id, phone from sys_user where phone = #{phone} limit 1
|
|
|
</select>
|
|
|
|
|
|
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
|
|
@@ -155,10 +158,13 @@
|
|
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
|
|
<if test="userName != null and userName != ''">user_name,</if>
|
|
|
<if test="nickName != null and nickName != ''">nick_name,</if>
|
|
|
+ <if test="realName != null and realName != ''">real_name,</if>
|
|
|
<if test="email != null and email != ''">email,</if>
|
|
|
<if test="avatar != null and avatar != ''">avatar,</if>
|
|
|
- <if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
|
|
+ <if test="phone != null and phone != ''">phone,</if>
|
|
|
+ <if test="wechat != null and wechat != ''">wechat,</if>
|
|
|
<if test="sex != null and sex != ''">sex,</if>
|
|
|
+ <if test="birthday != null">birthday,</if>
|
|
|
<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>
|
|
|
@@ -169,10 +175,13 @@
|
|
|
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
|
|
<if test="userName != null and userName != ''">#{userName},</if>
|
|
|
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
|
|
+ <if test="realName != null and realName != ''">real_name,</if>
|
|
|
<if test="email != null and email != ''">#{email},</if>
|
|
|
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
|
|
- <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
|
|
+ <if test="phone != null and phone != ''">#{phone},</if>
|
|
|
+ <if test="wechat != null and wechat != ''">wechat,</if>
|
|
|
<if test="sex != null and sex != ''">#{sex},</if>
|
|
|
+ <if test="birthday != null">birthday,</if>
|
|
|
<if test="password != null and password != ''">#{password},</if>
|
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
@@ -187,9 +196,12 @@
|
|
|
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
|
|
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
|
|
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
|
|
+ <if test="realName != null and realName != ''">real_name,</if>
|
|
|
<if test="email != null ">email = #{email},</if>
|
|
|
- <if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
|
|
+ <if test="phone != null ">phone = #{phone},</if>
|
|
|
+ <if test="wechat != null and wechat != ''">wechat,</if>
|
|
|
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
|
|
+ <if test="birthday != null">birthday,</if>
|
|
|
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
|
|
<if test="password != null and password != ''">password = #{password},</if>
|
|
|
<if test="status != null and status != ''">status = #{status},</if>
|