Bladeren bron

adjust LoginUserUtil

master
liuxinxin 1 jaar geleden
bovenliggende
commit
9f46edc9be
1 gewijzigde bestanden met toevoegingen van 5 en 4 verwijderingen
  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 Bestand weergeven

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

}

Laden…
Annuleren
Opslaan