根据角色搜索用户
This commit is contained in:
parent
c1203d103d
commit
1658216f71
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue