|
|
@@ -26,6 +26,7 @@ import com.hz.pm.api.user.model.vo.ResUserDetailVO; |
|
|
|
import com.hz.pm.api.user.model.vo.UserInfoListVO; |
|
|
|
import com.hz.pm.api.user.model.vo.UserRoleVO; |
|
|
|
import com.hz.pm.api.user.security.model.UserFullInfoDTO; |
|
|
|
import com.hz.pm.api.user.security.model.UserInfoDetails; |
|
|
|
import com.hz.pm.api.user.service.IUserInfoService; |
|
|
|
import com.hz.pm.api.user.util.LoginUserUtil; |
|
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
@@ -267,8 +268,8 @@ public class UserInfoManage { |
|
|
|
|
|
|
|
|
|
|
|
public ResUserDetailVO currentUserInfo() { |
|
|
|
Long userId = LoginUserUtil.getUserId(); |
|
|
|
UserInfo userInfo = userInfoService.getById(userId); |
|
|
|
UserInfoDetails userDetail = LoginUserUtil.loginUserDetail(); |
|
|
|
UserInfo userInfo = userInfoService.getById(userDetail.getUserId()); |
|
|
|
if (Objects.isNull(userInfo)) { |
|
|
|
return null; |
|
|
|
} |
|
|
@@ -286,7 +287,7 @@ public class UserInfoManage { |
|
|
|
resUserDetail.setMhUnitName(userInfo.getMhUnitName()); |
|
|
|
|
|
|
|
// 装配用户角色信息列表 |
|
|
|
List<UserRole> userRoleList = userRoleService.listByUserId(userId); |
|
|
|
List<UserRole> userRoleList = userRoleService.listByUserId(userDetail.getUserId()); |
|
|
|
if (CollUtil.isNotEmpty(userRoleList)) { |
|
|
|
List<Long> roleIdList = CollUtils.fieldList(userRoleList, UserRole::getRoleId); |
|
|
|
List<Role> roleList = roleService.listByIds(roleIdList); |
|
|
@@ -299,6 +300,7 @@ public class UserInfoManage { |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
resUserDetail.setUserRoleInfoList(userRoles); |
|
|
|
} |
|
|
|
resUserDetail.setIsCountyUser(userDetail.isCountyUser()); |
|
|
|
return resUserDetail; |
|
|
|
} |
|
|
|
|
|
|
|