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;
}
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);
}
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;
}
Aggregations