|
|
@@ -5,6 +5,7 @@ import com.hz.pm.api.sys.model.entity.Role; |
|
|
|
import com.hz.pm.api.user.model.enumeration.RoleEnum; |
|
|
|
import com.hz.pm.api.user.security.model.UserInfoDetails; |
|
|
|
|
|
|
|
import java.util.Collections; |
|
|
|
import java.util.List; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
@@ -26,6 +27,9 @@ public class LoginUserUtil extends AbstractLoginUserUtil { |
|
|
|
public static List<Long> getRoleIdList() { |
|
|
|
UserInfoDetails userInfoDetails = loginUserDetail(); |
|
|
|
List<Role> userRoleList = userInfoDetails.getUserRoleList(); |
|
|
|
if (userRoleList == null) { |
|
|
|
return Collections.emptyList(); |
|
|
|
} |
|
|
|
return userRoleList.stream().map(Role::getId).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|