publish 2.0.0.rc32
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc30</version>
|
||||
<version>2.0.0.rc32</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-role</artifactId>
|
||||
|
||||
@@ -29,7 +29,7 @@ public interface CoreRoleUserMapper extends BaseMapper<CoreRoleUser> {
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<CoreRoleAuthority> getOwnerAuthorityLeafList(@Param("userId") String userId,
|
||||
@Param("roleId") String roleId);
|
||||
List<CoreRoleAuthority> getOwnerAuthorityLeafList(@Param("userId") String userId, @Param("roleId") String roleId,
|
||||
@Param("type") String type);
|
||||
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ public class CoreRoleService extends TsServiceBase<CoreRoleGroupMapper, CoreRole
|
||||
* @return
|
||||
*/
|
||||
public List<CoreRoleAuthority> getOwnerAuthorityLeafList(String userId, String roleId) {
|
||||
return coreRoleUserMapper.getOwnerAuthorityLeafList(userId, roleId);
|
||||
return coreRoleUserMapper.getOwnerAuthorityLeafList(userId, roleId, "bind");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public class RoleAuthorityHandler implements TsAuthorityHandler {
|
||||
@Override
|
||||
public List<String> getAuthorities(TokenBean tokenBean) {
|
||||
List<CoreRoleAuthority> list = coreRoleUserMapper.getOwnerAuthorityLeafList(tokenBean.getId(),
|
||||
tokenBean.getRoleId());
|
||||
tokenBean.getRoleId(), "");
|
||||
return list.stream().map(CoreRoleAuthority::getNo).distinct().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@
|
||||
and cru.user_id = #{userId}
|
||||
and cru.is_deleted = 0
|
||||
and (cru.expire_time is null or cru.expire_time > now())
|
||||
<if test="type != null and type != ''">
|
||||
and crgr.type=#{type}
|
||||
</if>
|
||||
|
||||
<if test="roleId != null and roleId != ''">
|
||||
union
|
||||
@@ -61,6 +64,9 @@
|
||||
select menu_id
|
||||
from core_role_group_rx
|
||||
where group_id = #{roleId}
|
||||
<if test="type != null and type != ''">
|
||||
and type=#{type}
|
||||
</if>
|
||||
</if>
|
||||
)
|
||||
order by sort
|
||||
|
||||
Reference in New Issue
Block a user