MassStaffDetailConvert.java
3.34 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package cn.com.glsx.entmicro.convert.mass;
import cn.com.glsx.entmicro.dto.mass.MassCustomerSenderItemDTO;
import cn.com.glsx.entmicro.dto.mass.MassGroupDetailSenderDTO;
import cn.com.glsx.entmicro.dto.mass.MassGroupDetailStatisticDTO;
import cn.com.glsx.entmicro.dto.mass.MassStaffSenderItemDTO;
import cn.com.glsx.entmicro.response.mass.MassCustomerSenderItemVo;
import cn.com.glsx.entmicro.response.mass.MassGroupDetailSenderVo;
import cn.com.glsx.entmicro.response.mass.MassGroupDetailStatisticVo;
import cn.com.glsx.entmicro.response.mass.MassStaffSenderItemVo;
import org.springframework.beans.BeanUtils;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
/**
* @author wangxw
* @version 1.0.0
* @ClassName MassStaffDetailConvert.java
* @description: ${description}
* @createTime 2021年11月19日 17:21:00
*/
public class MassStaffDetailConvert {
public static List<MassStaffSenderItemVo> convertRpcMassStaffSendList(List<MassStaffSenderItemDTO> result) {
if (CollectionUtils.isEmpty(result)) {
return null;
}
List<MassStaffSenderItemVo> massStaffSenderItemVoList = new ArrayList<>();
for (MassStaffSenderItemDTO itemDTO:result) {
massStaffSenderItemVoList.add(convertRpcMassStaffSend(itemDTO));
}
return massStaffSenderItemVoList;
}
private static MassStaffSenderItemVo convertRpcMassStaffSend(MassStaffSenderItemDTO itemDTO) {
MassStaffSenderItemVo itemVo = new MassStaffSenderItemVo();
BeanUtils.copyProperties(itemDTO, itemVo);
return itemVo;
}
public static List<MassCustomerSenderItemVo> convertRpcMassCustomerSendList(List<MassCustomerSenderItemDTO> result) {
if (CollectionUtils.isEmpty(result)) {
return null;
}
List<MassCustomerSenderItemVo> massCustomerSenderItemVoList = new ArrayList<>();
for (MassCustomerSenderItemDTO itemDTO:result) {
massCustomerSenderItemVoList.add(convertRpcMassCustomerSend(itemDTO));
}
return massCustomerSenderItemVoList;
}
private static MassCustomerSenderItemVo convertRpcMassCustomerSend(MassCustomerSenderItemDTO itemDTO) {
MassCustomerSenderItemVo itemVo = new MassCustomerSenderItemVo();
BeanUtils.copyProperties(itemDTO, itemVo);
return itemVo;
}
public static MassGroupDetailStatisticVo convertRpcMassGroupDetailStatistic(MassGroupDetailStatisticDTO result) {
MassGroupDetailStatisticVo detailVo = new MassGroupDetailStatisticVo();
BeanUtils.copyProperties(result, detailVo);
return detailVo;
}
public static List<MassGroupDetailSenderVo> convertRpcMassGroupDetailStaffList(List<MassGroupDetailSenderDTO> resultList) {
if (CollectionUtils.isEmpty(resultList)) {
return null;
}
List<MassGroupDetailSenderVo> detailSenderVoList = new ArrayList<>();
for (MassGroupDetailSenderDTO itemDTO:resultList) {
detailSenderVoList.add(convertRpcMassGroupDetailStaff(itemDTO));
}
return detailSenderVoList;
}
private static MassGroupDetailSenderVo convertRpcMassGroupDetailStaff(MassGroupDetailSenderDTO itemDTO) {
MassGroupDetailSenderVo senderVo = new MassGroupDetailSenderVo();
BeanUtils.copyProperties(itemDTO, senderVo);
return senderVo;
}
}