yangys
2024-04-04 ed4a5236bab800094be4a8378f5098eebe3de6ac
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
package com.qianwen.smartman.modules.notify.convert;
 
import java.util.ArrayList;
import java.util.List;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import com.qianwen.smartman.modules.cps.entity.CommonGroup;
import com.qianwen.smartman.modules.cps.entity.Employee;
import com.qianwen.smartman.modules.notify.dto.BusinessNotifyStateDTO;
 
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/convert/BusinessNotifyStateConvert.class */
public interface BusinessNotifyStateConvert {
    public static final BusinessNotifyStateConvert INSTANCE = (BusinessNotifyStateConvert) Mappers.getMapper(BusinessNotifyStateConvert.class);
 
    @Mappings({})
    default BusinessNotifyStateDTO convert(Employee employee) {
        BusinessNotifyStateDTO stateDTO = new BusinessNotifyStateDTO();
        stateDTO.setPersonId(employee.getId());
        stateDTO.setName(employee.getName());
        return stateDTO;
    }
 
    @Mappings({})
    default List<BusinessNotifyStateDTO> convertByEmpList(List<Employee> employees) {
        List<BusinessNotifyStateDTO> stateDTOS = new ArrayList<>();
        for (Employee employee : employees) {
            BusinessNotifyStateDTO convert = convert(employee);
            stateDTOS.add(convert);
        }
        return stateDTOS;
    }
 
    @Mappings({})
    default BusinessNotifyStateDTO convert(CommonGroup commonGroup) {
        BusinessNotifyStateDTO stateDTO = new BusinessNotifyStateDTO();
        stateDTO.setPersonId(commonGroup.getId());
        stateDTO.setName(commonGroup.getName());
        return stateDTO;
    }
 
    @Mappings({})
    default List<BusinessNotifyStateDTO> convertByOrgList(List<CommonGroup> commonGroups) {
        ArrayList<BusinessNotifyStateDTO> stateDTOS = new ArrayList<>();
        for (CommonGroup commonGroup : commonGroups) {
            BusinessNotifyStateDTO convert = convert(commonGroup);
            stateDTOS.add(convert);
        }
        return stateDTOS;
    }
}