mirror of https://gitee.com/stylefeng/roses
【portal】登录信息增加外部主键id
parent
efe81c0824
commit
07a63e8252
|
@ -180,6 +180,12 @@ public class LoginUser implements Serializable {
|
||||||
@ChineseDescription("用户拥有的菜单类型:1-前台 ,2-后台,3-所有")
|
@ChineseDescription("用户拥有的菜单类型:1-前台 ,2-后台,3-所有")
|
||||||
private Integer menuType;
|
private Integer menuType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主数据的用户id
|
||||||
|
*/
|
||||||
|
@ChineseDescription("主数据的用户id")
|
||||||
|
private String masterUserId;
|
||||||
|
|
||||||
public String getWsUrl() {
|
public String getWsUrl() {
|
||||||
if (ObjectUtil.isEmpty(this.wsUrl)) {
|
if (ObjectUtil.isEmpty(this.wsUrl)) {
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -149,4 +149,10 @@ public class IndexUserInfoV3 {
|
||||||
@ChineseDescription("权限标识编码")
|
@ChineseDescription("权限标识编码")
|
||||||
private Set<String> authCodes;
|
private Set<String> authCodes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主数据的用户id
|
||||||
|
*/
|
||||||
|
@ChineseDescription("主数据的用户id")
|
||||||
|
private String masterUserId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,13 +64,9 @@ public class UserLoginInfoFactory {
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @since 2020/12/26 17:53
|
* @since 2020/12/26 17:53
|
||||||
*/
|
*/
|
||||||
public static UserLoginInfoDTO userLoginInfoDTO(SysUser sysUser,
|
public static UserLoginInfoDTO userLoginInfoDTO(SysUser sysUser, List<SysRoleDTO> roleResponseList, DataScopeDTO dataScopeResponse,
|
||||||
List<SysRoleDTO> roleResponseList,
|
SysUserOrgDTO userOrgInfo, Set<String> resourceUrlsListByCodes,
|
||||||
DataScopeDTO dataScopeResponse,
|
Set<String> roleButtonCodes, AntdvFrontTypeEnum userMenuType) {
|
||||||
SysUserOrgDTO userOrgInfo,
|
|
||||||
Set<String> resourceUrlsListByCodes,
|
|
||||||
Set<String> roleButtonCodes,
|
|
||||||
AntdvFrontTypeEnum userMenuType) {
|
|
||||||
|
|
||||||
UserLoginInfoDTO userLoginInfoDTO = new UserLoginInfoDTO();
|
UserLoginInfoDTO userLoginInfoDTO = new UserLoginInfoDTO();
|
||||||
|
|
||||||
|
@ -135,6 +131,9 @@ public class UserLoginInfoFactory {
|
||||||
// 设置登录用户的菜单类型
|
// 设置登录用户的菜单类型
|
||||||
loginUser.setMenuType(userMenuType.getCode());
|
loginUser.setMenuType(userMenuType.getCode());
|
||||||
|
|
||||||
|
// 设置外部用户id
|
||||||
|
loginUser.setMasterUserId(sysUser.getMasterUserId());
|
||||||
|
|
||||||
// 响应dto
|
// 响应dto
|
||||||
userLoginInfoDTO.setLoginUser(loginUser);
|
userLoginInfoDTO.setLoginUser(loginUser);
|
||||||
return userLoginInfoDTO;
|
return userLoginInfoDTO;
|
||||||
|
|
|
@ -130,6 +130,9 @@ public class IndexUserInfoServiceImpl implements IndexUserInfoService {
|
||||||
// 权限编码
|
// 权限编码
|
||||||
indexUserInfoV3.setAuthCodes(loginUser.getButtonCodes());
|
indexUserInfoV3.setAuthCodes(loginUser.getButtonCodes());
|
||||||
|
|
||||||
|
// 设置外部id
|
||||||
|
indexUserInfoV3.setMasterUserId(loginUser.getMasterUserId());
|
||||||
|
|
||||||
return indexUserInfoV3;
|
return indexUserInfoV3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue