根据角色搜索用户

This commit is contained in:
sxu 2025-03-25 14:39:39 +08:00
parent c1203d103d
commit 1658216f71
2 changed files with 15 additions and 5 deletions

View File

@ -137,6 +137,11 @@ public class SysUser extends BaseEntity {
*/
private Long[] roleIds;
/**
* 角色权限
*/
private String roleKey;
/**
* 岗位组
*/
@ -350,6 +355,14 @@ public class SysUser extends BaseEntity {
this.roleIds = roleIds;
}
public String getRoleKey() {
return roleKey;
}
public void setRoleKey(String roleKey) {
this.roleKey = roleKey;
}
public Long[] getPostIds() {
return postIds;
}

View File

@ -152,11 +152,8 @@
#{item}
</foreach>
</if>
<if test="roles != null and roles.size() > 0">
and r.role_key in
<foreach collection="roles" item="item" index="index" separator="," open="(" close=")">
#{item.roleKey}
</foreach>
<if test="roleKey != null and roleKey != ''">
and r.role_key like concat('%', #{roleKey}, '%')
</if>
<include refid="com.bonus.system.mapper.DataScopeMapper.dataScopeFilter"/>
GROUP BY u.user_id