Search in sources :

Example 1 with MemberVO

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

Member (com.whoiszxl.entity.Member)1 MemberInfo (com.whoiszxl.entity.MemberInfo)1 MemberDetailVO (com.whoiszxl.entity.vo.MemberDetailVO)1 MemberInfoVO (com.whoiszxl.entity.vo.MemberInfoVO)1 MemberVO (com.whoiszxl.entity.vo.MemberVO)1