添加自定义拓展数据
This commit is contained in:
parent
2c9b4e28f8
commit
a838d52540
@ -58,6 +58,7 @@ public class SecurityComponent {
|
||||
userInfoBO.setDepartments(loginUser.getDepartments());
|
||||
userInfoBO.setGroups(loginUser.getGroups());
|
||||
userInfoBO.setPositions(loginUser.getPositions());
|
||||
userInfoBO.setExpandData(loginUser.getExpandData());
|
||||
}
|
||||
if (user instanceof UserInfoBO) {
|
||||
userInfoBO = (UserInfoBO) user;
|
||||
@ -131,6 +132,27 @@ public class SecurityComponent {
|
||||
return userInfoBO.getUserUsername();
|
||||
}
|
||||
|
||||
/**
|
||||
* 拓展数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Object getExpandData() {
|
||||
UserInfoBO userInfoBO = getCurrentUser();
|
||||
return userInfoBO.getExpandData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 拓展数据
|
||||
*
|
||||
* @param clazz
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public <T> T getExpandData(Class<T> clazz) {
|
||||
return (T) getExpandData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户ID信息
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user