package com.wzj.soopin.member.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wzj.soopin.member.domain.bo.MemberBO;
import com.wzj.soopin.member.domain.po.Member;
import com.wzj.soopin.member.domain.vo.MemberVO;
import org.dromara.common.web.core.BaseConverter;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;
/**
 * 会员信息  DO <=> DTO <=> VO / BO / Query
 *
 * @author zcc
 */
@Mapper(componentModel = "spring",uses = BaseConverter.class)
public interface MemberConvert  extends BaseConverter<MemberVO, MemberBO,Member> {

    @Override
    @Mapping(target = "phone", source ="phoneEncrypted" )
    MemberVO toVO(Member member);

    @Override
    @Mapping(target = "phoneEncrypted", source ="phone")
    Member toPo(MemberBO d);
}
