|
|
@@ -1,10 +1,11 @@ |
|
|
|
package com.ningdatech.pmapi.user.util; |
|
|
|
|
|
|
|
import com.ningdatech.basic.auth.AbstractLoginUserUtil; |
|
|
|
import com.ningdatech.pmapi.sys.model.entity.Role; |
|
|
|
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
@@ -19,9 +20,9 @@ public class LoginUserUtil extends AbstractLoginUserUtil { |
|
|
|
} |
|
|
|
|
|
|
|
public static List<Long> getRoleIdList() { |
|
|
|
List<Long> roleIdList = new ArrayList<>(); |
|
|
|
roleIdList.add(1L); |
|
|
|
return roleIdList; |
|
|
|
UserInfoDetails userInfoDetails = loginUserDetail(); |
|
|
|
List<Role> userRoleList = userInfoDetails.getUserRoleList(); |
|
|
|
return userRoleList.stream().map(Role::getId).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
} |