pom.xml
<!-- MapStruct Bean属性拷贝 -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>1.3.1.Final</version>
</dependency>
<!-- MapStruct Bean属性拷贝 -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.3.1.Final</version>
</dependency>
Converter
/**
* DTO -> Entity
* @param aDTO
* @return
*/
@Mappings({})
AEntity DTOToEntity(ADTO aDTO);
/**
* Entity -> DTO
* @param bEntity
* @return
*/
@Mappings({})
BDTO entityToDTO(BEntity bEntity);
/**
* Entity -> DTO
* @param deviceEntityList 设备Entity列表
* @return
*/
@Mappings({})
PageInfo<CDTO> entityToDTO(PageInfo<CEntity> cEntity);