publish 2.0.0.rc32

This commit is contained in:
曾文豪
2024-08-13 16:52:08 +08:00
parent d21d84bc87
commit f4f082cc86
16 changed files with 33 additions and 27 deletions

View File

@@ -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>

View File

@@ -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);
}

View File

@@ -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");
}

View File

@@ -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());
}

View File

@@ -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