新增临时角色页面
This commit is contained in:
@@ -59,4 +59,10 @@ public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, Sy
|
||||
*/
|
||||
List<SysRole> selectRolesByUserName(String userName);
|
||||
|
||||
/**
|
||||
* 获取当前用户角色对象
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
SysRole getCurrentRole(Long userId);
|
||||
}
|
||||
|
||||
@@ -178,4 +178,14 @@ public interface ISysRoleService {
|
||||
int insertAuthUsers(Long roleId, Long[] userIds);
|
||||
|
||||
void cleanOnlineUserByRole(Long roleId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Long[] selectRoleByName();
|
||||
|
||||
|
||||
SysRole getCurrentRole();
|
||||
|
||||
}
|
||||
|
||||
@@ -440,4 +440,15 @@ public class SysRoleServiceImpl implements ISysRoleService {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long[] selectRoleByName() {
|
||||
return new Long[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysRole getCurrentRole() {
|
||||
|
||||
return baseMapper.getCurrentRole(LoginHelper.getUserId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,4 +67,14 @@
|
||||
WHERE r.del_flag = '0' and u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getCurrentRole" resultMap="SysRoleResult">
|
||||
select distinct r.role_id,
|
||||
r.role_name,
|
||||
r.role_key
|
||||
from sys_role r
|
||||
join sys_user_role sur on sur.role_id = r.role_id
|
||||
where #{userId} = sur.user_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user