Search in sources :

Example 1 with UserInfoDto

use of com.paascloud.provider.model.dto.user.UserInfoDto in project paascloud-master by paascloud.

the class MallUserController method getInformation.

/**
 * 获取用户信息.
 *
 * @return the information
 */
@PostMapping(value = "/getInformation")
@ApiOperation(httpMethod = "POST", value = "获取用户信息")
public Wrapper<UserInfoDto> getInformation() {
    LoginAuthDto loginAuthDto = getLoginAuthDto();
    Long userId = loginAuthDto.getUserId();
    logger.info("queryUserInfo - 查询用户基本信息 userId={}", userId);
    UacUser uacUser = uacUserService.queryByUserId(userId);
    if (uacUser == null) {
        return WrapMapper.error("找不到当前用户");
    }
    UserInfoDto userInfoDto = new UserInfoDto();
    BeanUtils.copyProperties(uacUser, userInfoDto);
    return WrapMapper.ok(userInfoDto);
}
Also used : UacUser(com.paascloud.provider.model.domain.UacUser) UserInfoDto(com.paascloud.provider.model.dto.user.UserInfoDto) LoginAuthDto(com.paascloud.base.dto.LoginAuthDto) PostMapping(org.springframework.web.bind.annotation.PostMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

LoginAuthDto (com.paascloud.base.dto.LoginAuthDto)1 UacUser (com.paascloud.provider.model.domain.UacUser)1 UserInfoDto (com.paascloud.provider.model.dto.user.UserInfoDto)1 ApiOperation (io.swagger.annotations.ApiOperation)1 PostMapping (org.springframework.web.bind.annotation.PostMapping)1