use of com.whoiszxl.entity.vo.MemberVO 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