|
@@ -30,6 +30,7 @@ import java.io.IOException;
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
|
import java.lang.reflect.Method;
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
import java.util.Optional;
|
|
|
|
|
|
/**
|
|
@@ -100,11 +101,18 @@ public class EasSysStudentLoginServiceImpl implements EasSysStudentLoginService
|
|
|
departments.forEach(departmentPojo -> {
|
|
|
try {
|
|
|
String authority = departmentPojo.getAuthority();
|
|
|
- if (authority != null && !authority.isEmpty() && !authority.isBlank() ) {
|
|
|
+ if ( authority != null && !authority.isEmpty() ) {
|
|
|
String methodName = Character.toUpperCase(authority.charAt(0)) + authority.substring(1);
|
|
|
Method declaredMethod = easAuthorityConfig.getClass().getDeclaredMethod("get" + methodName, null);
|
|
|
- List<String> depUrlList = (List<String>) declaredMethod.invoke(easAuthorityConfig, null);
|
|
|
- userDetailPojo.setPermissionPojos(depUrlList);
|
|
|
+ if ( declaredMethod != null ) {
|
|
|
+ List<String> depUrlList = (List<String>) declaredMethod.invoke(easAuthorityConfig, null);
|
|
|
+ if (Objects.nonNull(depUrlList) && depUrlList.size() > 0 ) {
|
|
|
+ if ( Objects.nonNull(userDetailPojo.getPermissionPojos()) ) {
|
|
|
+ depUrlList.addAll(userDetailPojo.getPermissionPojos());
|
|
|
+ }
|
|
|
+ userDetailPojo.setPermissionPojos(depUrlList);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
} catch (NoSuchMethodException ignored) {}
|
|
|
catch (InvocationTargetException | IllegalAccessException ignored) {}
|