“djh”
2024-12-05 eee41a5fb58e6547a43929430f4b72908119db6e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.gkhy.testFourierSpecialGasMonitor.domain.attachment.converter;
 
import com.gkhy.testFourierSpecialGasMonitor.domain.attachment.dto.resp.AttachmentDomainDTO;
import com.gkhy.testFourierSpecialGasMonitor.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;
    }
 
}