Search in sources :

Example 1 with MemberDetailVO

use of com.whoiszxl.entity.vo.MemberDetailVO in project shopzz by whoiszxl.

the class MemberFeignClientImpl method getMemberInfo.

@Override
public MemberDetailDTO getMemberInfo() {
    MemberDetailVO memberDetailVO = memberService.memberInfo();
    MemberDetailDTO memberDetailDTO = new MemberDetailDTO();
    MemberDTO memberDTO = memberDetailVO.getMember().clone(MemberDTO.class);
    MemberInfoDTO memberInfoDTO = memberDetailVO.getMemberInfo().clone(MemberInfoDTO.class);
    memberDetailDTO.setMember(memberDTO);
    memberDetailDTO.setMemberInfo(memberInfoDTO);
    return memberDetailDTO;
}
Also used : MemberDetailDTO(com.whoiszxl.dto.MemberDetailDTO) MemberDTO(com.whoiszxl.dto.MemberDTO) MemberInfoDTO(com.whoiszxl.dto.MemberInfoDTO) MemberDetailVO(com.whoiszxl.entity.vo.MemberDetailVO)

Example 2 with MemberDetailVO

use of com.whoiszxl.entity.vo.MemberDetailVO in project shopzz by whoiszxl.

the class MemberFeignClientImpl method getMemberInfo.

@Override
public ResponseResult<MemberDetailDTO> getMemberInfo() {
    MemberDetailVO memberDetailVO = memberService.memberInfo();
    MemberDTO memberDTO = dozerUtils.map(memberDetailVO.getMember(), MemberDTO.class);
    MemberInfoDTO memberInfoDTO = dozerUtils.map(memberDetailVO.getMemberInfo(), MemberInfoDTO.class);
    MemberDetailDTO memberDetailDTO = new MemberDetailDTO();
    memberDetailDTO.setMember(memberDTO);
    memberDetailDTO.setMemberInfo(memberInfoDTO);
    return ResponseResult.buildSuccess(memberDetailDTO);
}
Also used : MemberDetailDTO(com.whoiszxl.dto.MemberDetailDTO) MemberDTO(com.whoiszxl.dto.MemberDTO) MemberInfoDTO(com.whoiszxl.dto.MemberInfoDTO) MemberDetailVO(com.whoiszxl.entity.vo.MemberDetailVO)

Example 3 with MemberDetailVO

use of com.whoiszxl.entity.vo.MemberDetailVO in project shopzz by whoiszxl.

the class MemberServiceImpl method memberInfo.

@Override
public MemberDetailVO memberInfo() {
    // 1. 获取到当前登录用户的ID
    long memberId = StpUtil.getLoginIdAsLong();
    // 2. 分别从会员、会员信息表中查询出
    Member member = this.getById(memberId);
    MemberVO memberVO = dozerUtils.map(member, MemberVO.class);
    MemberInfo memberInfo = memberInfoService.getByMemberId(memberId);
    MemberInfoVO memberInfoVO = dozerUtils.map(memberInfo, MemberInfoVO.class);
    MemberDetailVO memberDetailVO = new MemberDetailVO();
    memberDetailVO.setMemberInfo(memberInfoVO);
    memberDetailVO.setMember(memberVO);
    return memberDetailVO;
}
Also used : MemberInfo(com.whoiszxl.entity.MemberInfo) MemberVO(com.whoiszxl.entity.vo.MemberVO) MemberInfoVO(com.whoiszxl.entity.vo.MemberInfoVO) Member(com.whoiszxl.entity.Member) MemberDetailVO(com.whoiszxl.entity.vo.MemberDetailVO)

Aggregations

MemberDetailVO (com.whoiszxl.entity.vo.MemberDetailVO)3 MemberDTO (com.whoiszxl.dto.MemberDTO)2 MemberDetailDTO (com.whoiszxl.dto.MemberDetailDTO)2 MemberInfoDTO (com.whoiszxl.dto.MemberInfoDTO)2 Member (com.whoiszxl.entity.Member)1 MemberInfo (com.whoiszxl.entity.MemberInfo)1 MemberInfoVO (com.whoiszxl.entity.vo.MemberInfoVO)1 MemberVO (com.whoiszxl.entity.vo.MemberVO)1