yangys
2024-03-29 4b479381a65bd3ef526cb92631d3550f2aa17459
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.qianwen.smartman.modules.notify.convert;
 
import java.util.ArrayList;
import java.util.List;
import com.qianwen.smartman.modules.notify.entity.NotifySystem;
import com.qianwen.smartman.modules.notify.vo.NotifySystemVO;
 
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/convert/NotifySystemConvertImpl.class */
public class NotifySystemConvertImpl implements NotifySystemConvert {
    @Override // org.springblade.modules.notify.convert.NotifySystemConvert
    public NotifySystemVO convert(NotifySystem notifySystem) {
        if (notifySystem == null) {
            return null;
        }
        NotifySystemVO notifySystemVO = new NotifySystemVO();
        notifySystemVO.setSourceId(notifySystem.getSourceId());
        notifySystemVO.setNotifyUser(notifySystem.getNotifyUser());
        notifySystemVO.setNotifyType(notifySystem.getNotifyType());
        notifySystemVO.setNotifyTime(notifySystem.getNotifyTime());
        notifySystemVO.setBusinessName(notifySystem.getBusinessName());
        notifySystemVO.setBusinessKey(notifySystem.getBusinessKey());
        notifySystemVO.setMessage(notifySystem.getMessage());
        notifySystemVO.setDescription(notifySystem.getDescription());
        if (notifySystem.getId() != null) {
            notifySystemVO.setId(String.valueOf(notifySystem.getId()));
        }
        notifySystemVO.setStatus(notifySystem.getStatus());
        notifySystemVO.setAttachments(notifySystem.getAttachments());
        return notifySystemVO;
    }
 
    @Override // org.springblade.modules.notify.convert.NotifySystemConvert
    public NotifySystem convert(NotifySystemVO notifySystemVO) {
        if (notifySystemVO == null) {
            return null;
        }
        NotifySystem notifySystem = new NotifySystem();
        if (notifySystemVO.getId() != null) {
            notifySystem.setId(Long.valueOf(Long.parseLong(notifySystemVO.getId())));
        }
        notifySystem.setStatus(notifySystemVO.getStatus());
        notifySystem.setSourceId(notifySystemVO.getSourceId());
        notifySystem.setNotifyUser(notifySystemVO.getNotifyUser());
        notifySystem.setNotifyType(notifySystemVO.getNotifyType());
        notifySystem.setNotifyTime(notifySystemVO.getNotifyTime());
        notifySystem.setBusinessName(notifySystemVO.getBusinessName());
        notifySystem.setBusinessKey(notifySystemVO.getBusinessKey());
        notifySystem.setAttachments(notifySystemVO.getAttachments());
        notifySystem.setMessage(notifySystemVO.getMessage());
        notifySystem.setDescription(notifySystemVO.getDescription());
        return notifySystem;
    }
 
    @Override // org.springblade.modules.notify.convert.NotifySystemConvert
    public List<NotifySystemVO> convert(List<NotifySystem> list) {
        if (list == null) {
            return null;
        }
        List<NotifySystemVO> list1 = new ArrayList<>(list.size());
        for (NotifySystem notifySystem : list) {
            list1.add(convert(notifySystem));
        }
        return list1;
    }
}