根据角色搜索用户
This commit is contained in:
parent
c1203d103d
commit
1658216f71
|
|
@ -137,6 +137,11 @@ public class SysUser extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private Long[] roleIds;
|
private Long[] roleIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色权限
|
||||||
|
*/
|
||||||
|
private String roleKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位组
|
* 岗位组
|
||||||
*/
|
*/
|
||||||
|
|
@ -350,6 +355,14 @@ public class SysUser extends BaseEntity {
|
||||||
this.roleIds = roleIds;
|
this.roleIds = roleIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRoleKey() {
|
||||||
|
return roleKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoleKey(String roleKey) {
|
||||||
|
this.roleKey = roleKey;
|
||||||
|
}
|
||||||
|
|
||||||
public Long[] getPostIds() {
|
public Long[] getPostIds() {
|
||||||
return postIds;
|
return postIds;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -152,11 +152,8 @@
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="roles != null and roles.size() > 0">
|
<if test="roleKey != null and roleKey != ''">
|
||||||
and r.role_key in
|
and r.role_key like concat('%', #{roleKey}, '%')
|
||||||
<foreach collection="roles" item="item" index="index" separator="," open="(" close=")">
|
|
||||||
#{item.roleKey}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
</if>
|
||||||
<include refid="com.bonus.system.mapper.DataScopeMapper.dataScopeFilter"/>
|
<include refid="com.bonus.system.mapper.DataScopeMapper.dataScopeFilter"/>
|
||||||
GROUP BY u.user_id
|
GROUP BY u.user_id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue