37 lines
974 B
Java
37 lines
974 B
Java
|
|
package com.newyetai.usercenter.auth.mapstruct;
|
||
|
|
|
||
|
|
import org.mapstruct.Mapper;
|
||
|
|
import org.mapstruct.Mapping;
|
||
|
|
import org.mapstruct.factory.Mappers;
|
||
|
|
|
||
|
|
import com.newyetai.usercenter.auth.dto.AuthDetailCreateDTO;
|
||
|
|
import com.newyetai.usercenter.auth.dto.AuthDetailLoginDTO;
|
||
|
|
import com.newyetai.usercenter.auth.dto.LitePhoneLoginDTO;
|
||
|
|
import com.newyetai.usercenter.auth.entity.AuthDetail;
|
||
|
|
import com.newyetai.usercenter.user.login.dto.LoginPhoneDTO;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author sr on 2021-05-24
|
||
|
|
*/
|
||
|
|
@Mapper
|
||
|
|
public interface AuthDetailMapMapper {
|
||
|
|
|
||
|
|
AuthDetailMapMapper INSTANCE =
|
||
|
|
Mappers.getMapper(AuthDetailMapMapper.class);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* dto to entity
|
||
|
|
*
|
||
|
|
* @param authDetailDto
|
||
|
|
* @return
|
||
|
|
* @author sr on 2021-05-24
|
||
|
|
*/
|
||
|
|
AuthDetail toEntity(AuthDetailCreateDTO authDetailCreateDTO);
|
||
|
|
|
||
|
|
@Mapping(target = "withoutCode", constant = "true")
|
||
|
|
LoginPhoneDTO to(LitePhoneLoginDTO litePhoneLoginDTO);
|
||
|
|
|
||
|
|
AuthDetailLoginDTO toDto(LitePhoneLoginDTO loginPhoneLoginDTO);
|
||
|
|
|
||
|
|
}
|