use of com.paascloud.provider.model.vo.UserVo in project paascloud-master by paascloud.
the class UacUserCommonController method queryUserInfo.
/**
* 根据userId查询用户详细信息(连表查询).
*
* @return the wrapper
*/
@PostMapping(value = "/queryUserInfo/{loginName}")
@ApiOperation(httpMethod = "POST", value = "根据userId查询用户详细信息")
public Wrapper<UserVo> queryUserInfo(@PathVariable String loginName) {
logger.info("根据userId查询用户详细信息");
UserVo userVo = new UserVo();
UacUser uacUser = uacUserService.findByLoginName(loginName);
uacUser = uacUserService.findUserInfoByUserId(uacUser.getId());
List<UacRole> roleList = uacRoleService.findAllRoleInfoByUserId(uacUser.getId());
List<MenuVo> authTree = uacRoleService.getOwnAuthTree(uacUser.getId());
BeanUtils.copyProperties(uacUser, userVo);
if (PublicUtil.isNotEmpty(roleList)) {
userVo.setRoles(new HashSet<>(roleList));
}
userVo.setAuthTree(authTree);
return WrapMapper.ok(userVo);
}
Aggregations