package com.gkhy.huataiFourierSpecialGasMonitor.domain.attachment.converter;
|
|
import com.gkhy.huataiFourierSpecialGasMonitor.domain.attachment.dto.resp.AttachmentDomainDTO;
|
import com.gkhy.huataiFourierSpecialGasMonitor.domain.attachment.entity.AttachmentInfo;
|
import org.springframework.beans.BeanUtils;
|
import org.springframework.stereotype.Component;
|
|
/**
|
* @email 1603559716@qq.com
|
* @author: zf
|
* @date: 2023/5/7
|
* @time: 17:06
|
*/
|
@Component
|
public class AttachmentDomainConverter {
|
public AttachmentDomainDTO getDomainDTO(AttachmentInfo attachmentInfo){
|
if(null == attachmentInfo){
|
return null;
|
}
|
AttachmentDomainDTO attachmentDomainDTO = new AttachmentDomainDTO();
|
BeanUtils.copyProperties(attachmentInfo,attachmentDomainDTO);
|
return attachmentDomainDTO;
|
}
|
|
}
|