【system】更新用户查询的问题

pull/3/head
fengshuonan 2020-12-21 22:54:54 +08:00
parent e9f97873ee
commit 115a8ae8b7
2 changed files with 25 additions and 14 deletions

View File

@ -4,14 +4,25 @@
<!--获取用户分页列表--> <!--获取用户分页列表-->
<select id="findUserPage" resultType="cn.stylefeng.roses.kernel.system.modular.user.pojo.response.SysUserResponse"> <select id="findUserPage" resultType="cn.stylefeng.roses.kernel.system.modular.user.pojo.response.SysUserResponse">
select sys_user.*, select
sys_employee.employeeNo, suser.user_id as userId,
sys_employee.organization_id, suser.account as account,
from sys_user suser.nick_name as nickName,
left join sys_employee on sys_user.id = sys_employee.user_id suser.real_name as realName,
suser.avatar as avatar,
suser.birthday as birthday,
suser.sex as sex,
suser.email as email,
suser.phone as phone,
suser.tel as tel,
suser.status_flag as statusFlag,
suorg.org_id as orgId,
suorg.position_id as positionId
from sys_user suser
left join sys_user_org suorg on suser.user_id = suorg.user_id
<where> <where>
<if test="sysUserRequest.name != null and sysUserRequest.name != ''"> <if test="sysUserRequest.realName != null and sysUserRequest.realName != ''">
and sys_user.name like concat('%',#{sysUserRequest.name},'%') and sys_user.real_name like concat('%',#{sysUserRequest.realName},'%')
</if> </if>
<if test="sysUserRequest.account != null and sysUserRequest.account != ''"> <if test="sysUserRequest.account != null and sysUserRequest.account != ''">
and sys_user.account like concat('%',#{sysUserRequest.account},'%') and sys_user.account like concat('%',#{sysUserRequest.account},'%')
@ -19,11 +30,11 @@
<if test="sysUserRequest.statusFlag != null and sysUserRequest.statusFlag != ''"> <if test="sysUserRequest.statusFlag != null and sysUserRequest.statusFlag != ''">
and sys_user.status_flag like concat('%',#{sysUserRequest.statusFlag},'%') and sys_user.status_flag like concat('%',#{sysUserRequest.statusFlag},'%')
</if> </if>
<if test="sysUserRequest.organizationId != null and sysUserRequest.organizationId != ''"> <if test="sysUserRequest.orgId != null and sysUserRequest.orgId != ''">
and sys_user.organization_id like concat('%',#{sysUserRequest.organizationId},'%') and suorg.org_id = #{sysUserRequest.orgId}
</if> </if>
and sys_user.del_flag = 'N' and suser.del_flag = 'N'
order by create_time desc order by suser.create_time desc
</where> </where>
</select> </select>

View File

@ -17,7 +17,7 @@ public class SysUserResponse {
/** /**
* *
*/ */
private Long id; private Long userId;
/** /**
* *
@ -32,7 +32,7 @@ public class SysUserResponse {
/** /**
* *
*/ */
private String name; private String realName;
/** /**
* *
@ -46,7 +46,7 @@ public class SysUserResponse {
private Date birthday; private Date birthday;
/** /**
* ( 1 2 3) * M-F-
*/ */
private String sex; private String sex;