Browse Source

adjust LoginUserUtil

master
liuxinxin 1 year ago
parent
commit
9f46edc9be
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/user/util/LoginUserUtil.java

+ 5
- 4
pmapi/src/main/java/com/ningdatech/pmapi/user/util/LoginUserUtil.java View File

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

}

Loading…
Cancel
Save