mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 使用 MP 分页工具 重构业务
This commit is contained in:
@ -80,6 +80,35 @@
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
</sql>
|
||||
|
||||
<select id="selectPageUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_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_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="user.userName != null and user.userName != ''">
|
||||
AND u.user_name like concat('%', #{user.userName}, '%')
|
||||
</if>
|
||||
<if test="user.status != null and user.status != ''">
|
||||
AND u.status = #{user.status}
|
||||
</if>
|
||||
<if test="user.phonenumber != null and user.phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{user.phonenumber}, '%')
|
||||
</if>
|
||||
<if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="user.params.endTime != null and user.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="user.deptId != null and user.deptId != 0">
|
||||
AND (u.dept_id = #{user.deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{user.deptId},
|
||||
ancestors) ))
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${user.params.dataScope}
|
||||
</select>
|
||||
|
||||
<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.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
|
||||
|
Reference in New Issue
Block a user